<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">To capture the end user’s IP address in the audit logs, I have tried these patterns in <font face="Courier New" class="">conf/logback.xml</font> without success:</div><div class=""><br class=""></div><font face="Courier New" class="">1. <Pattern>%msg|%<b class="">X</b>{req.xForwardedFor}|%n</Pattern></font> — does not log anything in v3, but worked in Tomcat 6/IdP v2 (in conf/logging.xml) — see <a href="http://logback.qos.ch/manual/mdc.html#mis" class="">http://logback.qos.ch/manual/mdc.html#mis</a><br class=""><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class="">2. <Pattern>%msg|%<b class="">mdc</b>{</font><span style="font-family: 'Courier New';" class="">req.xForwardedFor</span><font face="Courier New" class="">}|%n</Pattern></font> — does not log anything<br class=""><span style="font-family: 'Courier New';" class=""><br class=""></span></div><div class=""><span style="font-family: 'Courier New';" class="">3. <Pattern></span><span style="font-family: 'Courier New';" class="">%msg|%<b class="">mdc</b>{idp.remote_addr}|%n</span><font face="Courier New" class=""></Pattern></font> — logs the IP address of the httpd server[1] </div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">jetty.xml</font> contains (uncommented): </div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">      <Call name="addCustomizer"><br class="">        <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg><br class="">      </Call></font></div><div class=""><div class=""><br class=""></div><div class="">Our Load Balancer is setting X-Forwarded-For, and it appears correctly in httpd logs; a small java app I wrote to print all the headers, prints the X-Forwarded-For and other X-Forwarded headers correctly, so Jetty is getting it. Wondering what might be missing with logback.xml or any other IdP configurations?</div><div class=""><br class=""></div><div class=""><div class="">I searched the documentation, but the closest I got was <font face="Courier New" class="">idp.remote_addr</font> (3rd pattern above) — hoping it is a matter of plugging in the right variable. Any ideas what that might be or where I could look for a list and/or docs?</div></div><div class=""><br class=""></div><div class="">Our IdP setup is: Client > Load Balancer > Apache (mod_proxy) > Jetty</div><div class=""><br class=""></div><div class="">Relevant versions: Jetty — 9.2.11, Apache httpd - 2.2.15, Java 1.8</div><div class=""><br class=""></div><div class="">Any guidance is much appreciated! </div></div><div class=""><br class=""></div><div class="">[1] <a href="https://wiki.shibboleth.net/confluence/display/IDP30/LoggingConfiguration" class="">https://wiki.shibboleth.net/confluence/display/IDP30/LoggingConfiguration</a></div><div class=""><br class=""></div></body></html>