Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions en/asgardeo/docs/tutorials/agent-id-claude-authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% set product_name = "Asgardeo" %}
{% set api_base_path = "https://api.asgardeo.io/t/{organization_name}" %}

Check warning on line 2 in en/asgardeo/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'api_base_path'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'api_base_path'?", "location": {"path": "en/asgardeo/docs/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 2, "column": 8}}}, "severity": "WARNING"}

{% include "../../../includes/tutorials/agent-id-claude-authentication.md" %}

Check failure on line 4 in en/asgardeo/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/asgardeo/docs/tutorials/agent-id-claude-authentication.md:4:77 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
1 change: 1 addition & 0 deletions en/asgardeo/docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the topics listed below for end-to-end tutorials on how to use Asgardeo with
- [Secure Spring Boot API with Asgardeo]({{base_path}}/tutorials/secure-spring-boot-api/)
- [Integrate Asgardeo with SMART on FHIR healthcare apps]({{base_path}}/tutorials/smart-on-fhir/)
- [Secure Agentic AI Systems with Asgardeo]({{base_path}}/tutorials/secure-agentic-ai-systems/)
- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use sentence case for the tutorial link text.

The link text should follow sentence case guidelines, matching the corrected tutorial title.

📝 Proposed fix
-- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
+- [Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
🤖 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/asgardeo/docs/tutorials/index.md` at line 16, Update the tutorial link
text string "- [Authenticate Agents with their own Agent ID to Claude API Using
Workload Identity
Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)" to use
sentence case to match the corrected tutorial title (e.g., "Authenticate agents
with their own agent ID to Claude API using workload identity federation") so
the visible link text follows sentence case while keeping the href unchanged.

- [Integrating Asgardeo With WSO2 AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control/)
- [Integrating Asgardeo With Kong AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/kong-ai-gateway-with-agent-identity-aware-access-control/)
- [Secure MCP servers with Asgardeo and integrate them with n8n agentic flows]({{base_path}}/tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows/)
1 change: 1 addition & 0 deletions en/asgardeo/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ nav:
- Secure Spring Boot API with Asgardeo: tutorials/secure-spring-boot-api.md
- Integrate Asgardeo with Smart on FHIR healthcare apps: tutorials/smart-on-fhir.md
- Secure Agentic AI Systems with Asgardeo: tutorials/secure-agentic-ai-systems.md
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use sentence case for the navigation entry.

The navigation entry should follow sentence case guidelines, matching the corrected tutorial title.

📝 Proposed fix
-    - Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
+    - Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
- Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
🤖 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/asgardeo/mkdocs.yml` at line 742, Update the navigation entry string
"Authenticate Agents with their own Agent ID to Claude API Using Workload
Identity Federation: tutorials/agent-id-claude-authentication.md" to sentence
case to match the tutorial title (e.g., "Authenticate agents with their own
agent ID to Claude API using workload identity federation:
tutorials/agent-id-claude-authentication.md").

- Implement End-to-End Authorization for MCP servers: tutorials/end-to-end-mcp-authorization-with-asgardeo.md
- Integrating Asgardeo With WSO2 AI Gateway for Agent Identity-Aware Access Control: tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control.md
- Integrating Asgardeo With Kong AI Gateway for Agent Identity-Aware Access Control: tutorials/kong-ai-gateway-with-agent-identity-aware-access-control.md
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% set product_name = "WSO2 Identity Server" %}
{% set api_base_path = "https://localhost:9443" %}

Check warning on line 2 in en/identity-server/7.2.0/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'api_base_path'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'api_base_path'?", "location": {"path": "en/identity-server/7.2.0/docs/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 2, "column": 8}}}, "severity": "WARNING"}

{% include "../../../../includes/tutorials/agent-id-claude-authentication.md" %}

