Announcement Announcement Module
Collapse
No announcement yet.
AuthenticationServiceException in LdapContextSource configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AuthenticationServiceException in LdapContextSource configuration

    Hi SS users,

    I'm running SS 3.1 together with Spring Core 3.1. I use LdapAuthenticationProvider with the following context source configuration:

    Code:
    <beans:bean id="contextSource"
    		class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
    		<beans:constructor-arg value="${ldap.server.address}" />
    		<beans:property name="userDn" value="${ldap.server.user}" />
    		<beans:property name="password" value="${ldap.server.password}" />
    </beans:bean>
    My question is, why the proper exception/meesage is not logged when the LdapAuthenticatorProvider can not connect to the LDAP server. When I set logging level for "org.springframework.security" to INFO this information is not even visible in the application log file! It is visible only on DEBUG level:

    Code:
    2012-02-17 16:14:33,609 [859665@qtp-16238795-0] DEBUG o.s.s.w.a.UsernamePasswordAuthenticationFilter - Authentication request failed: org.sp
    ringframework.security.authentication.AuthenticationServiceException: some.host.com:3268; nested exception is javax.naming.CommunicationExceptio
    n: some.host.com:3268 [Root exception is java.net.ConnectException: Connection refused: connect]
    Guys, what was the reason of logging such important information on DEBUG level? Explain me, please!!

    In my opinion is an error and should be always logged on the ERROR level. Moreover all AuthenticationServiceExceptions should be logged on the ERROR level. Please correct me if I'm wrong.

    I have experienced the LDAP server failure on the production env. Of course nobody wasn't aware of it and during its downtime all web applications that use LDAP authentication were out of service. I was looking for some authentication errors in the app logs but could not spot any of them bacause the most important info in this case was logged on DEBUG level.

    Regards,
    Krzysztof
    Last edited by krzychu; Feb 17th, 2012, 10:04 AM.
Working...
X