Skip to content

Commit

Permalink
Sett skjul fnr filter på message og ikke bare msg
Browse files Browse the repository at this point in the history
  • Loading branch information
sebassonav committed Dec 13, 2024
1 parent 2a2ed0c commit dce499f
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/etterlatte-api/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-behandling/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-beregning/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-brev-api/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-brev-kafka/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-grunnlag/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-grunnlag/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
2 changes: 2 additions & 0 deletions apps/etterlatte-hendelser-pdl/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-trygdetid/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
1 change: 1 addition & 0 deletions apps/etterlatte-utbetaling/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<conversionRule conversionWord="msg" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<conversionRule conversionWord="message" converterClass="no.nav.etterlatte.libs.common.person.FnrCoverConverter"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
Expand Down
3 changes: 3 additions & 0 deletions libs/saksbehandling-common/src/main/kotlin/SkjulFnr.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package no.nav.etterlatte.libs.common.person
import ch.qos.logback.classic.pattern.MessageConverter
import ch.qos.logback.classic.spi.ILoggingEvent

/*
Denne brukes i logback.xml for å anonymisere fnr som randomly havner i loggene
*/
private val fnrRegex = Regex("\\b\\d{11}\\b")

class FnrCoverConverter : MessageConverter() {
Expand Down

0 comments on commit dce499f

Please sign in to comment.