feat(): add support for github provided jwt auth#257
Merged
Conversation
imthaghost
self-requested a review
September 24, 2021 23:20
added 3 commits
September 27, 2021 15:58
- Update README - Switch to use `getIDToken` method for Github token retrieval - Bump `@actions/core` to 1.6.0 - Add `jwtGithubAudience` input - Remove unnecessary code
fix: get token via `@actions/core`
imthaghost
reviewed
Oct 5, 2021
blz-ea
commented
Oct 5, 2021
imthaghost
approved these changes
Oct 5, 2021
tvoran
reviewed
Oct 6, 2021
tvoran
left a comment
Member
There was a problem hiding this comment.
This is looking great! Left a couple of thoughts.
It would also be great if you could remove the changes to dist/index.js since we typically don't update that file until we do a release.
And it would be even better if this could be tested in the integrationTests, similar to the regular jwt auth.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add support for Github provided JWT
Example Usage
Example Github provided JWT
Example JWT Auth Config
{ "jwt_validation_pubkeys" : [ "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzW2j18tSka65aoPgmyk7\naUkYE7MmO8z9tM/HoKVJ+w/alYIknkf7pgBeWWfqRgkRfmDuJa8hATL20+bD9cQZ\n8uVAG1reQfIMxqxwt3DA6q37Co41NdgZ0MUTTQpfC0JyDbDwM/ZIzis1cQ1teJcr\nPBTQJ3TjvyBHeqDmEs2ZCmGLuHZloep8Y/4hmMBfMOFkz/7mWH7NPuhOLWnPTIKx\nnMuHl4EVdNL6CvIYEnzF24m/pf3IEM84vszL2s6+X7AbFheZVig8WqhEwiVjbUVx\nXcY4PtbK0z3jhgxcpjc6WTH0JlRedpq2ABowWZg+pxOoWZUAETfj6qBlbIn/F9kp\nyQIDAQAB\n-----END PUBLIC KEY-----" ], "bound_issuer": "https://vstoken.actions.githubusercontent.com" }Example JWT Role
{ "role_type": "jwt", "bound_audiences": [ "sigstore" ], "policies": [ "github-action" ], "token_explicit_max_ttl": 60, "bound_claims": { "repository": "*" }, "subject_claim": "repository", "groups_claim": "sha", "user_claim": "actor", "bound_claims_type": "glob" }Notice: Based on unreleased Github feature