Skip to content

Add delegation and AI agent token exchange docs - #6296

Open
RovinKYK wants to merge 5 commits into
wso2:masterfrom
RovinKYK:token-exchange
Open

Add delegation and AI agent token exchange docs#6296
RovinKYK wants to merge 5 commits into
wso2:masterfrom
RovinKYK:token-exchange

Conversation

@RovinKYK

@RovinKYK RovinKYK commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Purpose

$Subject

Related Issues

wso2/product-is#26633

Test environment

Security checks

Copilot AI review requested due to automatic review settings July 31, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The changes add shared documentation for OAuth 2.0 token exchange and delegation. They document AI-agent flows, delegated-token claims, chained delegation, and token exchange configuration. Product-specific templates and navigation entries expose the guides for Asgardeo and Identity Server.

Changes

Token Exchange and Delegation

Layer / File(s) Summary
Token exchange configuration
en/includes/guides/authentication/configure-token-exchange.md
Reorganizes token exchange setup guidance and adds local-user, federated, delegation, role, JWT, and audience configuration.
Delegation flow documentation
en/includes/guides/authorization/delegation.md
Documents delegated-token requests, actor validation, scope limits, act claims, and chained delegation.
AI-agent token exchange guide
en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
Documents AI-agent token exchange prerequisites, request parameters, delegated-token claims, resource access, and multi-agent delegation.
Product pages and navigation
en/includes/guides/agentic-ai/ai-agents/agent-authentication.md, en/asgardeo/docs/guides/..., en/identity-server/.../docs/guides/..., en/asgardeo/mkdocs.yml, en/identity-server/.../mkdocs.yml, en/includes/guides/organization-management/generate-tokens-for-organization-apps.md, .vale/styles/config/vocabularies/vocab/accept.txt
Adds product-specific guide templates and navigation entries. Gates agent guidance by product and version. Uses generic subject-token placeholders and adds Vale vocabulary terms.

Suggested labels: Team/API Access Mgt & Authorization

Suggested reviewers: pavindulakshan

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the main sections but has an incomplete purpose, mismatched related-section heading, no test details, and unchecked security confirmations. Complete the purpose, use the required Related PRs section, provide test-environment details or state that testing is not applicable, and confirm the security checks.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the addition of delegation and AI agent token exchange documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (2)
en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md (1)

2-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use sentence case for the document title.

Change # Token Exchange for AI Agents to # Token exchange for AI agents.

As per coding guidelines, use sentence case for all headings and document titles.

