-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Avoid TLS fallback when protocol is not ambiguous #9283
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
Conversation
28f2339 to
b458aa2
Compare
b458aa2 to
f7f8ac3
Compare
f7f8ac3 to
c75b129
Compare
mikebrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit and a question regarding error messaging to explain the changes...
| // the protocol from the port number is ambiguous, use the | ||
| // docker.HTTPFallback roundtripper to catch TLS errors and re-attempt the | ||
| // request as http. This allows preference for https when configured but | ||
| // also catches TLS errors early enough in the request to avoid sending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this "flavor" pass through to enhance the error messaging and let the error show as trying https first based on (tryTLSFirst) is enabled?
would be nice if the error messaging was obvious telling the user what to do to address config changes.. for each testable situation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an info log for this case
c75b129 to
d31bd98
Compare
d31bd98 to
a7c832f
Compare
The TLS fallback should only be used when the protocol is ambiguous due to provided TLS configurations and defaulting to http. Do not add TLS configurations when defaulting to http. When the port is 80 or will be defaulted to 80, there is no protocol ambiguity and TLS fallback should not be used. Signed-off-by: Derek McGowan <[email protected]>
a7c832f to
d48ceb6
Compare
mikebrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update fork-external main with upstream main @ 452ec25 Related work items: containerd#5890, containerd#7647, containerd#9218, containerd#9233, containerd#9258, containerd#9270, containerd#9274, containerd#9279, containerd#9283, containerd#9286, containerd#9289, containerd#9290, containerd#9294, containerd#9295, containerd#9297, containerd#9305, containerd#9306, containerd#9308, containerd#9316, containerd#9317, containerd#9319, containerd#9320, containerd#9321
The TLS fallback should only be used when the protocol is ambiguous due to provided TLS configurations and defaulting to http. Do not add TLS configurations when defaulting to http. When the port is 80 or will be defaulted to 80, there is no protocol ambiguity and TLS fallback should not be used.
Alternative to #9269