idpv3 testing: clientIP in audit logs and consent jdbc ?
Jarno Huuskonen
jarno.huuskonen at uef.fi
Fri Jan 30 13:33:44 EST 2015
Hi,
Thanks Brett / Tom !
On Fri, Jan 30, Brent Putman wrote:
>
> On 1/30/15 1:09 PM, Brent Putman wrote:
> > On 1/30/15 11:02 AM, Jarno Huuskonen wrote:
> >> Is it possible to get clientIP address in audit logs ?
> >> I didn't get (v2.4.3 <Pattern>%msg%mdc{clientIP}|%n</Pattern>) to
> >> work (this appends clientIP string (not the address to audit logs).
> >> (Editing audit.xml didn't work any better).
> > Looks like the SLF4J MDC variable name we use here has just changed in
> > v3. Try "idp.remote_addr" instead of "clientIP".
>
>
> To amend what I said: For general logging (idp-process.log, etc), what
> I said is true, the MDC variable has changed. For the audit log
> specifically, the situation may be different. Tom is looking into
> that. I'm not terribly familiar with the new audit log system in v3 yet.
This in logback.xml seems to work for IDP_AUDIT
(at the moment I'm not interested in consent audit log, but good to know
the %a (I think I tried %a in audit.xml)):
<appender name="IDP_AUDIT" class="ch.qos.logback.core.FileAppender">
<File>${idp.home}/logs/idp-audit.log</File>
<encoder
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<charset>UTF-8</charset>
<Pattern>%msg|%mdc{idp.remote_addr}|%n</Pattern>
</encoder>
</appender>
This adds (at least for ipv4) the client address to idp-audit.log.
-Jarno
--
Jarno Huuskonen
More information about the users
mailing list