Repository navigation
Only request the CI token for the configured OIDC audience - #247
Merged
Merged
Conversation
Workload Identity asked the CI provider for a token with whatever
audience GET /oidc/audience returned. The provider issues a token for any
audience, so a configured API that isn't Hex.pm, or anyone in the middle
of a plain HTTP one, could choose the audience of another service that
trusts the job, such as sts.amazonaws.com, and receive a token that
service accepts.
The new workload_identity_audience config option, hexpm by default, is
the only audience requested. An API advertising another one gets
{error, {oidc_audience_not_allowed, Audience}}.
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.
Workload Identity asked GitHub for an OIDC token with whatever audience
GET /api/oidc/audiencereturned. GitHub issues a token for any audience, so a configured API that isn't Hex.pm, or anyone in the middle of a plain HTTP one, could pick the audience of another service that trusts the job, such assts.amazonaws.com, and receive a token that service accepts.The new
workload_identity_audienceconfig option,hexpmby default, is the only audience hex_core requests a token for. An API that advertises another one gets{error, {oidc_audience_not_allowed, Audience}}before any token is requested. Hex vendors hex_core, so it picks this up the next timescripts/vendor_hex_core.shruns.