Spring 3.1 LDAP Authentication Process: “Bad Credentials” msg When Credentials Are Good

后端 未结 2 927
时光说笑
时光说笑 2021-02-09 10:38

Spring 3.1 Tomcat 6.*

I\'m working on making a Spring 3.1 webapp, authenticating with LDAP.

I tested the LDAP credentials (username, password, ldap URL, sear

2条回答
  •  醉话见心
    2021-02-09 10:57

    I will try luck. Few weeks ago I had a similar problem. No errors, correct user/pass and Bad Credentials error.

    First, I recommend you to activate debug level for spring security. You will get more information. In my case, this helped me to see that the problem was that my user did not have any role associated and Spring was traducing it as "bad credentials" error. It could be your case. Check it.

    Anyway, bad credentials doesn't mean always user/pass incorrect.

    EDIT: For activating debug level using log4j:

    
        
    
    

    In you configuration, it can be read that access to welcome page requires admin role: ROLE_ADMIN. If you don't want roles, you should try something like this:

      
    

提交回复
热议问题