Open jtduffy opened 4 weeks ago
Here's the PR that added an HTTP/2 compatible client to the AITs and documents a few setup steps: https://github.com/newrelic/java-agent-integration-tests/pull/257
By default, when creating the http client I set verify=False
so that it won't be a huge hassle to manage certs with HTTP/2.
httpx.Client(http2=True, follow_redirects=True, verify=False)
verify
- (optional) SSL certificates (a.k.a CA bundle) used to verify the identity of requested hosts. Either True (default CA bundle), a path to an SSL certificate file, an ssl.SSLContext, or False (which will disable verification).
Evaluate the existing AITs and see which ones would be candidates for adding coverage for HTTP/2 support.
List of HTTP/2 client and server frameworks: https://docs.google.com/spreadsheets/d/150ntwH2aO9Sr6mg0lVVkNScmLKSJpxNZXhqAoTHKo5U/edit?gid=0#gid=0
Enable HTTPS and HTTP/2 for Spring Boot 3 / Spring Framework 6 Apps
Generate a self signed localhost cert:
-keystore keystore.p12 -storetype PKCS12 -storepass password -validity 9999
This will create the keystore
keystore.p12
in the current folder. Copy this file into thesrc/main/resources
folder of the application.Update the
application.properties
orapplication.yml
file to reference the keystore:This will start the app with HTTPS and HTTP/2 support listening on port 8443.