add support for cargo auth-required in accordance with RFC #3139#50
Draft
fMeow wants to merge 1 commit intomoriturus:developfrom
fMeow:feat/auth-required
Draft
add support for cargo auth-required in accordance with RFC #3139#50fMeow wants to merge 1 commit intomoriturus:developfrom fMeow:feat/auth-required
auth-required in accordance with RFC #3139#50fMeow wants to merge 1 commit intomoriturus:developfrom
fMeow:feat/auth-required
Conversation
gagbo
reviewed
Feb 12, 2023
Collaborator
gagbo
left a comment
There was a problem hiding this comment.
That looks pretty cool, thanks a lot for that! I'd like to have integration tests to be sure that there are no regressions, but I don't really have time for that now, so I might just merge as is really.
I only added a few nitpicky comments, feel free to ignore those
| db-sled = ["sled"] | ||
| db-redis = ["redis"] | ||
| db-mongo = ["mongodb", "bson"] | ||
| auth-required = [] |
Collaborator
There was a problem hiding this comment.
I think we should name the feature registry-auth instead
| .read() | ||
| .await | ||
| .user_id_for_token(&token) | ||
| .map_err(|_| Error::InvalidToken(token.clone())) |
Collaborator
There was a problem hiding this comment.
It could be cool to add the WWW-Authenticate header on rejection here
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.
Add a feature gate
auth-requiredto require authorization for downloading crates, searching crates, getting crate owner.