Skip to content

ci: authenticate to chainguard libraries with short-lived oidc tokens#28

Merged
mbarretta merged 1 commit into
mainfrom
ci/libraries-oidc-auth
Jul 20, 2026
Merged

ci: authenticate to chainguard libraries with short-lived oidc tokens#28
mbarretta merged 1 commit into
mainfrom
ci/libraries-oidc-auth

Conversation

@mbarretta

Copy link
Copy Markdown
Owner

CI has been failing since pyproject.toml switched Python resolution to libraries.cgr.dev — the workflows had no credentials for the index (401 from uv sync).

This wires up short-lived, OIDC-federated auth instead of a long-lived pull token:

  • A Chainguard assumable identity (forge-ci-libraries, role libraries.python.pull only) is bound to this repo's GitHub Actions OIDC issuer; its ID is stored as the CHAINCTL_IDENTITY secret (Actions + Dependabot stores).
  • Each uv sync job assumes the identity via chainguard-dev/setup-chainctl, mints a short-lived token with chainctl auth token --audience=libraries.cgr.dev, and exposes it to uv via UV_INDEX_CHAINGUARD_USERNAME/PASSWORD (masked).
  • id-token: write added per job; no long-lived secrets anywhere.

Verified locally: uv lock --check resolves against the index using only the minted token (netrc isolated).

🤖 Generated with Claude Code

@mbarretta
mbarretta merged commit d3f9ddd into main Jul 20, 2026
8 of 12 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