Commit Graph

12 Commits

Author SHA1 Message Date
Milos Gajdos
6ae29aadd7 internal/client/auth/challenge: cleanups and minor refactor (#4832) 2026-04-12 16:09:55 -07:00
1seal
f215e513de proxy: bind bearer realms to upstream trust boundary
bind proxy-mode bearer realms to the upstream trust boundary before sending credentials, move challenge filtering behind the auth manager, and use golang.org/x/net/publicsuffix for registrable-domain handling.
2026-03-30 18:27:47 +03:00
Sebastiaan van Stijn
3c670635c2 internal/client/auth/challenge: fix minor linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-28 17:47:03 +01:00
Sebastiaan van Stijn
055cc71b4e internal/client/auth/challenge: cleanup URL-normalization
- change normalizeURL to not mutate the input URL.
- move lowercasing into canonicalAddr.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-28 17:46:02 +01:00
Sebastiaan van Stijn
a35ff435a6 internal/client/auth/challenge: simpleManager: make zero value usable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-28 17:09:35 +01:00
Sebastiaan van Stijn
069947f6fd internal/client/auth/challenge: simpleManager: un-export fields
Un-export the mutex and Challenges field.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-28 17:09:04 +01:00
Sebastiaan van Stijn
775d3734eb modernize code
Automated fixing, using Go's "modernize" tool;

    go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
    modernize -fix ./...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-02-12 18:28:58 +01:00
whosehang
fea3638384 refactor: replace map iteration with maps.Copy/Clone
Signed-off-by: whosehang <whosehang@outlook.com>
2025-05-03 09:24:10 +08:00
Milos Gajdos
a940e61623 Fix silly testing format mistakes
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2024-08-30 11:18:18 +01:00
guoguangwu
a4918b67bb fix: typo
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-03-04 11:00:08 +08:00
Milos Gajdos
d8ff41a344 cleanup: move init funcs to the top of the source
We make sure they're not hiding at the bottom or in the middle
which makes debugging an utter nightmare!

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-28 06:50:48 +00:00
Cory Snider
cc23fdacff Move registry client internal
Our registry client is not currently in a good place to be used as the
reference OCI Distribution client implementation. But the registry proxy
currently depends on it. Make the registry client internal to the
distribution application to remove it from the API surface area (and any
implied compatibility promises) of distribution/v3@v3.0.0 without
breaking the proxy.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-10-24 12:26:38 -04:00