-
Notifications
You must be signed in to change notification settings - Fork 996
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
Trusted Publishers doesn't accept JWTs from github.com when iss
customisation is enabled
#17700
Comments
Thanks for the issue, this is indeed similar to #15838 in that we don't support arbitrary issuers and probably won't in the future (there is a good explanation of why here). I think this is different, however, since the issuer is still the Given that, I think we could let users optionally provide a value for (cc @woodruffw for thoughts as well) |
Thanks for the ping @di! Yeah, I agree we can probably handle this case, since it's not "really" a custom OIDC issuer, just a namespacing customization of one we already understand 🙂 One hiccup in terms of handling this is the JWKS updating/synchronization logic: right now we have a hardcoded suite of supported OIDC issuers, with fixed issuer URLs: warehouse/warehouse/oidc/__init__.py Lines 31 to 67 in 858a9de
Those URLs are used to key into the appropriate service when verifying JWTs, so we'd probably need a bit of customization/dynamization to handle these kinds of enterprise-suffixed issuers. warehouse/warehouse/oidc/views.py Lines 143 to 144 in 858a9de
|
Describe the bug
Using GitHub Actions on github.com on an organisation that's customised the enterprise's
issuer
value causes PyPI to refuse release uploads with the reason:Expected behavior
PyPI should accept JWTs from github.com where
iss
customisation is enabled, or should allow specifying an enterprise slug when Adding a Trusted Publisher to an Existing PyPI project.To Reproduce
Trusted publishing exchange failure
: https://github.com/Skyscanner/pycfmodel/actions/runs/13563626065My Platform
pypa/gh-action-pypi-publish@release/v1
for GitHub Actions, on github.com Enterprise CloudAdditional context
Customizing the issuer value for an enterprise changes the OIDC JWT
iss
value for all repos/orgs in the enterprise to include the enterprise slug, which is often different from the organisation slug (and afaik can't be publicly determined).For example, our
iss
value on https://github.com/Skyscanner changed fromhttps://token.actions.githubusercontent.com
tohttps://token.actions.githubusercontent.com/skyscanner
.Note these happen to have the same
jwks_uri
as uncustomised/regular JWTs from github.jparrowsec.cn.iss
value to our PyPI account)The text was updated successfully, but these errors were encountered: