CAMEL-22497: Make HTTPS easier for camel.server#22194
Open
Conversation
- Move SSL configuration before HTTP server configuration so global SSL context is available when the server is created - Auto-enable useGlobalSslContextParameters on HTTP server and management server when camel.ssl.enabled=true - Generate self-signed certificate when SSL is enabled but no keystore is configured, for easy development use Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
- Remove spurious @SuppressWarnings("restriction") - Replace deprecated Date methods with java.time APIs - Use wrapTag/encodeLength consistently in buildRdn - Import StandardCharsets instead of using fully-qualified names - Add SAN extension (DNS:localhost, IP:127.0.0.1) to self-signed cert - Reuse SecureRandom instance instead of creating multiple - Respect explicit camel.server.useGlobalSslContextParameters=false by checking if the property was explicitly set before auto-enabling - Add test verifying SAN extension in generated certificate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🧪 CI tested the following changed modules:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: CAMEL-22497
Summary
camel.ssl.*) before HTTP server configuration so global SSL context is available when the server is createduseGlobalSslContextParameterson both HTTP server and management server whencamel.ssl.enabled=true, removing the need to set it separatelyBefore (4+ properties needed)
After — minimal for development (1 property)
camel.ssl.enabled=trueAfter — with keystore for production (3 properties)
Test plan
testMainSSLSelfSigned— verifies self-signed cert is generated and a valid SSLContext can be createdtestMainSSLSelfSignedFluent— same test using fluent APItestSelfSignedCertificateGenerator— unit test for the generator utility