Skip to content

Commit

Permalink
refactor: fjerner foreldrepenger.konsumenter metrikk som ikke lenger … (
Browse files Browse the repository at this point in the history
#1404)

* refactor: fjerner foreldrepenger.konsumenter metrikk som ikke lenger trenges.

* chore: bom 3.6.1
  • Loading branch information
mrsladek authored Dec 9, 2024
1 parent be38e14 commit 74002c4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ public static OtelSpanWrapper forApplikasjon() {
return new OtelSpanWrapper(tracer);
}

public static OtelSpanWrapper forBibliotek(String libraryName, String libraryVersion) {
var tracer = GlobalOpenTelemetry.getTracer(libraryName, libraryVersion);
return new OtelSpanWrapper(tracer);
}

public OtelSpanWrapper(Tracer tracer) {
this.tracer = tracer;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package no.nav.vedtak.sikkerhet.oidc.validator;

import static no.nav.vedtak.sikkerhet.oidc.validator.ConsumerMetric.registrer;

import java.security.Key;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -153,7 +151,6 @@ private OidcTokenValidatorResult validateAzure(JwtClaims claims, String subject)
var oid = getAzureOid(claims);
if (isAzureClientCredentials(claims, subject, oid)) {
var brukSubject = Optional.ofNullable(JwtUtil.getStringClaim(claims, AzureProperty.AZP_NAME)).orElse(subject);
registrer(clientName, brukSubject, OpenIDProvider.AZUREAD, IdentType.Systemressurs);
// Ta med bakoverkompatibelt navn ettersom azp_name er ganske langt (tabeller / opprettet_av)
var sisteKolon = brukSubject.lastIndexOf(':');
if (sisteKolon >= 0) {
Expand All @@ -167,7 +164,6 @@ private OidcTokenValidatorResult validateAzure(JwtClaims claims, String subject)
}
} else {
var brukSubject = Optional.ofNullable(JwtUtil.getStringClaim(claims, AzureProperty.NAV_IDENT)).orElse(subject);
registrer(clientName, "Saksbehandler", OpenIDProvider.AZUREAD, IdentType.InternBruker);
var grupper = Optional.ofNullable(JwtUtil.getStringListClaim(claims, AzureProperty.GRUPPER))
.map(arr -> AnsattGruppeProvider.instance().getAnsattGrupperFraStrings(arr))
.orElse(Set.of());
Expand Down Expand Up @@ -204,7 +200,6 @@ private OidcTokenValidatorResult validateTokenX(JwtClaims claims, String subject
return OidcTokenValidatorResult.invalid("TokenX token ikke på nivå 4");
}
var brukSubject = Optional.ofNullable(JwtUtil.getStringClaim(claims, PID)).orElse(subject);
registrer(clientName, "Borger", OpenIDProvider.TOKENX, IdentType.EksternBruker, acrClaim);
return OidcTokenValidatorResult.valid(brukSubject, IdentType.EksternBruker, JwtUtil.getExpirationTimeRaw(claims));
}

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>fp-bom</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
</parent>

<artifactId>felles-root</artifactId>
Expand All @@ -33,7 +33,7 @@
<dependency>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>fp-bom</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down

0 comments on commit 74002c4

Please sign in to comment.