spring-guides / gs-authenticating-ldap

Authenticating a User with LDAP :: Learn how to secure an application with LDAP.

Home Page:https://spring.io/guides/gs/authenticating-ldap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix guideline documentation

arturbdr opened this issue · comments

When following the guideline here:
Spring guides - LDAP

I found out that it's not working because the embedded LDAP server is not starting.
Before checking the complete example (here on the repository) I've debugged the AutoConfiguration class EmbeddedLdapAutoConfiguration
This led me to understand that the the embedded server will only start if the following properties are present in the classpath:

spring.ldap.embedded.ldif=classpath:test-server.ldif
spring.ldap.embedded.port=8389
spring.ldap.embedded.base-dn=dc=springframework,dc=org

This is clear here in the Github example but is missing in the guides of LDAP. Is it possible to improve the guide?

Also, I believe it would be nice to put a log.debug or even a log.info when the embedded server is started and in which port it has started.

This is a good first issue for someone who wants to start contributing.

I would skip the log.debug or log.info bit, though, as they lead to a lot of output. At most, I would mention those options but not turn them on by default.