From 7a9b18551b902d3af9bba828d00ac244e5be586e Mon Sep 17 00:00:00 2001 From: Fredrik Ingebrigtsen Date: Thu, 10 Oct 2024 17:55:31 +0200 Subject: [PATCH] Handle empty prod values in maskinporten --- .../mulighetsrommet/tokenprovider/TokenProvider.kt | 3 ++- frontend/arena-adapter-manager/src/core/api.tsx | 1 - .../src/pages/MrApiManagement.tsx | 4 ---- .../api/okonomi/refusjon/RefusjonRoutes.kt | 11 +++++++---- .../api/plugins/DependencyInjection.kt | 5 +++-- .../src/main/resources/application-prod.yaml | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/common/token-provider/src/main/kotlin/no/nav/mulighetsrommet/tokenprovider/TokenProvider.kt b/common/token-provider/src/main/kotlin/no/nav/mulighetsrommet/tokenprovider/TokenProvider.kt index 8b29914134..512cd30cb2 100644 --- a/common/token-provider/src/main/kotlin/no/nav/mulighetsrommet/tokenprovider/TokenProvider.kt +++ b/common/token-provider/src/main/kotlin/no/nav/mulighetsrommet/tokenprovider/TokenProvider.kt @@ -115,7 +115,7 @@ private fun createM2mTokenClient(clientId: String, tokenEndpointUrl: String): Ma else -> AzureAdTokenClientBuilder.builder().withNaisDefaults().buildMachineToMachineTokenClient() } -fun createMaskinportenM2mTokenClient(clientId: String, tokenEndpointUrl: String, issuer: String): MaskinPortenTokenProvider = +fun createMaskinportenM2mTokenClient(clientId: String, tokenEndpointUrl: String, issuer: String): MaskinPortenTokenProvider? = when (NaisEnv.current()) { NaisEnv.Local -> MaskinPortenTokenProvider( clientId = clientId, @@ -123,6 +123,7 @@ fun createMaskinportenM2mTokenClient(clientId: String, tokenEndpointUrl: String, privateJwk = createMockRSAKey("maskinporten").toJSONString(), issuer = issuer, ) + NaisEnv.ProdGCP -> null // TODO: Remove when prod else -> MaskinPortenTokenProvider( clientId = clientId, tokenEndpointUrl = tokenEndpointUrl, diff --git a/frontend/arena-adapter-manager/src/core/api.tsx b/frontend/arena-adapter-manager/src/core/api.tsx index 1d23753c07..cc8bb79943 100644 --- a/frontend/arena-adapter-manager/src/core/api.tsx +++ b/frontend/arena-adapter-manager/src/core/api.tsx @@ -112,7 +112,6 @@ export type MrApiTask = | "initial-load-tiltaksgjennomforinger" | "sync-navansatte" | "sync-utdanning" - | "sync-arrangoransatte" | "generate-refusjonskrav"; export const runTask = (base: ApiBase, task: MrApiTask, input?: object) => diff --git a/frontend/arena-adapter-manager/src/pages/MrApiManagement.tsx b/frontend/arena-adapter-manager/src/pages/MrApiManagement.tsx index 0436684edf..f528e79759 100644 --- a/frontend/arena-adapter-manager/src/pages/MrApiManagement.tsx +++ b/frontend/arena-adapter-manager/src/pages/MrApiManagement.tsx @@ -34,10 +34,6 @@ export function MrApiManagement() { Synkroniserer data fra utdanning.no. - - Synkroniserer Arrangor-ansatte fra altinn-acl. - -