-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds support for handing Github's OIDC tokens in addition to Google and SPIFFE. Github OIDC tokens look something like: ```json { "jti": "0687e989-80d6-42b0-a498-c65e99315f37", "sub": "repo:mattmoor/stupid-example:ref:refs/heads/main", "aud": "sigstore", "ref_protected": "false", "job_workflow_ref": "mattmoor/stupid-example/.github/workflows/my-action.yaml@refs/heads/main", "iss": "https://vstoken.actions.githubusercontent.com", "nbf": 1631210221, "exp": 1631211121, "iat": 1631210821 } ``` This change verifies things against the `iss` endpoint, and encodes the `job_workflow_ref` into the x509 cert as a URI by prefixing it as: ``` https://github.com/{job_workflow_ref} ``` I verified this works with a local Fulcio setup and some identity tokens I exfiltrated from actions for the test. The major caveat was that I had to tweak more than I'd have liked to for my test because things currently use the v1beta1 API, and I had to rejigger things to use v1 for my local test. I chatted a bunch with `@dlorenc` about v1 migration, and the major concern is the backwards compatibility with the current Fulcio cert, so these changes have those pieces backed out.
- Loading branch information
Showing
5 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters