-
Notifications
You must be signed in to change notification settings - Fork 85
be able to fetch Installation Token using a BYO JWT #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
just so that I understand, you would like an alternative API that accepts a JWT instead of the app Client ID and private key? That's an interesting idea. But note that JWTs are very short lived, only 10 minutes I think. |
Yes I want to provide a JWT. (The app ID is referenced inside the claim data, while the Private Key is stored within a security-hardened secrets store such as Hashicorp Vault) In my view, the short-lived expiration isn't a concern, because all of this is happening within one GH Actions flow.
Why is this compelling
|
It's just one step, the JWT is used to retrieve the installation access token. Since this will be just a single request, maybe you can use a simple action like this? I do like your use case and agree with the additional security, I just don't want to commit to adding the feature outright, I'll review it with @parkerbxyz on Thursday. If you like, please feel free to get a pull request started, it would make a great base of discussion for us to see what the additional complexity to support a direct JWT input would entail |
Just sharing some thoughts A good first step might be to create an @octokit authentication strategy that accepts a JWT. It should implement the installation authentication part of @octokit/auth-app as well as JWT authentication. It should clearly document the tradeoff: increased security by not requiring the private key at the cost of the inconvenience that the JWT is only valid for 10 minutes without the ability to create a new one. If we decide to use that strategy within this action, it should be an official authentication strategy hosted in the @octokit org on GitHub. Another thing we could do is to extract the logic to create installation access tokens form Last thought is that we should consider re-using the |
@gr2m I appreciate your continued thinking on the topic. I'd like to share one point in response:
I don't agree with this characterization of "without the ability to create a new one".
|
Unfortunately, I don't have the coding skills to contribute the change directly. I would if I could! |
Story
Given that credentials can be leaked from GitHub actions accidentally or intentionally by a variety of means
As a security-conscious GHA workflow owner
When there is a Requirement to use a high-privileged GitHub App in a workflow
I need a way to put only short-lived, easy to rotate creds into the workflow context
so that if the cred is leaked, the risk of exploitation is time-bound and easier to contain/respond to
Scenario
Priority Level
The text was updated successfully, but these errors were encountered: