Closed
Description
This is an umbrella issue for HTTP/2 and modern TLS configurations in Spring Boot.
There are a few requirements for running an HTTP/2 server on the JVM:
- the embedded server supports TLS 1.2+
- the application is properly configured with TLS 1.2+
- a certificate that checks the TLS requirements (key length, cipher suite...)
TLS 1.2 support can be achieved in different ways:
- run the application on JDK9; this might be an easy solution, but it can also be a showstopper for some and this is limited to TLS 1.2, while 1.3 is already being deployed on big infrastructures
- use "hacks" that replace the JDK TLS implementation; one can do that with a java agent, overriding the boot classpath, etc. This can be a challenge when running the application, depending on the target environment
- use native bindings; quite well supported already, this also brings additional constraints to environments. But it's more likely to be up-to-date with the latest TLS versions and CVEs
We should consider the following:
- when possible, we should have a common approach for all supported HTTP servers, as well as MVC and WebFlux
- we might have to revisit configuration defaults in TLS; we can't certainly push everyone to TLS 1.2 right now, but some certificate requirements are already enforced by browsers for HTTP 1.1
- maybe we should enabled HTTP/2 by default, i.e. no "http2.enabled" configuration key; we could just detect if the environment supports it and also derive it from the SSL configuration. Explicitely configuring TLS 1.2+ in the SSL configuration key is quite a strong signal already. AFAIU configuring HTTP/2 does not preclude from using HTTP 1.1; on the other hand, clients supporting TLS 1.2+ are quite likely to be HTTP/2 compatible anyway.
- the setup is likely to be complex, so we should help as much as possible developers with that; we might have to implement new failure analysers
- we should follow the 12-factor approach and think about deployment concerns (native libraries and/or java agents, jdk constraints)
Note: this issue is not about the Servlet 4.0 support, which is not a requirement for this.
There are already quite a few PRs and issues, but we should decide on a global approach first, and then cherry-pick from those the bits we need: #3350 #3904 #7376 #9431 #9964 #9981 #10041
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
olamy commentedon Aug 21, 2017
well I'm not sure about the " i.e. no "http2.enabled" configuration key "
how do you detect users want to use http2?
bclozel commentedon Aug 25, 2017
I asked myself those two questions (maybe I'm missing something?):
In my opinion, in the first case the boolean flag gives the false impression that flipping that flag is all that you need. In the second case, if your HTTP clients support a modern TLS configuration, they will support HTTP/2 anyway.
olamy commentedon Aug 28, 2017
Well you can use HTTP/2 without ssl. I reckon it's maybe a non usual case as it won't work for browsers. But it can be a use case with APIs only related projects (company internal project to exchange data without need of ssl)
pvorb commentedon Sep 20, 2017
@olamy Yes, HTTP/2 without TLS is definitely a use case for using it in your cloud environment (e.g. through Spring Cloud Netflix) where you might not want to manage TLS certificates for services that don't provide public APIs.
@bclozel, @philwebb As you added milestones for this issue, what will be left to do once I have HTTP/2 including TLS working on JDK 9 on all supported Servlet Containers and after I remove the
http2.enabled
property and enable it by default? (See #9981)bclozel commentedon Sep 20, 2017
@pvorb Your contribution is very useful, but you seem to think that the requirements you've settled on are the ones Spring Boot will choose.
As far as I know, we're still in the process of figuring out what should be the minimum requirements , configuration keys, supported runtimes and deployment model. Those are all tradeoffs.
In the case of Jetty, requiring JDK9 is just an option. We could still go with the bootClasspath or java agent solutions. Or we could even look into the recent integration with native libraries.
pvorb commentedon Sep 20, 2017
@bclozel I see my question was a little too direct and misleading. I'm just trying to provide one possible solution that works across all containers. I understand that's not necessarily the way Spring Boot will go in the end.
What I'm looking for is additional feedback for my PR upon which I can further improve the solution.
Is there some publicly available discussion around these topics? I can't see much progress in the issues and PRs that were linked above.
8 remaining items