LDAP Debug loggers - 7.71 and Up

LDAP Debugging Guide

AuthorFullName__c
Patrick Russell
articleNumber
000004524
ft:sourceType
Salesforce
FirstPublishedDate
2019-08-14T23:20:34Z
lastModifiedDate
2024-03-10T07:43:52Z
VersionNumber
9
In nearly all circumstances, Artifactory’s LDAP debug loggers can help to determine the cause of a problem. This XML snippet goes in the $ARTIFACTORY_HOME/etc/access/logback.xml file and does not require a restart to take effect.

Please keep in mind that with the loggers in place, security information (such as LDAP coordinates, but not passwords) is logged in plaintext. There will also be a slight performance hit while this extra information is being logged. After debugging is complete, you should remove the logger.

This XML snippet should be placed in the logback.xml file near the end, before the "</configuration>" line:
<appender name="ldap" class="ch.qos.logback.core.rolling.RollingFileAppender">
  <File>${log.dir}/access-ldap.log</File>
  <rollingPolicy class="org.jfrog.common.logging.logback.rolling.FixedWindowWithDateRollingPolicy">
    <FileNamePattern>${log.dir.archived}/artifactory-ldap.%i.log.gz</FileNamePattern>
    <maxIndex>10</maxIndex>
  </rollingPolicy>
  <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
    <MaxFileSize>25MB</MaxFileSize>
  </triggeringPolicy>
  <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
    <layout class="org.jfrog.common.logging.logback.layout.BackTracePatternLayout">
      <pattern>%date{yyyy-MM-dd'T'HH:mm:ss.SSS, UTC}Z [jfrt ] [%-5p] [%-16X{uber-trace-id}] [%-30.30(%c{3}:%L)] [%-20.20thread] - %m%n</pattern>
    </layout>
  </encoder>
</appender>

<logger name="org.jfrog.access.server.security" additivity="false">
  <level value="trace"/>
  <appender-ref ref="ldap"/>
</logger>
<logger name="org.jfrog.access.server.service.auth.ldap" additivity="false">
  <level value="trace"/>
  <appender-ref ref="ldap"/>
</logger>
<logger name="org.springframework.ldap" additivity="false">
  <level value="trace"/>
  <appender-ref ref="ldap"/>
</logger>
<logger name="org.springframework.security.ldap" additivity="false">
  <level value="trace"/>
  <appender-ref ref="ldap"/>
</logger>


When applied, an "access-ldap.log" file will appear in the $ARTIFACTORY_HOME/log/ folder.