-
Notifications
You must be signed in to change notification settings - Fork 485
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
Document how to use a custom truststore #545
Comments
Yes, please! Difficult TLS configuration is something that is holding the whole industry back from becoming more secure. People resort to crazy things like modifying the JVM's |
Any interest in providing a PR? |
I'm not an actual direct user of Spring, only a user of a product which uses it. I'm afraid I'm not steeped enough in Spring-isms to do a very good job with this. The custom |
I can give it a try. Where would that go? |
Thanks for volunteering @marschall! A section in https://github.com/spring-projects/spring-ldap/blob/master/src/docs/asciidoc/index.adoc#configuration would probably be where I'd put it. |
@marschall What you've done is awesome and quite involved. Combined with the |
I wanted to share here that it is easier to configure the ssl of spring boot as shown here: #547 (comment) |
If you want to use a custom truststore, eg. with just the root CA certificate of the server, you have to do:
SSLSocketFactory
SimpleDirContextAuthenticationStrategy
that sets thejava.naming.ldap.factory.socket
property in the#setupEnvironment(Hashtable, String, String)
method.DefaultSpringSecurityContextSource
that in sets thejava.naming.ldap.factory.socket
property in the#getAuthenticatedEnv(String, String)
methodIt would be good if this was documented somewhere.
Socket factory base class
concrete socket factory
custom authentication strategy
usage
This is a follow up to #494
The text was updated successfully, but these errors were encountered: