org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

Apereo Issues | Andrew Morgan | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The logging behavior for failed LDAP authentications has changed between v3.4.12 and v3.5.1. A failed LDAP authentication on v3.4.12 logs: 2012-10-25 10:43:55,001 INFO org.jasig.cas.authentication.AuthenticationManagerImpl] - AuthenticationHandler: org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler failed to authenticate the user which provided the following credentials: [username: morgan] A failed LDAP authentication on v3.5.1 logs: 2012-10-25 10:26:21,408 ERROR [org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler] - [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:182) followed by a lengthy Java stack trace. Failed authentications are a normal occurrence. These stack traces "pollute" the logs. Ideally, it would log something like this: 2012-10-25 10:43:55,001 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - AuthenticationHandler: org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler failed to authenticate the user which provided the following credentials: [username: morgan] [LDAP: error code 49 - Invalid Credentials] (note the added LDAP error code/message). I would be satisfied if the logging was the same as v3.4.12, but the additional LDAP error code could be useful too.

    Apereo Issues | 4 years ago | Andrew Morgan
    org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

    Root Cause Analysis

    1. org.springframework.ldap.AuthenticationException

      [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

      at org.springframework.ldap.support.LdapUtils.convertLdapException()
    2. spring-ldap-core
      LdapUtils.convertLdapException
      1. org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:182)
      1 frame