From 77a3f063d51d7ecb7229a49f3f5f83fcd4340d85 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 7 Jul 2022 03:24:19 +0000 Subject: [PATCH 1/4] fix: upgrade org.flywaydb:flyway-core from 4.0.3 to 4.2.0 Snyk has created this PR to upgrade org.flywaydb:flyway-core from 4.0.3 to 4.2.0. See this package in Maven Repository: https://mvnrepository.com/artifact/org.flywaydb/flyway-core/ See this project in Snyk: https://app.snyk.io/org/obo/project/5215218e-a52b-492f-a0a9-3fda454c0941?utm_source=github&utm_medium=referral&page=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99ed0b22a..9c3905660 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ org.flywaydb flyway-core - 4.0.3 + 4.2.0 com.oracle.ojdbc From e46b6de44c8e33f030ff3f621f511a9cc3a07ceb Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 7 Jul 2022 03:24:22 +0000 Subject: [PATCH 2/4] fix: upgrade net.javacrumbs.shedlock:shedlock-provider-jdbc-template from 4.36.0 to 4.37.0 Snyk has created this PR to upgrade net.javacrumbs.shedlock:shedlock-provider-jdbc-template from 4.36.0 to 4.37.0. See this package in Maven Repository: https://mvnrepository.com/artifact/net.javacrumbs.shedlock/shedlock-provider-jdbc-template/ See this project in Snyk: https://app.snyk.io/org/obo/project/5215218e-a52b-492f-a0a9-3fda454c0941?utm_source=github&utm_medium=referral&page=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99ed0b22a..80ed8db14 100644 --- a/pom.xml +++ b/pom.xml @@ -122,7 +122,7 @@ net.javacrumbs.shedlock shedlock-provider-jdbc-template - 4.36.0 + 4.37.0 From 1b8744190192bd34e6043d3a856499991396f903 Mon Sep 17 00:00:00 2001 From: stianStensli Date: Thu, 22 Sep 2022 13:32:02 +0200 Subject: [PATCH 3/4] PDL med azureSts --- pom.xml | 2 +- .../config/ApplicationConfig.java | 8 ++++++++ .../config/ClientConfig.java | 20 +++++++++---------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 99ed0b22a..c725531ae 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 11 - 2.2022.07.01_07.12-6a0864fa6938 + 2.2022.09.15_07.46-e4fa96eb6813 1.2019.04.03-23.09-56488320520a 1.16.3 diff --git a/src/main/java/no/nav/veilarboppfolging/config/ApplicationConfig.java b/src/main/java/no/nav/veilarboppfolging/config/ApplicationConfig.java index 27fe698f9..23b9c3d3a 100644 --- a/src/main/java/no/nav/veilarboppfolging/config/ApplicationConfig.java +++ b/src/main/java/no/nav/veilarboppfolging/config/ApplicationConfig.java @@ -21,6 +21,8 @@ import no.nav.common.sts.NaisSystemUserTokenProvider; import no.nav.common.sts.OpenAmSystemUserTokenProvider; import no.nav.common.sts.SystemUserTokenProvider; +import no.nav.common.token_client.builder.AzureAdTokenClientBuilder; +import no.nav.common.token_client.client.AzureAdMachineToMachineTokenClient; import no.nav.common.utils.Credentials; import no.nav.common.utils.NaisUtils; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -85,6 +87,12 @@ public SystemUserTokenProvider systemUserTokenProvider(EnvironmentProperties pro return new NaisSystemUserTokenProvider(properties.getNaisStsDiscoveryUrl(), serviceUserCredentials.username, serviceUserCredentials.password); } + @Bean + public AzureAdMachineToMachineTokenClient azureAdMachineToMachineTokenClient() { + return AzureAdTokenClientBuilder.builder() + .withNaisDefaults() + .buildMachineToMachineTokenClient(); + } @Bean public static StsConfig stsConfig(EnvironmentProperties properties, Credentials serviceUserCredentials) { return StsConfig.builder() diff --git a/src/main/java/no/nav/veilarboppfolging/config/ClientConfig.java b/src/main/java/no/nav/veilarboppfolging/config/ClientConfig.java index 35e1f23d2..b6bef1f86 100644 --- a/src/main/java/no/nav/veilarboppfolging/config/ClientConfig.java +++ b/src/main/java/no/nav/veilarboppfolging/config/ClientConfig.java @@ -6,11 +6,11 @@ import no.nav.common.client.norg2.CachedNorg2Client; import no.nav.common.client.norg2.Norg2Client; import no.nav.common.client.norg2.NorgHttp2Client; -import no.nav.common.client.pdl.PdlClientImpl; import no.nav.common.cxf.StsConfig; import no.nav.common.sts.SystemUserTokenProvider; import no.nav.common.token_client.builder.AzureAdTokenClientBuilder; import no.nav.common.token_client.client.AzureAdOnBehalfOfTokenClient; +import no.nav.common.token_client.client.MachineToMachineTokenClient; import no.nav.common.utils.EnvironmentUtils; import no.nav.common.utils.UrlUtils; import no.nav.veilarboppfolging.client.behandle_arbeidssoker.BehandleArbeidssokerClient; @@ -31,18 +31,16 @@ public class ClientConfig { @Bean - public AktorOppslagClient aktorOppslagClient(SystemUserTokenProvider systemUserTokenProvider) { - final String PDL_URL = "pdl-api"; - String pdlUrl = isProduction() - ? createProdInternalIngressUrl(PDL_URL) - : createDevInternalIngressUrl(PDL_URL); + public AktorOppslagClient aktorOppslagClient(MachineToMachineTokenClient tokenClient) { + String tokenScop = String.format("api://%s-fss.pdl.pdl-api/.default", + isProduction() ? "prod" : "dev" + ); - PdlClientImpl pdlClient = new PdlClientImpl( - pdlUrl, - systemUserTokenProvider::getSystemUserToken, - systemUserTokenProvider::getSystemUserToken); + PdlAktorOppslagClient pdlClient = new PdlAktorOppslagClient( + createServiceUrl("pdl-api", "pdl", false), + () -> tokenClient.createMachineToMachineToken(tokenScop)); - return new CachedAktorOppslagClient(new PdlAktorOppslagClient(pdlClient)); + return new CachedAktorOppslagClient(pdlClient); } @Bean From 74a9a898caef92741b689cc0fe1a862175b82e1d Mon Sep 17 00:00:00 2001 From: stianStensli Date: Fri, 23 Sep 2022 10:23:18 +0200 Subject: [PATCH 4/4] Upgrade no.nav.tjenestespesifikasjoner:ytelseskontrakt-v3-tjenestespesifikasjon --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c725531ae..a2c09c6e4 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 11 2.2022.09.15_07.46-e4fa96eb6813 - 1.2019.04.03-23.09-56488320520a + 1.2019.09.25-00.21-49b69f0625e0 1.16.3