Proposed fix
-# Token Exchange for AI Agents
+# Token exchange for AI agents
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md` at line
2, Update the document title heading `Token Exchange for AI Agents` to sentence
case: `Token exchange for AI agents`.

Source: Coding guidelines

en/includes/guides/authorization/delegation.md (1)

22-22: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Standardize these token exchange examples on one base URL variable.

en/includes/guides/authorization/delegation.md uses {{base_url}}, while en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md uses {{ api_base_path }}. The related configure-token-exchange.md examples use {{ product_url_format }}. Align these shared includes with one endpoint variable, or add the variable definitions needed for each included product page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/includes/guides/authorization/delegation.md` at line 22, Standardize the
token endpoint placeholders across
en/includes/guides/authorization/delegation.md:22 and
en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md:76 by using
one shared base URL variable consistently; ensure the selected variable is
defined or supplied for every product page that includes these examples, while
aligning with the related configure-token-exchange.md convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@en/identity-server/next/docs/guides/agentic-ai/ai-agents/token-exchange-for-agents.md`:
- Around line 1-3: Update the api_base_path value in the token-exchange guide
wrapper to use the organization-aware token endpoint expected by the new
organization hierarchy, ensuring the shared guide’s {{ api_base_path
}}/oauth2/token resolves with the correct organization ID path.

In `@en/includes/guides/authentication/configure-token-exchange.md`:
- Line 3: Update the introductory sentence in the token exchange guide to use
grammatically correct link guidance by changing “Refer” to “Refer to” before the
Token exchange grant link, while preserving the existing link target and
surrounding prose.
- Line 53: Update the token-exchange sentence to remove the fixed “an” article
before the product_name interpolation and eliminate the duplicate spaces around
it. Rephrase the wording with a clear noun-based construction that remains
grammatically correct for any product name.

In `@en/includes/guides/authorization/delegation.md`:
- Around line 15-16: Update the delegation guide’s actor-token terminology and
validation guidance to match the endpoint’s supported actor identities: use
“actor identity” and document distinct user-versus-agent validation rules if
both are accepted, or explicitly limit actors to users and direct agents to the
AI-agent token-exchange guide if only users are supported. Apply this
consistently to the actor_token references and actor-resolution requirements in
the delegation guide.

---

Nitpick comments:
In `@en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md`:
- Line 2: Update the document title heading `Token Exchange for AI Agents` to
sentence case: `Token exchange for AI agents`.

In `@en/includes/guides/authorization/delegation.md`:
- Line 22: Standardize the token endpoint placeholders across
en/includes/guides/authorization/delegation.md:22 and
en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md:76 by using
one shared base URL variable consistently; ensure the selected variable is
defined or supplied for every product page that includes these examples, while
aligning with the related configure-token-exchange.md convention.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: dcaedf1d-8267-4a3f-a9eb-aa546a691998

📥 Commits

Reviewing files that changed from the base of the PR and between f7512b5 and 339a08e.

⛔ Files ignored due to path filters (2)
  • en/asgardeo/docs/assets/img/guides/agentic-ai/ai-agent-token-exchange-flow.png is excluded by !**/*.png
  • en/identity-server/next/docs/assets/img/guides/agentic-ai/ai-agent-token-exchange-flow.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • en/asgardeo/docs/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/asgardeo/docs/guides/authorization/delegation.md
  • en/asgardeo/mkdocs.yml
  • en/identity-server/next/docs/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/identity-server/next/docs/guides/authorization/delegation.md
  • en/identity-server/next/mkdocs.yml
  • en/includes/guides/agentic-ai/ai-agents/agent-authentication.md
  • en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/includes/guides/authentication/configure-token-exchange.md
  • en/includes/guides/authorization/delegation.md
  • en/includes/guides/organization-management/generate-tokens-for-organization-apps.md

Comment thread en/includes/guides/authentication/configure-token-exchange.md Outdated
Comment thread en/includes/guides/authentication/configure-token-exchange.md Outdated
Comment thread en/includes/guides/authorization/delegation.md Outdated
@RovinKYK
RovinKYK force-pushed the token-exchange branch 3 times, most recently from 69ce609 to be70f2e Compare July 31, 2026 12:28
@coderabbitai
coderabbitai Bot requested a review from pavinduLakshan July 31, 2026 12:31
Comment thread en/includes/guides/agentic-ai/ai-agents/agent-authentication.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md`:
- Line 2: Update the document title heading to sentence case: change “Token
Exchange for AI Agents” to “Token exchange for AI agents.”
- Around line 47-48: Update the token configuration guidance around the JWT
reference to define it as “JSON Web Token (JWT)” on first use, and apply the
same first-use expansion for JWKS as “JSON Web Key Set (JWKS)” at the additional
referenced occurrence. Keep subsequent uses abbreviated.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 048321a9-caed-4865-9c03-05a028bc0d20

📥 Commits

Reviewing files that changed from the base of the PR and between 6fe2d49 and 2e7de04.

⛔ Files ignored due to path filters (2)
  • en/identity-server/7.2.0/docs/assets/img/guides/agentic-ai/ai-agent-token-exchange-flow.png is excluded by !**/*.png
  • en/identity-server/7.3.0/docs/assets/img/guides/agentic-ai/ai-agent-token-exchange-flow.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • .vale/styles/config/vocabularies/vocab/accept.txt
  • en/asgardeo/mkdocs.yml
  • en/identity-server/7.2.0/docs/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/identity-server/7.2.0/docs/guides/authorization/delegation.md
  • en/identity-server/7.2.0/mkdocs.yml
  • en/identity-server/7.3.0/docs/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/identity-server/7.3.0/docs/guides/authorization/delegation.md
  • en/identity-server/7.3.0/mkdocs.yml
  • en/identity-server/next/mkdocs.yml
  • en/includes/guides/agentic-ai/ai-agents/agent-authentication.md
  • en/includes/guides/agentic-ai/ai-agents/token-exchange-for-agents.md
  • en/includes/guides/authentication/configure-token-exchange.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • en/identity-server/next/mkdocs.yml
  • .vale/styles/config/vocabularies/vocab/accept.txt
  • en/includes/guides/agentic-ai/ai-agents/agent-authentication.md
  • en/asgardeo/mkdocs.yml

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants