remotes: add handling for missing basic auth credentials#9234
Merged
mikebrow merged 1 commit intocontainerd:mainfrom Oct 13, 2023
Merged
remotes: add handling for missing basic auth credentials#9234mikebrow merged 1 commit intocontainerd:mainfrom
mikebrow merged 1 commit intocontainerd:mainfrom
Conversation
0952bf4 to
f796037
Compare
thaJeztah
approved these changes
Oct 13, 2023
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM
one nit/suggestion, but definitely not a blocker
When a credential handler is provided but no basic auth credentials are provided, handle the error specifically rather than treating the credentials as not implemented. This allows a clearer error to be provided to users rather than a confusing not implemented error or generic unauthorized error. Add unit tests for the basic auth case. Signed-off-by: Derek McGowan <[email protected]>
f796037 to
51c9ffe
Compare
mikebrow
approved these changes
Oct 13, 2023
Member
mikebrow
left a comment
There was a problem hiding this comment.
LGTM .. just a nit on the new error msg to possibly include what portion of the cred was missing user or secret
estesp
approved these changes
Oct 13, 2023
This was referenced Oct 14, 2023
kiashok
added a commit
to kiashok/containerd
that referenced
this pull request
Oct 23, 2024
…h upstream containerd/main update fork-external/main branch to upstream containerd/main at commit f90f80d Related work items: containerd#8736, containerd#8861, containerd#8924, containerd#8934, containerd#9027, containerd#9076, containerd#9104, containerd#9118, containerd#9141, containerd#9155, containerd#9177, containerd#9183, containerd#9184, containerd#9186, containerd#9187, containerd#9191, containerd#9200, containerd#9205, containerd#9211, containerd#9214, containerd#9215, containerd#9221, containerd#9223, containerd#9228, containerd#9231, containerd#9234, containerd#9242, containerd#9246, containerd#9247, containerd#9251, containerd#9253, containerd#9254, containerd#9255, containerd#9268
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.
When a credential handler is provided but no basic auth credentials are provided, handle the error specifically rather than treating the credentials as not implemented. This allows a clearer error to be provided to users rather than a confusing not implemented error or generic unauthorized error.
Currently there is no way for the caller to know why the authorization did not work since only the registry's unhandled authorization error is returned. This handles cases where either a user has provided a credential handler but has no saved logins or has token secrets but the registry requested basic auth.
Add unit tests for the basic auth case.