Skip to content

remotes: always try to establish tls connection when tls configured#9182

Merged
fuweid merged 1 commit intocontainerd:mainfrom
dmcgowan:localhost-http-fallback
Oct 3, 2023
Merged

remotes: always try to establish tls connection when tls configured#9182
fuweid merged 1 commit intocontainerd:mainfrom
dmcgowan:localhost-http-fallback

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan commented Oct 2, 2023

When a endpoint is configured for http and has a tls configuration, always try to the tls connection and fallback to http when the tls connections fails from receiving an http response. This fixes an issue with default localhost endpoints which get defaulted to http with insecure tls also configured but are using tls.

Fixes #9157

@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Oct 2, 2023

@vvoland will this work for the Moby implementation as well?

@dmcgowan dmcgowan added cherry-pick/1.6.x cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Oct 2, 2023
@dmcgowan dmcgowan force-pushed the localhost-http-fallback branch from 6b1fcd1 to 79f1980 Compare October 2, 2023 22:28
When a endpoint is configured for http and has a tls configuration,
always try to the tls connection and fallback to http when the tls
connections fails from receiving an http response. This fixes an issue
with default localhost endpoints which get defaulted to http with
insecure tls also configured but are using tls.

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan force-pushed the localhost-http-fallback branch from 79f1980 to 79772a0 Compare October 2, 2023 22:37
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit 28fa275 into containerd:main Oct 3, 2023
@dmcgowan dmcgowan added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.6.x cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Oct 3, 2023
@dmcgowan dmcgowan deleted the localhost-http-fallback branch April 20, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

localhost uses http by default from v1.6.9 and no option is available to over-ride this behavior.

4 participants