Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.12 backport] util/resolver: Perform Insecure HTTPS + HTTP fallback in one docker.RegistryHost #4300

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Oct 3, 2023

If both Insecure and PlainHTTP is requested for the host, use a
transport that falls back to HTTP in case of an HTTP request to a HTTPS
client error.

This also changes the order - before that an HTTP connection was
attempted first. Now an HTTPS connection with insecure TLS check will be
attempted first and will only fallback to HTTP if the former fails.

This fixes push to an insecure HTTPS-only registry.

If both Insecure and PlainHTTP is requested for the host, use a
transport that falls back to HTTP in case of an HTTP request to a HTTPS
client error.

This also changes the order - before that an HTTP connection was
attempted first. Now an HTTPS connection with insecure TLS check will be
attempted first and will only fallback to HTTP if the former fails.

This fixes push to an insecure HTTPS-only registry.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 1096d71)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
It's no longer needed to return multiple hosts.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit baf7c09)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the http-fallback-insecure-host-0.12 branch from f8d12a1 to bc12a9c Compare October 3, 2023 10:42
@jedevc jedevc added this to the v0.12.3 milestone Oct 3, 2023
@tonistiigi tonistiigi merged commit 438f472 into moby:v0.12 Oct 19, 2023
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants