Skip to content

Authenticate graded runs by workload identity federation - #15

Merged
danielholanda merged 2 commits into
mainfrom
dholanda/workload-identity-federation
Sep 9, 2026
Merged

danielholanda merged 2 commits into
mainfrom
dholanda/workload-identity-federation

Conversation

@danielholanda

@danielholanda danielholanda commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Lets a repo run these evals without keeping a model API key in its vault. Name an Anthropic federation rule and each graded job trades its own GitHub OIDC token for a short-lived Anthropic token; leave the new inputs blank and nothing about the key path changes.

jobs:
  skill-evals:
    permissions:
      contents: read
      id-token: write
    uses: amd/skillscope/.github/workflows/skill-evals.yml@v0.1.3
    with:
      api_key_secret: ""
      federation_rule_id: fdrl_...
      federation_organization_id: 00000000-0000-0000-0000-000000000000
      federation_service_account_id: svac_...

@danielholanda
danielholanda force-pushed the dholanda/workload-identity-federation branch from 37bacfc to f37d8bf Compare September 9, 2026 19:35
A graded job can now trade its own GitHub OIDC token for a short-lived
Anthropic token instead of reading a long-lived key out of a secret, so a
repo running these evals need not keep a model key in its vault at all.

Name a federation rule with the new `federation_*` inputs, or
`scoped_federation_*` for the gated pool, which has its own budget, and the
job federates; leave them blank and nothing changes. The resolver moves out
of three copies of an inline `run:` block and into
`skillscope/credentials.py`, where it is tested.

The three jobs that resolve a credential no longer declare permissions of
their own, so they run with what the caller granted: `contents: read` keeps
them read-only as before, and adding `id-token: write` is what enables
federation. Declaring `id-token: write` here instead would fail every caller
that had not granted it, at startup, federating or not. The other three jobs
stay pinned to `contents: read`.

Federation is refused alongside `api_base_url` or `api_custom_headers`: the
minted token only authenticates at api.anthropic.com, so a gateway leg keeps
its key rather than failing halfway through a paid run.

Co-authored-by: Cursor <cursoragent@cursor.com>
@danielholanda
danielholanda force-pushed the dholanda/workload-identity-federation branch from f37d8bf to 2c247c3 Compare September 9, 2026 19:37
Removed outdated information regarding federation limits and token usage.
@danielholanda
danielholanda merged commit 60197e6 into main Sep 9, 2026
5 checks passed
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.

1 participant