-
Notifications
You must be signed in to change notification settings - Fork 17.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
x/net/http2: expose which TLS cipher suites are HTTP/2 safe #41068
Comments
We might consider adding an |
That error does need some tweaking though, because the order doesn't matter unless |
(MinVersion should/could be 1.2, my bad) Could you please point me to the place where the default list of ciphers is selected/generated (and their order is decided), if CipherSuites is not set by me? I could not find it, so I didn't trust it and tried to set it on my own... |
Line 1418 in e6583dc
It's not documented because it can change and evolve for security and performance reasons. |
Hm, okay, I see... many places where things are defined/decided and generally little control, other than hardcoding / maintaining a custom list and always using the latest Golang version to compile, etc... Somehow I'm starting to doubt whether ciphers hardcoded/compiled into the executable are a good idea... If something changes (e.g. a vulnerability comes up) one needs to have the source code and recompile the program... I guess this issue can be closed, thank you! |
One additional question: "varDefaultCipherSuites" (i guess you've got a typo in that variable name, but luckily it's private ^^) is the default list in every tls.Config, right? So also third party packages, consuming tls.Config would use those good ciphers (unless explicitly set differently)...? |
Most developers want us to make the decisions on specific algorithms and to keep those up to date.
If a vulnerability comes up developers are expected to obtained a patched version and recompile, like any other vulnerability.
I am going to keep it open to expose a HTTP2 bool in CipherSuite. Thank you!
Correct! What's the typo? |
Well, not if cipher suites aren't part of the application, but instead outsourced to OpenSSL. Then OpenSSL (ideally) maintains a good and secure cipher set. And application adminsitrators can update OpenSSL and change the applied ciphers via application configuration... no need to re-compile.
Why is "var" part of the variable name?
|
I was referring to any vulnerability in Go, which compiles to static binaries.
Not pretty, but it's a somewhat common pattern to hide the global var of a sync.Once based function (which is the symbol name without "var"). |
@FiloSottile Any new updates to when you would expose a HTTP2 bool in CipherSuite? Appreciate any timelines. |
@rolandshoemaker, can you mail a CL adding an HTTP2 bool to the CIpherSuite struct? |
Change https://golang.org/cl/266297 mentions this issue: |
Sorry to sound like am bikeshedding but I just added a review comment to the CL, and asked perhaps for UsableWithHTTP2 instead of just HTTP2, because that field is a read only property, and not a toggle to enable HTTP/2, hence let’s try to make it more descriptive. |
After talking through this with the security team we're going to take a different path than was initially suggested here. Since this metadata is not a property of cipher suites themselves, but rather a property of the HTTP/2 protocol (by which I mean certain cipher suites don't support HTTP/2, HTTP/2 supports certain cipher suites) we're going to opt to expose this in x/net/http2 instead. x/net/http2 already has a private function, |
Thank you @rolandshoemaker for relaying back the new direction. Punting accordingly to Go1.17. Happy holidays! |
Change https://golang.org/cl/307369 mentions this issue: |
Did this make it into Go 1.17? Can an example of usage be provided? |
This change has not been committed to any version. |
Launching a web server with the SSL ciphers list taken from the TLS package does not work. I get the following error, that I can't get around programatically:
http2: TLSConfig.CipherSuites index 5 contains an HTTP/2-approved cipher suite (0x1301), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes (1.15)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to launch a web server with a custom TLS config, with ciphers taken from tls.CipherSuites(). I do have one of these 2 dead ends:
Here is a sample snippet:
What did you expect to see?
I just couldn't find a way to programatically order the ciphers as required, with the means available.
What did you see instead?
A critical error and program termination.
The text was updated successfully, but these errors were encountered: