diff --git a/docs/faq/src/docbook/faq.xml b/docs/faq/src/docbook/faq.xml index be57f3299d..2695eb2758 100644 --- a/docs/faq/src/docbook/faq.xml +++ b/docs/faq/src/docbook/faq.xml @@ -284,6 +284,15 @@ I can't get LDAP authentication to work. What's wrong with my configuration? + + Note that the permissions for an LDAP directory often do not allow you to read the password + for a user. Hence it is often not possible to use the UserDetailsService + approach where Spring Security compares the stored password with the one submitted by the user. + The most common approach is to use LDAP bind, which is one of the operations + supported by the LDAP protocol. + With this approach, Spring Security validates the password by attempting to authenticate to the directory + as the user. + The most common problem with LDAP authentication is a lack of knowledge of the directory server tree structure and configuration. This will be different in different companies, so you have to find it out yourself. Before adding a Spring Security LDAP @@ -305,7 +314,8 @@ } ]]> - + + @@ -626,7 +636,7 @@ - What is a UserDetailsService and do I need + What is a UserDetailsService and do I need one? @@ -639,7 +649,8 @@ DaoAuthenticationProvider, which is injected with a UserDetailsService to allow it to load the password (and other data) for a user in order to compare it with the - submitted value. + submitted value. Note that if you are using LDAP, + this approach may not work. If you want to customize the authentication process then you should implement AuthenticationProvider yourself. See this - The LdapAuthenticationProvider bean (which handles + The LdapAuthenticationProvider bean (which handles normal LDAP authentication in Spring Security) is configured with two separate strategy interfaces, one which performs the authenticatation and one which loads the user authorities, called