-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
nsqd: add --tls-min-version config option #513
Conversation
This changes nothing output wise, but removes unnecessary code and makes this method more generic for the future.
If tls-min-version is acceptable here, I will work on the same patch for go-nsq. |
RFR @mreiferson |
@twmb thanks! Got an error in the travis run:
|
I was looking at it. I can't repro in dev and the message it gives (can't coerce 768 into uint16) doesn't make sense on surface inspection. |
This adds a new tls-min-version flag that enables nsqd users to specify a min tls version acceptable. The arguments to this flag, <v>, follow the format of Version<v> in the tls package. This commit adds --tls-min-version=ssl30 to the test.sh flags.
LGTM, thanks! |
nsqd: add --tls-min-version config option
It turns out that (until Go 1.5) if we don't specify max version we don't get TLS_FALLBACK_SCSV via https://twitter.com/benburkert/status/546063006975533057 @mreiferson do you think we should add a -tls-max-version or just set that value by default (or both)? |
@jehiah let's just set the default for now? want to open the PR? |
@jehiah relatedly, we probably shouldn't default |
I Also realized as I started looking at this that specifying the flag type as an |
Nah, you can set it to a string - it looks a bit convoluted but it works... |
Sorry, I read that wrong, the config file can be set to a string but you're right, if you were setting It would be nice to be able to set a string there, too... |
... take 3 - can't you just use the constants if you were setting |
Yeah, it'd make sense to take the tls constants. Sorry the code is a bit convoluted, I thought it'd make more sense to take "ssl30" from the command line as opposed to 0, but also I thought it'd make more sense to use tls.VersionSSL30 if using nsqd as a package. |
This adds a new tls-min-version flag that enables nsqd users
to specify a min tls version acceptable. The arguments to this
flag, , follow the format of Version in the tls package.
This commit adds --tls-min-version=ssl30 to the test.sh flags.
This PR also go fmt's nsq_to_nsq, which has been unformatted for a while, and reduces code clutter from tlsRequiredOption.String.
closes #512.