Skip to content

Commit

Permalink
Oppdater til BOM 0.4.1 (#1243)
Browse files Browse the repository at this point in the history
* Oppdater til BOM 0.4.1

* Kun cdi-api for log
  • Loading branch information
jolarsen authored Jan 31, 2023
1 parent b46c140 commit 8ec3e1e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import no.nav.foreldrepenger.konfig.Namespace;
import no.nav.vedtak.sikkerhet.abac.beskyttet.ActionType;
import no.nav.vedtak.sikkerhet.abac.beskyttet.AvailabilityType;
import no.nav.vedtak.sikkerhet.abac.beskyttet.ServiceType;
Expand All @@ -31,6 +32,8 @@
@ExtendWith(MockitoExtension.class)
class PepImplTest {

private static final String LOCAL_APP = "local:" + Namespace.foreldrepenger().getName() + ":application";

private PepImpl pep;
@Mock
private TokenProvider tokenProvider;
Expand All @@ -45,7 +48,7 @@ void setUp() {
tokenProvider,
pdpRequestBuilder,
"SRVFPLOS,SRVPDP",
"local:default:application, local:annetnamespace:eksternapplication");
LOCAL_APP + ", local:annetnamespace:eksternapplication");
}

@Test
Expand Down Expand Up @@ -75,8 +78,8 @@ void skal_nekte_tilgang_til_saksbehandler_for_piptjeneste() {
@Test
void skal_gi_tilgang_for_intern_azure_cc() {
var token = new OpenIDToken(OpenIDProvider.AZUREAD, new TokenString("token"));
var sluttbruker = new SluttBruker("local:default:application", IdentType.Systemressurs);
when(tokenProvider.getUid()).thenReturn("local:default:application");
var sluttbruker = new SluttBruker(LOCAL_APP, IdentType.Systemressurs);
when(tokenProvider.getUid()).thenReturn(LOCAL_APP);
var attributter = lagBeskyttetRessursAttributterAzure(AvailabilityType.INTERNAL, token, sluttbruker);

when(pdpRequestBuilder.lagAppRessursData(any())).thenReturn(AppRessursData.builder().build());
Expand Down
4 changes: 4 additions & 0 deletions felles/log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum FpApplication {
private static final Environment ENV = Environment.current();
private static final Cluster CLUSTER = ENV.getCluster();
// FpApplication brukes til å kalle apps i namespace foreldrepenger - ikke riktig å bruke ENV/namespace
private static final Namespace FORELDREPENGER = Namespace.of("teamforeldrepenger");
private static final Namespace FORELDREPENGER = Namespace.foreldrepenger();

/*
* Utelatt fpabonnent:8065
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>0.4.0</version>
<version>0.4.1</version>
</parent>

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

0 comments on commit 8ec3e1e

Please sign in to comment.