Skip to content

Use workload identity federation for Claude auth in issue triage#335

Merged
ashwin-ant merged 1 commit into
mainfrom
ci-wif-auth
May 22, 2026
Merged

Use workload identity federation for Claude auth in issue triage#335
ashwin-ant merged 1 commit into
mainfrom
ci-wif-auth

Conversation

@ashwin-ant

Copy link
Copy Markdown
Collaborator

What

Switches the issue triage workflow from the static ANTHROPIC_API_KEY secret to Workload Identity Federation: the workflow's GitHub OIDC token is exchanged for a short-lived Claude API access token at runtime, so no long-lived API key needs to be stored in the repository.

issue-triage.yml is the only workflow in this repository that uses secrets.ANTHROPIC_API_KEY. The change replaces the anthropic_api_key input with the federation inputs and adds id-token: write to the job's permissions so the workflow can mint an OIDC token.

This is the same feature claude-code-action ships for its users (anthropics/claude-code-action#1338, docs/setup.md).

How it activates

The federation rule, organization, and service account IDs are read from repository variables (vars.ANTHROPIC_FEDERATION_RULE_ID, vars.ANTHROPIC_ORGANIZATION_ID, vars.ANTHROPIC_SERVICE_ACCOUNT_ID). These are identifiers, not credentials. Until a repo admin sets them, the action fails fast at env validation with a clear "authentication required" message — so this PR is safe to merge ahead of that, and switching over is a settings change rather than another PR.

The ANTHROPIC_API_KEY secret is intentionally left in place until the federated path has produced green runs; rollback is reverting this PR.

MaxLeiter
MaxLeiter previously approved these changes May 22, 2026
The federation rule, organization, and service account IDs are read from repository variables instead of a static API key secret.
@ashwin-ant ashwin-ant merged commit c15f6e2 into main May 22, 2026
1 check passed
@ashwin-ant ashwin-ant deleted the ci-wif-auth branch May 22, 2026 23:00

@km-anthropic km-anthropic 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.

:shipit:

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.

3 participants