Check failure on line 4 in en/identity-server/7.2.0/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/identity-server/7.2.0/docs/tutorials/agent-id-claude-authentication.md:4:80 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
1 change: 1 addition & 0 deletions en/identity-server/7.2.0/docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
- [Integrating WSO2 Identity Server With WSO2 AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control/)
- [Integrating WSO2 Identity Server With Kong AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/kong-ai-gateway-with-agent-identity-aware-access-control/)
- [Secure MCP servers with WSO2 Identity Server and integrate them with n8n agentic flows]({{base_path}}/tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows/)
- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)

Check failure on line 14 in en/identity-server/7.2.0/docs/tutorials/index.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/identity-server/7.2.0/docs/tutorials/index.md:14:153 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
1 change: 1 addition & 0 deletions en/identity-server/7.2.0/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ nav:
- Configure Choreo for silent password migration: references/tutorials/configure-choreo-for-password-migration.md
- Build your own push authenticator app: references/tutorials/build-your-own-push-authenticator-app.md
- Secure Agentic AI Systems with WSO2 Identity Server: tutorials/secure-agentic-ai-systems.md
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
- Integrating WSO2 Identity Server With WSO2 AI Gateway for Agent Identity-Aware Access Control: tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control.md
- Integrating WSO2 Identity Server With Kong AI Gateway for Agent Identity-Aware Access Control: tutorials/kong-ai-gateway-with-agent-identity-aware-access-control.md
- Secure MCP servers with WSO2 Identity Server and integrate them with n8n agentic flows: tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows.md
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% set product_name = "WSO2 Identity Server" %}
{% set api_base_path = "https://localhost:9443" %}

Check warning on line 2 in en/identity-server/7.3.0/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'api_base_path'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'api_base_path'?", "location": {"path": "en/identity-server/7.3.0/docs/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 2, "column": 8}}}, "severity": "WARNING"}

{% include "../../../../includes/tutorials/agent-id-claude-authentication.md" %}

Check failure on line 4 in en/identity-server/7.3.0/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/identity-server/7.3.0/docs/tutorials/agent-id-claude-authentication.md:4:80 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
1 change: 1 addition & 0 deletions en/identity-server/7.3.0/docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ See the topics listed below for end-to-end tutorials on how to use WSO2 Identity
- [Integrating WSO2 Identity Server With WSO2 AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control/)
- [Integrating WSO2 Identity Server With Kong AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/kong-ai-gateway-with-agent-identity-aware-access-control/)
- [Secure MCP servers with WSO2 Identity Server and integrate them with n8n agentic flows]({{base_path}}/tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows/)
- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
2 changes: 2 additions & 0 deletions en/identity-server/7.3.0/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ nav:
- Configure Choreo for silent password migration: references/tutorials/configure-choreo-for-password-migration.md
- Build your own push authenticator app: references/tutorials/build-your-own-push-authenticator-app.md
- Secure Agentic AI Systems with WSO2 Identity Server: tutorials/secure-agentic-ai-systems.md
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md

- Setup:
- Install:
- Install: deploy/get-started/install.md
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% set product_name = "WSO2 Identity Server" %}
{% set api_base_path = "https://localhost:9443" %}

Check warning on line 2 in en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'api_base_path'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'api_base_path'?", "location": {"path": "en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 2, "column": 8}}}, "severity": "WARNING"}

{% include "../../../../includes/tutorials/agent-id-claude-authentication.md" %}

Check failure on line 4 in en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md:4:80 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
1 change: 1 addition & 0 deletions en/identity-server/next/docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
- [Integrating WSO2 Identity Server With WSO2 AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control/)
- [Integrating WSO2 Identity Server With Kong AI Gateway for Agent Identity-Aware Access Control]({{base_path}}/tutorials/kong-ai-gateway-with-agent-identity-aware-access-control/)
- [Secure MCP servers with WSO2 Identity Server and integrate them with n8n agentic flows]({{base_path}}/tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows/)
- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)

