Looking for examples of mTLS using dropwizard #8512
Replies: 2 comments
-
@harpreet86 Is there anything specific you're looking for? mTLS in general just means that both, the client and the server, need to present their certificates to each other. In Dropwizard, you can configure the HTTPS connector to require the clients to present a certificate: server:
applicationConnectors:
- type: https
port: 8443
....
needClientAuth: true
wantClientAuth: true These settings configure Jetty pretty much the same way as this example (without Dropwizard): The client can be configured accordingly: |
Beta Was this translation helpful? Give feedback.
-
Hi @joschi I have tried using below server configuration:
and the client class main method has code as below:
The above does not work as it gives bad certificate exception however the same example works if I change needClientAuthentication to false. I am not sure about what I am missing as I am not able to find any good example to test these things on local machine. Please suggest. |
Beta Was this translation helpful? Give feedback.
-
I want my dropwizard application to be mTLS enabled for which I am not able to find some examples or reference.
Also, if someone can help how to test this locally using some test certificates.
Beta Was this translation helpful? Give feedback.
All reactions