[release/1.6] remotes: add handling for missing basic auth credentials#9236
Merged
estesp merged 3 commits intocontainerd:release/1.6from Oct 17, 2023
Merged
Conversation
laurazard
approved these changes
Oct 16, 2023
Member
|
This failure (on Windows) looks like it may be related? Are we missing a patch somewhere in this branch? |
Signed-off-by: Fabian Hoffmann <[email protected]> (cherry picked from commit 894e780) Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Fabian Hoffmann <[email protected]> (cherry picked from commit b90c466) Signed-off-by: Derek McGowan <[email protected]>
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]> (cherry picked from commit 51c9ffe) Signed-off-by: Derek McGowan <[email protected]>
Member
Author
|
I should pull in #6617 to fix the tests |
f5ac51d to
e529741
Compare
Member
|
Should be fine now? Maybe we can get it merged. |
estesp
approved these changes
Oct 17, 2023
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.
Add unit tests for the basic auth case.
Backport #9234
(cherry picked from commit 51c9ffe)