Add tutorial: Claude Workload Identity integration with Agent ID#6132
Add tutorial: Claude Workload Identity integration with Agent ID#6132ayshsandu wants to merge 10 commits into
Conversation
📝 WalkthroughWalkthroughThis PR adds a new tutorial documenting how agents registered in identity products can authenticate to Claude API using Anthropic Workload Identity Federation. The shared tutorial content provides setup steps, prerequisites, and two implementation examples (shell script and Python SDK), deployed across Asgardeo and Identity Server versions with product-specific configuration variables. ChangesAgent ID to Claude API Authentication Tutorial
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
en/identity-server/7.3.0/mkdocs.yml (1)
1001-1001: ⚡ Quick winUse sentence case and a shorter nav title for readability.
This title is long and title-cased. Consider sentence case with a shorter phrasing to improve scanability in the Tutorials menu.
✏️ Suggested wording
- - Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md + - Authenticate agents with Agent ID using Claude API workload identity federation: tutorials/agent-id-claude-authentication.mdAs per coding guidelines "Use sentence case for all headings and document titles" and "Use plain language and short sentences".
🤖 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/7.3.0/mkdocs.yml` at line 1001, Replace the long, title-cased nav entry "Authenticate Agents with their own Agent ID to Claude API Using Workload Identity Federation: tutorials/agent-id-claude-authentication.md" with a shorter, sentence-case label while keeping the same target path; for example use "Authenticate agents to Claude API using workload identity federation" (or even shorter "Authenticate agents to Claude API") in the mkdocs nav so it follows the sentence case and plain-language guidelines and improves scanability.
🤖 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/asgardeo/docs/tutorials/index.md`:
- 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.
In `@en/asgardeo/mkdocs.yml`:
- 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").
In `@en/identity-server/next/docs/tutorials/index.md`:
- 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.
In `@en/identity-server/next/mkdocs.yml`:
- 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.
In `@en/includes/tutorials/agent-id-claude-authentication.md`:
- 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.
- 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.
---
Nitpick comments:
In `@en/identity-server/7.3.0/mkdocs.yml`:
- Line 1001: Replace the long, title-cased nav entry "Authenticate Agents with
their own Agent ID to Claude API Using Workload Identity Federation:
tutorials/agent-id-claude-authentication.md" with a shorter, sentence-case label
while keeping the same target path; for example use "Authenticate agents to
Claude API using workload identity federation" (or even shorter "Authenticate
agents to Claude API") in the mkdocs nav so it follows the sentence case and
plain-language guidelines and improves scanability.
🪄 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
Run ID: d28edc67-153c-4201-8bff-79d16511ae4f
📒 Files selected for processing (13)
en/asgardeo/docs/tutorials/agent-id-claude-authentication.mden/asgardeo/docs/tutorials/index.mden/asgardeo/mkdocs.ymlen/identity-server/7.2.0/docs/tutorials/agent-id-claude-authentication.mden/identity-server/7.2.0/docs/tutorials/index.mden/identity-server/7.2.0/mkdocs.ymlen/identity-server/7.3.0/docs/tutorials/agent-id-claude-authentication.mden/identity-server/7.3.0/docs/tutorials/index.mden/identity-server/7.3.0/mkdocs.ymlen/identity-server/next/docs/tutorials/agent-id-claude-authentication.mden/identity-server/next/docs/tutorials/index.mden/identity-server/next/mkdocs.ymlen/includes/tutorials/agent-id-claude-authentication.md
Co-authored-by: Pavindu Lakshan <pavindulakshan@gmail.com>
Co-authored-by: Pavindu Lakshan <pavindulakshan@gmail.com>
Co-authored-by: Pavindu Lakshan <pavindulakshan@gmail.com>
| - [Secure Spring Boot API with WSO2 Identity Platform]({{base_path}}/tutorials/secure-spring-boot-api/) | ||
| - [Integrate WSO2 Identity Platform with SMART on FHIR healthcare apps]({{base_path}}/tutorials/smart-on-fhir/) | ||
| - [Secure Agentic AI Systems with WSO2 Identity Platform]({{base_path}}/tutorials/secure-agentic-ai-systems/) | ||
| - [Authenticate AI Agents with WSO2 Agent ID to Claude API Using Workload Identity Federation]({{base_path}}/tutorials/agent-id-claude-authentication/) |
There was a problem hiding this comment.
This title is stacked and not quite scannable. shall we make it shorter? I think the focus is on WSO2 Agent ID so shall we do
"Authenticate AI Agents to the Claude API with WSO2 Agent ID"
| @@ -0,0 +1,233 @@ | |||
| # Authenticate AI Agents with WSO2 Agent ID to Claude API Using Workload Identity Federation | |||
|
|
|||
| 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. | |||
There was a problem hiding this comment.
| 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. | |
| 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}}, receive a signed JWT, exchange it for a short-lived Claude access token, and make API calls without any static API keys. |
| - `curl` and `jq` installed on your machine (for the shell-based approach). | ||
| - Python 3.9+ (for the SDK-based approach). | ||
|
|
||
| ## Step 1: Register your AI Agent in {{product_name}} |
There was a problem hiding this comment.
Each step can benefit from having a small description as to why we are doing each step. Shall we do that?
Purpose
Add tutorial: Clade Workload Identty integration with Agent ID