Skip to content

HTTP/2 and modern TLS support #10043

@bclozel

Description

@bclozel

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:

  1. the embedded server supports TLS 1.2+
  2. the application is properly configured with TLS 1.2+
  3. 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

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions