-
Notifications
You must be signed in to change notification settings - Fork 647
controllers/krate/publish: Add support for Trusted Publishing access tokens #11294
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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.
A couple of non-binding suggestions, but LGTM in general. I like the new trustpub
test, in particular! :+1
🙋 I was wondering if we could use the creator of the trustpub config as |
I think that could be misleading, since it is not the person that triggered the release itself. It might be possible to figure out the releaser from the |
🙋 Another question came up. I noticed that only the regular (non-TrustPub) AuthType requires a verified email for publishing, while the TrustPub AuthType does not seem to require this. Would it be bad to ensure email is verified before creating a trustpub config? |
yeah, we should probably implement that 👍 |
When "Trusted Publishing" is used we can no longer associate the release with a specific crates.io user account. The column is already nullable since old releases did not track the information, so there are no changes needed on the database side.
🙋 A random question just came to mind. IIUC, the supported issuer is checked during the key exchange stage. This means that once they've exchanged the token, they can then ensure to publish a new version with it this time, even if we were to roll back support for this issuer right after the exchange, right? |
yes, that's how it's currently implemented. I guess if we wanted to change that we would need back-references from the temporary tokens to their configurations (i.e. one nullable column per provider?) and set them to "on delete cascade". |
This is the last major missing puzzle piece for the Trusted Publishing backend work: the ability to use temporary access tokens to publish new versions of crates.
Related:
PUT /api/v1/trusted_publishing/github_configs
API endpoint #11113PUT /api/v1/trusted_publishing/tokens
API endpoint #11131