containerd/remotes/docker
Derek McGowan 466ee870d5
Check scheme and host of request on push redirect
When the HTTP fallback is used, the scheme changes from HTTPS to HTTP
which can cause a mismatch on redirect, causing the authorizer to get
stripped out. Since the redirect host must match the redirect host in
this case, credentials are only sent to the same origin host that
returned the redirect.

This fixes an issue for a push getting a 401 unauthorized on the PUT
request even though credentials are available.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-25 08:47:22 -07:00
..
auth Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
config remotes: always try to establish tls connection when tls configured 2023-10-02 15:29:11 -07:00
schema1 Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
authorizer.go remotes: add handling for missing basic auth credentials 2023-10-13 12:42:19 -07:00
converter_fuzz.go Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
converter.go remotes: use mediatype helpers 2023-09-27 13:12:51 -06:00
errcode.go docs: Various typo found by codespell 2020-12-22 13:22:16 +08:00
errdesc.go Add distribution subpkgs to core 2019-10-07 13:38:12 -04:00
fetcher_fuzz.go replace reference/docker for github.com/distribution/reference v0.5.0 2023-08-31 15:54:50 +02:00
fetcher_test.go removes/docker: replace some fmt.Sprintfs with strconv 2023-08-23 10:10:59 +02:00
fetcher.go remotes: use mediatype helpers 2023-09-27 13:12:51 -06:00
handler_test.go labels: Add LabelDistributionSource 2023-03-08 10:01:58 +01:00
handler.go Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
httpreadseeker.go Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
pusher_test.go Check scheme and host of request on push redirect 2023-10-25 08:47:22 -07:00
pusher.go Check scheme and host of request on push redirect 2023-10-25 08:47:22 -07:00
registry_test.go Use net.IP.IsLoopback() to match loopback addresses 2021-03-15 09:57:01 +05:30
registry.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
resolver_test.go remotes: add handling for missing basic auth credentials 2023-10-13 12:42:19 -07:00
resolver.go Merge pull request #8861 from jedevc/docker-resolver-relevant-error 2023-10-03 10:40:52 -04:00
scope_test.go Use testify 2022-04-01 18:17:58 -07:00
scope.go fix empty scopes return 2022-01-20 15:16:44 +08:00
status.go remotes/docker: Add MountedFrom and Exists push status 2023-04-07 10:38:37 +02:00