Skip to content

Add GitHubActionsCredentials to sign in to a Github Actions job without a stored token - #125

Open
techflare641 wants to merge 1 commit into
prooflinedev:mainfrom
techflare641:github-actions-oidc
Open

techflare641 wants to merge 1 commit into
prooflinedev:mainfrom
techflare641:github-actions-oidc

Conversation

@techflare641

Copy link
Copy Markdown

No description provided.

…ut a stored token

A job granted `id-token: write` can now read its repository's reviews from
the SDK with no PROOFLINE_TOKEN secret, as `proofline ci review` does. The
runner signs an OIDC token for the job and Proofline exchanges it for a
one-hour token that reads only that repository's reviews.

`GitHubActionsCredentials.exchange()` performs the exchange and names the
repository's organization. Passed as a client's `token`, the credentials
supply each request attempt's token and renew it five minutes before it
expires, or at half its lifetime when that is shorter, with a new runner
identity and the same pull request head. Concurrent requests share one
renewal. A refused renewal, or one that names another organization, fails
the request instead of sending the earlier token.

The credentials are sent only to the origin that issued them. The runner
request and the exchange are each sent once, follow no redirect, and keep
the runner's bearer, the OIDC token and the exchanged token out of errors
and printed output. A job without `id-token: write` is told so before any
request, and a runner that issues no token is told apart from a Proofline
refusal by the `urn:proofline:sdk:github-actions` type.

This branch has not been deployed

No deployments
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