-
Notifications
You must be signed in to change notification settings - Fork 261
The --skip-tls flag shouldn't use the http protocol
#872
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Question: Have you checked your changes still work with http endpoints?
I'm not sure what these
regoptsdo exactly. Should we maybe still keep this but only add if if the url scheme is http?@njhale any thoughts here?
Uh oh!
There was an error while loading. Please reload this page.
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.
I have not checked that, good point. Didn't think about that.
But if I do think of it, why would someone pass
--skip-tlswhen using HTTP in the first place? And also, how does one even use http registries? e.g. How would you tell docker to use http to communicate withquay.io/foo/bar:latest? It uses https by default. Searching online didn't lead me to a conclusive answer, prefixing withhttp://i.e.http://quay.io/foo/bar:latestis illegalUh oh!
There was an error while loading. Please reload this page.
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.
Here's how it's done:
https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry
Basically a config file lists all registries where docker should try to communicate with HTTPS, if it gets a bad cert, ignore any errors, if there's no HTTPS on that server at all then it fallbacks to HTTP.
Doesn't seem like you can specify the protocol in the image address itself in any way I could find
Also this of-course applies to the Docker CLI, not sure about the behavior for the docker library used here
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.
I agree with you here. --skip-tls and http are not related at all. I just don't know if these regopts we are removing here are needed for something specific (e.g. pipeline). We may still need to add a --use-http options or something like that. So, I'll set it to ok-to-test but I'd like @njhale (who I think originally added this) to ok.
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.
Original author is here a16399f
Uh oh!
There was an error while loading. Please reload this page.
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.
We can't change/remove current
--skip-tlsfunctionality, but we can--skip-tls-verifyand--use-httpto enable their respective namesake's functionalityThere 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.
Assuming @omertuc does not update this PR soon, @dinhxuanvu @jpower432 can one of you take on the changes in a separate PR?
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.
Ah didn't realize your bullets were concrete change suggestions.
Yeah please take it on yourselves as I don't feel confident enough in this code base to make those changes
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.
Sounds good, thanks for all you've done so far!
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.
I can make these changes.