Skip to content

Add scopes and custom roles reference for AI Workspace - #842

Open
VimukthiHerath wants to merge 2 commits into
wso2:mainfrom
VimukthiHerath:docs/ai-workspace-scopes-reference
Open

VimukthiHerath wants to merge 2 commits into
wso2:mainfrom
VimukthiHerath:docs/ai-workspace-scopes-reference

Conversation

@VimukthiHerath

@VimukthiHerath VimukthiHerath commented Nov 18, 2026 •

Copy link
Copy Markdown

Fixes #455

Purpose

Users who want to create custom roles in AI Workspace had no reference for which scopes exist or what each one allows. The "Add more users" section of the Authentication overview mentions that roles can be edited or added, but doesn't say which scopes to use.

Resolves #455

Checklist

  • Verified that llms.txt (located at en/docs/llms.txt) is updated for AI readiness content.
  • Ensured meaningful alt text for images and that the information contained in an image also appears in text so the relevant info exists in the body of the document. (No images added.)
  • Added or updated frontmatter for the respective pages.

Goals

Give administrators a single page that explains how scopes work, how to define and assign a custom role, and what every Platform API scope allows.

Approach

Added scopes.md under AI Workspace > Authentication, with these sections:

  • How scopes work: the ap: naming pattern, the manage scope covering sub-resources, any one listed scope being enough, the ap:api_key:all:manage ownership override, no wildcards, and roles combining.
  • Create a custom role: an example role in the role-to-scope mapping file, assigning it to file-based and identity provider users, and restarting.
  • Scope reference: one table per resource (23 tables, 205 scopes), generated from the scopes and descriptions in the Platform API openapi.yaml.
  • API Portal scopes: a short note on dp: scopes.

Also added the "Scopes and Custom Roles" nav entry after "Connect an Identity Provider", the matching next/ redirect, and a link to the new page from the Authentication overview.

User stories

As an administrator, I want to know which scopes exist and what each one allows, so that I can define a custom role for my users.

Release note

Added a "Scopes and Custom Roles" page to the AI Workspace documentation, covering how to create custom roles and listing every Platform API scope.

Documentation

en/docs/ai-workspace/1.0.0/setting-up/authentication/scopes.md

Training

N/A

Certification

N/A. Documentation-only change.

Marketing

N/A

Automation tests

  • Unit tests

    N/A, documentation only

  • Integration tests

    N/A, documentation only

Security checks

  • Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? N/A (documentation only)
  • Ran FindSecurityBugs plugin and verified report? N/A (documentation only)
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes (the only password hash shown is the $2a$12$... placeholder)

Samples

N/A

Related PRs

None

Migrations (if applicable)

N/A

Test environment

Docs build tooling: Python 3.12, mkdocs.

Learning

Scope names and descriptions come from platform-api/resources/openapi.yaml. The naming convention and role behavior come from the comments in platform-api/resources/role-to-scope-mapping.yaml in wso2/api-platform. The dp: note is based on the API Portal OpenAPI spec.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 17:13
@CLAassistant

CLAassistant commented Nov 18, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Missing-Docs]: For users who want to create custom roles, there should be documentation defining which scopes serve which purpose.

3 participants