Uh oh!
There was an error while loading. Please reload this page.
cli/config/credentials: ConvertToHostname: handle IP-addresses - #5196
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## master #5196 +/- ##
=======================================
Coverage 61.43% 61.43% =======================================
Files 298 298 Lines 20799 20799 =======================================
Hits 12777 12777 Misses 7109 7109 Partials 913 913 |
vvoland
commented
Jun 26, 2024
Needs a rebase |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
92bb506 to
8b0a7b0ComparethaJeztah
commented
Jun 26, 2024
Rebased; I also removed the cherry-pick label for now, as this was not the previous handling of these, so perhaps OK for the next release. |
The implementation before #3599 only removed the cli/vendor/github.com/docker/docker/registry/auth.go Lines 130 to 142 in 94e9aa6 So IMO we should still cherrypick this. |
So this function is to normalise hosts, in order to lookup which credentials to use if they're present in There's some existing weird behavior where we treat AFAIK, the intent was always to store credentials per hostname, which is why URLs are trimmed (i.e. no separate credentials for That, hmmm, also brings up the other topic; ambiguous port numbers, because And to add to the fun, some credential helpers require a scheme in order to store credentials, and because we want to precent credentials that were stored for a TLS host to be sent to a non-TLS host (with the same name), we use 🫠 🫠 🫠 🫠 TL;DR we need to better define how these must be normalised to prevent ambiguity. |
vvoland
commented
Jun 26, 2024
Without this PR, we're still not doing the same thing as before #3599. Consider Before we would correctly return the If that host was stored on pre v27 versions, it would be stored as |
thaJeztah
commented
Jun 26, 2024
OH!! Now I get it. Sorry, I'm slow. So yes, the Yes, in that case we should take this one for 27.0.2 as well |
thaJeztah
commented
Jun 26, 2024
Prepared a backport; #5198 |
- What I did
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)