Add Extra Logging for LDAP Troubleshooting

Follow

Adam Adrianson -

Issue

After trying to setup XL Deploy or XL Release for LDAP authentication, LDAP users cannot sign on.  The logs do not have an helpful information.

Environment

XL Deploy, XL Release, LDAP, Active Directory

Resolution

Logging can be turned up and consolidated in a separate log file  to make it easier to follow the events.  At the end of xl[d/r]_home/conf/logback.xml, just before the </configuration> tag, add the following appender and loggers and then restart.  Signon events can then be found in xl[d/r]_home/log/ldapsecurity.log -

    <appender name="SEC_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>log/ldapsecurity.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>log/ldapsecurity.%i.log</fileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>5</maxIndex>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>5MB</maxFileSize>
        </triggeringPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] {%mdc} %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    <logger name="com.xebialabs.deployit.security" level="debug">
        <appender-ref ref="SEC_FILE" />
    </logger>
    <logger name="org.springframework.security" level="debug">
        <appender-ref ref="SEC_FILE" />
    </logger>
    <logger name="org.springframework.ldap" level="debug">
        <appender-ref ref="SEC_FILE" />
    </logger>
Cause

Default logging is insufficient to diagnose some LDAP configuration issues.

Additional Information
level="debug" can be turned up to level="trace" for any of the above loggers as needed

 

Tags

 

 

Have more questions? Submit a request
Powered by Zendesk