<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="">
Hello all.
<div class=""><br class="">
</div>
<div class="">Was a solution for adding X-Forwarded-For HTTP header content to Shibboleth IdP 3.x audit (or any other) logs ever shared? I was unable to find any posted solution in the list archive.</div>
<div class=""><br class="">
</div>
<div class="">I’m using Tomcat 8 with Shibboleth IdP 3.3. We’re using an F5 for load balancing. Using SNAT and setting the default route in each IdP server node probably won’t be an option (as at lest one is on a different subnet).</div>
<div class=""><br class="">
</div>
<div class="">I was able to get the IP address sent by our load balancer in the X-Forwarded-For header in the Tomcat localhost_access_log with the following configuration in the server.xml file.</div>
<div class="">——</div>
<div class=""> <Valve className="org.apache.catalina.valves.RemoteIpValve"<br class="">
remoteIpHeader="X-Forwarded-For"<br class="">
protocolHeaderHttpsValue="https" /><br class="">
<br class="">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"<br class="">
prefix="localhost_access_log" suffix=".txt"<br class="">
pattern="%{X-Forwarded-For}i %h %l %u %t "%r" %s %b" /><br class="">
——</div>
<div class="">However, I’m not sure how (or even if it’s possible) to get that %{X-Forwarded-For}i result into a Shibboleth audit log. My sense is that it’s more than just a simple /opt/shibboleth-idp/conf/logback.xml change. Any pointers would be appreciated.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
----</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
Nathan Sheldon (<a href="mailto:nathan.sheldon@ucsf.edu" class="">nathan.sheldon@ucsf.edu</a>)</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; orphans: auto; text-align: start; text-indent: 0px; widows: auto;" class="">
<br class="">
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>