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
Document PyPI's protections against resurrection attacks #13720
Conversation
Signed-off-by: Andrew Pan <a@tny.town>
To solve this issue, PyPI worked with GitHub to add the `repository_owner_id` | ||
claim to OIDC tokens. This claim attests to the ID of the repository owner, | ||
which is stable and permanent unlike usernames. When a trusted publisher is | ||
configured, PyPI looks up the configured username's ID and stores it. During | ||
API token minting, PyPI checks the `repository_owner_id` claim against the | ||
stored ID and fails if they don't match. Through this process, only the original | ||
GitHub user remains authorized to publish to their PyPI projects, even if they | ||
change their username or delete their account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need the specific history here 🙂 -- we can just say "for GitHub-based publishers, PyPI always checks the repository_owner_id
claim, since ..."
A few small nits, otherwise LGTM! |
Signed-off-by: Andrew Pan <a@tny.town>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
See #13469.