-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Example SSL / TLS Configuration for Http Clients #8
Comments
Do you think adding example using Apache CXF will add value to this already impressive list ?
|
Hi Vlad, @skarzhevskyy Thank you for your suggestion for these two http clients. I think it will definitely add value to the list. The https://cxf.apache.org/docs/jax-rs-client-api.html looks however identical to the jersey client, see here for the example configuration and example request: Client Configuration | Example request What do you think? Regarding the other client, https://cxf.apache.org/docs/dynamic-clients.html, feel free to open a pull request here: https://github.com/Hakky54/mutual-tls-ssl if you want to contribute or else I will try to add it 😄 |
I updated the list with Apache Jax-RS and Apache WebClient configuration. Thank you for the PR Vlad! |
Every http client will have a slightly different configuration for encryption/https and therefor as a developer we need to dive into their documentation to find examples, this will be unfortunately time-consuming. Some clients just only require
SSLContext
, others will need aSocketFactory
,SSLSocketFactory
,TrustManager
,X509TrustManager
,X509ExtendedTrustManager
,KeyManager
,X509KeyManager
,X509ExtendedKeyManager
,DefaultSSLParameters
or a list oftrusted certificates
. I wanted to provide an overview of http clients configuration as a cheat-sheet to make our lives easier.Below is an overview of client configuration examples with and without TLS/SSL enabled and with basic http requests. The examples are from the github project mutual-tls-ssl, which is a practical tutorial for configuring a client and a server for four scenarios:
Example client configuration and example requests / Cheatsheet
All client examples use the same base ssl configuration created within the SSLConfig class
Java
Kotlin
Scala
Feel free to ask for other client examples here
The text was updated successfully, but these errors were encountered: