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:
invalid-payload: unknown trusted publishing issuer
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
- Follow https://docs.pypi.org/trusted-publishers/adding-a-publisher/ to use a Trusted Publisher for uploads to PyPI with GitHub Actions
- [Customise] the issuer value for an enterprise
- Observe a
Trusted publishing exchange failure: https://github.com/Skyscanner/pycfmodel/actions/runs/13563626065
My Platform
pypa/gh-action-pypi-publish@release/v1 for GitHub Actions, on GitHub.com Enterprise Cloud
Additional 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 from https://token.actions.githubusercontent.com to https://token.actions.githubusercontent.com/skyscanner.
Note these happen to have the same jwks_uri as uncustomised/regular JWTs from GitHub.com.
Describe the bug
Using GitHub Actions on GitHub.com on an organisation that's customised the enterprise's
issuervalue causes PyPI to refuse release uploads with the reason:Expected behavior
PyPI should accept JWTs from GitHub.com where
isscustomisation 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/v1for GitHub Actions, on GitHub.com Enterprise CloudAdditional context
Customizing the issuer value for an enterprise changes the OIDC JWT
issvalue 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
issvalue on https://github.com/Skyscanner changed fromhttps://token.actions.githubusercontent.comtohttps://token.actions.githubusercontent.com/skyscanner.Note these happen to have the same
jwks_urias uncustomised/regular JWTs from GitHub.com.issvalue to our PyPI account)