Check failure on line 14 in en/identity-server/next/docs/tutorials/index.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

en/identity-server/next/docs/tutorials/index.md:14:153 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use sentence case for the tutorial link text.

The link text should follow sentence case guidelines, matching the corrected tutorial title.

📝 Proposed fix
-- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
+- [Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
- [Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)
🤖 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/identity-server/next/docs/tutorials/index.md` at line 14, Update the
markdown link text on the line containing "[Authenticate Agents with their own
Agent ID to Claude API Using Workload Identity
Federation]({{base_path}}/tutorials/agent-id-claude-authentication/)" to use
sentence case; replace the visible link text with "Authenticate agents with
their own agent ID to Claude API using workload identity federation" while
keeping the URL/mustache path unchanged so the target remains the same.

1 change: 1 addition & 0 deletions en/identity-server/next/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ nav:
- Integrating WSO2 Identity Server With WSO2 AI Gateway for Agent Identity-Aware Access Control: tutorials/wso2-ai-gateway-with-agent-identity-aware-access-control.md
- Integrating WSO2 Identity Server With Kong AI Gateway for Agent Identity-Aware Access Control: tutorials/kong-ai-gateway-with-agent-identity-aware-access-control.md
- Secure MCP servers with WSO2 Identity Server and integrate them with n8n agentic flows: tutorials/secure-mcp-servers-and-integrate-them-with-n8n-agentic-flows.md
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use sentence case for the navigation entry.

The navigation entry should follow sentence case guidelines, matching the corrected tutorial title.

📝 Proposed fix
-    - Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
+    - Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
- Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation: tutorials/agent-id-claude-authentication.md
🤖 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/identity-server/next/mkdocs.yml` at line 1004, Update the navigation entry
string "Authenticate Agents with their own Agent ID to Claude API Using Workload
Identity Federation: tutorials/agent-id-claude-authentication.md" to sentence
case to match the corrected tutorial title (e.g., "Authenticate agents with
their own agent ID to Claude API using workload identity federation") so the nav
entry exactly matches the tutorial title and casing.

- Setup:
- Install:
- Install: deploy/get-started/install.md
Expand Down
236 changes: 236 additions & 0 deletions en/includes/tutorials/agent-id-claude-authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
# Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation

Check warning on line 1 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation' should use sentence-style capitalization.", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 1, "column": 3}}}, "severity": "INFO"}
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use sentence case for the title.

The title capitalizes words mid-sentence that are not proper nouns. As per coding guidelines, use sentence case for all headings and document titles, capitalizing only the first word and proper nouns.

📝 Proposed fix
-# Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation
+# Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation
# Authenticate agents with their own Agent ID to Claude API using Workload Identity Federation
🤖 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/tutorials/agent-id-claude-authentication.md` at line 1, Change
the document title line "# Authenticate Agents with their own Agent ID to Claude
API Using Workload Identity Federation" to sentence case: "Authenticate agents
with their own agent ID to Claude API using workload identity federation" so
only the first word and proper nouns are capitalized; update the heading text
string at the top of the file accordingly.


This tutorial walks you through connecting an AI agent registered in {{product_name}} to the Claude API using [Anthropic's Workload Identity Federation (WIF)](https://docs.anthropic.com/en/docs/build-with-claude/workload-identity-federation/). By the end of this tutorial, your agent will authenticate with {{product_name}}, obtain a signed JWT, exchange it for a short-lived Claude access token, and make API calls without any static API keys.

Check warning on line 3 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.TooWordy] 'obtain' is too wordy. Raw Output: {"message": "[WSO2-IAM.TooWordy] 'obtain' is too wordy.", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 3, "column": 326}}}, "severity": "WARNING"}

Check warning on line 3 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceLength] Try to keep sentences short (< 30 words). Raw Output: {"message": "[WSO2-IAM.SentenceLength] Try to keep sentences short (\u003c 30 words).", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 3, "column": 245}}}, "severity": "INFO"}

## Overview

The authentication flow works as follows:

1. Your AI agent authenticates with {{product_name}} using its Agent ID and Secret.
2. {{product_name}} issues a signed JWT (access token) to the agent.
3. The agent presents this JWT to Anthropic's token endpoint.

Check warning on line 11 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Anthropic's'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Anthropic's'?", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 11, "column": 35}}}, "severity": "WARNING"}
4. Anthropic validates the JWT and returns a short-lived access token.
5. The agent uses the access token to call the Claude API.

## Prerequisites

Before you begin, ensure you have the following:

- An [Anthropic](https://console.anthropic.com/) account with access to the Claude Console.
- `curl` and `jq` installed on your machine (for the shell-based approach).
- Python 3.9+ (for the SDK-based approach).

## Step 1: Register an Agent in {{product_name}}

1. Log in to the {{product_name}} Console.
2. Navigate to **Agentic AI**.
3. Click **New Agent** and provide a descriptive name for your agent.
4. Assign the agent to appropriate groups and roles based on the resources it needs to access.
5. Note down the **Agent ID** and **Agent Secret** that {{product_name}} generates.

## Step 2: Create an Application in {{product_name}}

Your agent needs an OAuth application to obtain tokens through the app-native authentication flow.

Check warning on line 33 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.TooWordy] 'obtain' is too wordy. Raw Output: {"message": "[WSO2-IAM.TooWordy] 'obtain' is too wordy.", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 33, "column": 42}}}, "severity": "WARNING"}

1. Go to **Applications** and click **New Application**.
2. Select **Standard-Based Application**.
3. In the **Protocol** tab, configure the following:
- Enable the **Authorization Code** grant type.
- Set the access token type to **JWT**.
- Add `https://api.anthropic.com` as an **audience** for the access token.
- Set an authorized redirect URI (e.g., `https://example.com/callback`).
4. In the **Advanced** tab:
- Enable **App Native Authentication**.
5. Click **Save** and note down the **Client ID**.

## Step 3: Configure {{product_name}} as a Federation Issuer in Claude Console

Check warning on line 46 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Step 3: Configure {{product_name}} as a Federation Issuer in Claude Console' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Step 3: Configure {{product_name}} as a Federation Issuer in Claude Console' should use sentence-style capitalization.", "location": {"path": "en/includes/tutorials/agent-id-claude-authentication.md", "range": {"start": {"line": 46, "column": 4}}}, "severity": "INFO"}

1. In the Claude Console, go to **Settings > Workload Identity**.
2. Under **Issuers**, click **Add Issuer** and enter:
- **Issuer URL**: `{{ api_base_path }}/oauth2/token`
- **JWKS URL**: `{{ api_base_path }}/oauth2/jwks`
- **Name**: `{{product_name}}-agents`
3. Click **Save**.

## Step 4: Create a Service Account in Claude

1. In the Claude Console, go to **Settings > Service Accounts**.
2. Click **Create Service Account** and give it a descriptive name (e.g., `booking-agent`).
3. Add the service account to the workspace where it needs API access.
4. Note down the **Service Account ID** (format: `svac_...`).

## Step 5: Create a Federation Rule

1. In the Claude Console, go to **Settings > Workload Identity > Federation Rules**.
2. Click **Create Rule** and configure:
- **Issuer**: Select the `{{product_name}}-agents` issuer you created in Step 3.
- **Subject claim**: Set this to the Agent ID from {{product_name}} (the `sub` claim value in the JWT).
- **Audience**: `https://api.anthropic.com`
- **Service Account**: Select the service account you created in Step 4.
- **Token lifetime**: `600` seconds (10 minutes).
3. Enable the rule for the workspace(s) where the agent needs access.
4. Click **Save** and note down the **Federation Rule ID** (format: `fdrl_...`).

!!! note
If you enable the rule across multiple workspaces, you must include the `workspace_id` parameter in the token exchange request. Without it, Anthropic returns an error: `"rule is enabled for more than one workspace; pass workspace_id to choose one"`.

## Step 6: Authenticate Your Agent

With all the configuration in place, your agent can now authenticate and call the Claude API.

### Option A: Shell Script

This approach demonstrates the full flow using `curl` commands.

#### Phase 1: Obtain an Identity Token from {{product_name}}

The agent authenticates with {{product_name}} using the app-native authentication API. This is a redirect-free, API-driven flow that uses PKCE (RFC 7636) for security. The flow involves three API calls:

1. Initiate an authorize request with `response_mode=direct` and PKCE parameters.
2. Authenticate with the Agent ID and Secret via the `/authn` endpoint.
3. Exchange the resulting authorization code for a JWT access token.

For the complete walkthrough of this flow, see the [{{product_name}} documentation on AI agent authentication](/guides/agentic-ai/ai-agents/agent-authentication/#ai-agent-acting-on-its-own/).

The resulting `access_token` from {{product_name}} is a signed JWT that you will present to Claude's WIF.

#### Phase 2: Exchange the JWT for a Claude Access Token

Present the {{product_name}}-issued JWT to Anthropic's token endpoint:

```bash
ANTHROPIC_RESPONSE=$(curl -s https://api.anthropic.com/v1/oauth/token \
-H 'content-type: application/json' \
--data '{
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "'$JWT'",
"federation_rule_id": "fdrl_...",
"organization_id": "<your-anthropic-org-id>",
"service_account_id": "svac_...",
"workspace_id": "wrkspc_..."
}')

ACCESS_TOKEN=$(echo "$ANTHROPIC_RESPONSE" | jq -r .access_token)
```

#### Phase 3: Call the Claude API

Use the short-lived access token to make API calls:

```bash
curl -s https://api.anthropic.com/v1/messages \
-H "authorization: Bearer $ACCESS_TOKEN" \
-H 'anthropic-version: 2023-06-01' \
-H 'content-type: application/json' \
--data '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello, Claude"}]
}'
```

### Option B: Python SDK

For production agents, use the Anthropic Python SDK with the {{product_name}} Python SDK for automatic token management.

#### Install dependencies

```bash
pip install anthropic {{product_name}} {{product_name}}-ai
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify if there are product-specific Python SDK package names defined

# Check if there's a variable or configuration for Python package names
rg -n "product.*package|python.*sdk|pip.*install" en/asgardeo en/identity-server --type md -C2

Repository: wso2/docs-is

Length of output: 2314


🏁 Script executed:

#!/bin/bash

# First, find the target file
find . -name "agent-id-claude-authentication.md" -type f

# Then search for Python package definitions for both products
rg -n "from.*import|import.*" --type py -g "*asgardeo*" -g "*identity*server*" | head -30

# Look for pip install commands with actual package names
rg "pip install" --type md | grep -v "{{" | head -20

Repository: wso2/docs-is

Length of output: 4689


🏁 Script executed:

#!/bin/bash

# Search for Python SDK or package information in README or setup files
find . -name "pyproject.toml" -o -name "setup.py" -o -name "requirements.txt" | head -20

# Look for any documentation about Python package names
rg "wso2.*identity.*python|asgardeo.*python|pip.*wso2|pip.*asgardeo" --type md -i

Repository: wso2/docs-is

Length of output: 7295


🏁 Script executed:

#!/bin/bash

# Read the target file around line 139 to see the exact content
sed -n '130,150p' en/includes/tutorials/agent-id-claude-authentication.md

Repository: wso2/docs-is

Length of output: 546


🏁 Script executed:

#!/bin/bash

# Also check if this is a template file and how template variables are used elsewhere
head -20 en/includes/tutorials/agent-id-claude-authentication.md

# Check if there are any notes about template variables
rg "product_name.*package|product_name.*-ai" en/includes/tutorials/

Repository: wso2/docs-is

Length of output: 3261


🏁 Script executed:

#!/bin/bash

# Check if there are WSO2 Identity Server Python packages documented or referenced
rg "wso2.*identity.*python|wso2-identity" --type md -i | head -20

# Also check the agent-auth-py.md file for both products to see if they differ
echo "=== Asgardeo version ==="
cat en/asgardeo/docs/quick-starts/agent-auth-py.md | grep -A 5 "pip install" | head -10

echo "=== WSO2 Identity Server version ==="
cat en/identity-server/next/docs/quick-starts/agent-auth-py.md | grep -A 5 "pip install" | head -10

Repository: wso2/docs-is

Length of output: 5253


🏁 Script executed:

#!/bin/bash

# Read the agent-auth-py.md files to compare Asgardeo and WSO2 IS versions
echo "=== Checking Asgardeo agent-auth-py.md ===" 
grep -n "pip install" en/asgardeo/docs/quick-starts/agent-auth-py.md

echo ""
echo "=== Checking WSO2 Identity Server agent-auth-py.md ===" 
grep -n "pip install" en/identity-server/next/docs/quick-starts/agent-auth-py.md

# Check if the files are identical
echo ""
echo "=== File comparison ==="
diff en/asgardeo/docs/quick-starts/agent-auth-py.md en/identity-server/next/docs/quick-starts/agent-auth-py.md | head -50

Repository: wso2/docs-is

Length of output: 1017


🏁 Script executed:

#!/bin/bash

# The files are including a shared template, let's check that template file
echo "=== Checking shared template file ===" 
grep -n "pip install" en/includes/quick-starts/agent-auth-py.md

# Also check if the tutorial file (agent-id-claude-authentication.md) is similar
echo ""
echo "=== Checking if agent-id-claude-authentication.md is a shared template ===" 
ls -la en/includes/tutorials/agent-id-claude-authentication.md
ls -la en/asgardeo/docs/tutorials/agent-id-claude-authentication.md

# Check if the Asgardeo version includes the shared template
echo ""
echo "=== Checking Asgardeo claude tutorial ===" 
head -50 en/asgardeo/docs/tutorials/agent-id-claude-authentication.md | tail -20

Repository: wso2/docs-is

Length of output: 984


🏁 Script executed:

#!/bin/bash

# Check the WSO2 Identity Server version of the claude tutorial
echo "=== Checking WSO2 Identity Server claude tutorial ===" 
head -50 en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md

# Check what product_name is set to
echo ""
echo "=== Checking product_name settings ===" 
head -5 en/identity-server/next/docs/tutorials/agent-id-claude-authentication.md
head -5 en/asgardeo/docs/tutorials/agent-id-claude-authentication.md

Repository: wso2/docs-is

Length of output: 698


🏁 Script executed:

#!/bin/bash

# Verify if WSO2 Identity Server has Python SDK packages
# Search for any WSO2 IS Python package information
rg "wso2.*identity" en/includes/quick-starts/ --type md | grep -i python

# Also check PyPI or package registries referenced
rg "pypi|python.*package|wso2.*sdk" --type md | grep -v asgardeo | head -20

Repository: wso2/docs-is

Length of output: 1433


Fix Python package names to work with template variable substitution.

The installation command on line 139 uses {{product_name}} for Python package names. When expanded:

  • For Asgardeo: produces pip install anthropic Asgardeo Asgardeo-ai (should be lowercase asgardeo asgardeo_ai)
  • For WSO2 Identity Server: produces pip install anthropic WSO2 Identity Server WSO2 Identity Server-ai (invalid—spaces not allowed in package names)

The en/includes/quick-starts/agent-auth-py.md template uses hardcoded lowercase package names instead. Use the same approach here: either create product-specific Python SDK installation commands, or use dedicated template variables (e.g., {{python_package_name}} and {{python_ai_package_name}}) that resolve to asgardeo and asgardeo_ai for Asgardeo, and the appropriate WSO2 Identity Server package names for WSO2 IS.

🤖 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/tutorials/agent-id-claude-authentication.md` at line 139, The pip
install line uses {{product_name}} which expands to display names (with
capitals/spaces) and produces invalid Python package names; update the install
command in en/includes/tutorials/agent-id-claude-authentication.md to use proper
package identifiers (match en/includes/quick-starts/agent-auth-py.md) by
replacing the current line "pip install anthropic {{product_name}}
{{product_name}}-ai" with either product-specific lowercase package names (e.g.,
"pip install anthropic asgardeo asgardeo_ai" for Asgardeo) or introduce and use
new template variables like {{python_package_name}} and
{{python_ai_package_name}} that resolve to correct values for each product.

```

#### Complete example

```python
import asyncio
import time
from {{product_name}} import {{product_name}}Config
from {{product_name}}_ai import AgentAuthManager, AgentConfig
from anthropic import Anthropic, WorkloadIdentityCredentials

# {{product_name}} configuration
config = {{product_name}}Config(
base_url="{{ api_base_path }}",
client_id="<your-client-id>",
redirect_uri="<your-redirect-uri>",
)

# Agent credentials
agent_config = AgentConfig(
agent_id="<your-agent-id>",
agent_secret="<your-agent-secret>",
)


class {{product_name}}TokenProvider:
"""Provides identity tokens from {{product_name}} for Anthropic WIF.

Caches the token and refreshes automatically when expired.
The Anthropic SDK calls this provider whenever it needs a
new identity token for the WIF exchange.
"""

EXPIRY_BUFFER_SECONDS = 60

def __init__(self, {{product_name}}_config, agent_cfg, scopes=None):
self.{{product_name}}_config = {{product_name}}_config
self.agent_cfg = agent_cfg
self.scopes = scopes or ["openid", "profile"]
self._cached_token = None
self._token_expiry = 0

def __call__(self):
if self._is_token_valid():
return self._cached_token
return asyncio.run(self._refresh_token())

def _is_token_valid(self):
if self._cached_token is None:
return False
return time.time() < (
self._token_expiry - self.EXPIRY_BUFFER_SECONDS
)

async def _refresh_token(self):
async with AgentAuthManager(
self.{{product_name}}_config, self.agent_cfg
) as auth_manager:
agent_token = await auth_manager.get_agent_token(
self.scopes
)
self._cached_token = agent_token.access_token
self._token_expiry = (
time.time() + agent_token.expires_in
)
return self._cached_token


# Initialize the token provider and Anthropic client
token_provider = {{product_name}}TokenProvider(config, agent_config)

client = Anthropic(
credentials=WorkloadIdentityCredentials(
identity_token_provider=token_provider,
federation_rule_id="fdrl_...",
organization_id="<your-anthropic-org-id>",
service_account_id="svac_...",
workspace_id="wrkspc_...",
),
)

# Make an API call
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(message.content[0].text)
```

The `{{product_name}}TokenProvider` handles token caching and refresh with a 60-second buffer before expiry. The Anthropic SDK's `WorkloadIdentityCredentials` manages the Claude access token lifecycle independently, calling the provider whenever it needs a fresh identity token for the WIF exchange. Together, they allow long-running agents to operate continuously without manual token management.


Check failure on line 232 in en/includes/tutorials/agent-id-claude-authentication.md

View workflow job for this annotation

GitHub Actions / lint

Multiple consecutive blank lines

en/includes/tutorials/agent-id-claude-authentication.md:232 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
## What's Next

- Learn more about [{{product_name}} Agent Identity]({{base_path}}/guides/agentic-ai/ai-agents/).
- Secure agents access to [MCP Servers]({{base_path}}/guides/agentic-ai/mcp/)
Loading