diff --git a/apps/adresse-service/src/test/resources/application-test.properties b/apps/adresse-service/src/test/resources/application-test.properties new file mode 100644 index 00000000000..e5e55886152 --- /dev/null +++ b/apps/adresse-service/src/test/resources/application-test.properties @@ -0,0 +1 @@ +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/amelding-service/src/main/resources/application.yml b/apps/amelding-service/src/main/resources/application.yml index f106a9729eb..fa8f86cbe4c 100644 --- a/apps/amelding-service/src/main/resources/application.yml +++ b/apps/amelding-service/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-amelding-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/amelding-service/src/test/resources/application-test.properties b/apps/amelding-service/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/apps/amelding-service/src/test/resources/application-test.properties +++ b/apps/amelding-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/app-tilgang-analyse-service/src/main/resources/application.yml b/apps/app-tilgang-analyse-service/src/main/resources/application.yml index db63a3f34cb..822047d0729 100644 --- a/apps/app-tilgang-analyse-service/src/main/resources/application.yml +++ b/apps/app-tilgang-analyse-service/src/main/resources/application.yml @@ -18,7 +18,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-app-tilgang-analyse-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/app-tilgang-analyse-service/src/test/resources/application-test.yml b/apps/app-tilgang-analyse-service/src/test/resources/application-test.yml index eccbfdfc4ce..060eeae71e3 100644 --- a/apps/app-tilgang-analyse-service/src/test/resources/application-test.yml +++ b/apps/app-tilgang-analyse-service/src/test/resources/application-test.yml @@ -4,4 +4,6 @@ spring: flyway: url: jdbc:h2:mem:testdb username: sa - password: \ No newline at end of file + password: + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/arbeidsforhold-service/src/main/resources/application.yml b/apps/arbeidsforhold-service/src/main/resources/application.yml index 56e358b61d4..a73601451b5 100644 --- a/apps/arbeidsforhold-service/src/main/resources/application.yml +++ b/apps/arbeidsforhold-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-arbeidsforhold-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/arbeidsforhold-service/src/test/resources/application-test.properties b/apps/arbeidsforhold-service/src/test/resources/application-test.properties index 01ff575320a..e5e55886152 100644 --- a/apps/arbeidsforhold-service/src/test/resources/application-test.properties +++ b/apps/arbeidsforhold-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.enabled=false - -azure.app.client.id=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/batch-bestilling-service/src/main/resources/application.yml b/apps/batch-bestilling-service/src/main/resources/application.yml index 3ce9274888a..c94c017e80e 100644 --- a/apps/batch-bestilling-service/src/main/resources/application.yml +++ b/apps/batch-bestilling-service/src/main/resources/application.yml @@ -19,7 +19,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-batch-bestilling-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/batch-bestilling-service/src/test/resources/application-test.properties b/apps/batch-bestilling-service/src/test/resources/application-test.properties index 148b7a6e0e6..21fe9ee111f 100644 --- a/apps/batch-bestilling-service/src/test/resources/application-test.properties +++ b/apps/batch-bestilling-service/src/test/resources/application-test.properties @@ -1 +1,2 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +spring.cloud.vault.token=dummy +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/apps/dolly-backend/src/test/resources/application-test.yaml b/apps/dolly-backend/src/test/resources/application-test.yaml index b5857a7a897..e12c19a2dc6 100644 --- a/apps/dolly-backend/src/test/resources/application-test.yaml +++ b/apps/dolly-backend/src/test/resources/application-test.yaml @@ -1,10 +1,7 @@ APP_NAME: dolly APP_VERSION: ${application.version} environment: localhost -CLIENT_ID: dummy -CLIENT_SECRET: dummy - -TOKEN_X_CLIENT_ID: test +TOKEN_X_ISSUER: dummy jira: host: http://localhost:${wiremock.server.port:0}/jira diff --git a/apps/dolly-frontend/src/test/resources/application-test.yml b/apps/dolly-frontend/src/test/resources/application-test.yml index 94ad768e500..74bf801179e 100644 --- a/apps/dolly-frontend/src/test/resources/application-test.yml +++ b/apps/dolly-frontend/src/test/resources/application-test.yml @@ -1,7 +1,4 @@ -spring.cloud.vault.token: dummy - -azure.app.client.id: dummy -azure.app.client.secret: dummy +TOKEN_X_ISSUER: dummy IDPORTEN_CLIENT_ID: dummy IDPORTEN_CLIENT_JWK: "{}" diff --git a/apps/endringsmelding-service/src/main/resources/application.yml b/apps/endringsmelding-service/src/main/resources/application.yml index 0b993578795..40398f5dfe6 100644 --- a/apps/endringsmelding-service/src/main/resources/application.yml +++ b/apps/endringsmelding-service/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-endringsmelding-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/endringsmelding-service/src/test/resources/application-test.properties b/apps/endringsmelding-service/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/apps/endringsmelding-service/src/test/resources/application-test.properties +++ b/apps/endringsmelding-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/resources/application.yml b/apps/ereg-batch-status-service/src/main/resources/application.yml index d7c652f2de6..ede2e74d146 100644 --- a/apps/ereg-batch-status-service/src/main/resources/application.yml +++ b/apps/ereg-batch-status-service/src/main/resources/application.yml @@ -17,7 +17,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-fss:dolly:ereg-batch-status-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/ereg-batch-status-service/src/test/resources/application-test.properties b/apps/ereg-batch-status-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/ereg-batch-status-service/src/test/resources/application-test.properties +++ b/apps/ereg-batch-status-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml index 1148c60d027..f00988c5f62 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-generer-arbeidsforhold-populasjon-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/test/resources/application-test.properties b/apps/generer-arbeidsforhold-populasjon-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/test/resources/application-test.properties +++ b/apps/generer-arbeidsforhold-populasjon-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/generer-navn-service/src/main/resources/application.yml b/apps/generer-navn-service/src/main/resources/application.yml index ab3de3c2152..fbf80725da1 100644 --- a/apps/generer-navn-service/src/main/resources/application.yml +++ b/apps/generer-navn-service/src/main/resources/application.yml @@ -17,7 +17,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:generer-navn-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/generer-navn-service/src/test/resources/application-test.properties b/apps/generer-navn-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/generer-navn-service/src/test/resources/application-test.properties +++ b/apps/generer-navn-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml b/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml index 39a30785e63..1095396feec 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml +++ b/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-generer-organisasjon-populasjon-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/generer-organisasjon-populasjon-service/src/test/resources/application-test.properties b/apps/generer-organisasjon-populasjon-service/src/test/resources/application-test.properties index d0fd67ad6d8..f039fb475ec 100644 --- a/apps/generer-organisasjon-populasjon-service/src/test/resources/application-test.properties +++ b/apps/generer-organisasjon-populasjon-service/src/test/resources/application-test.properties @@ -1,2 +1,2 @@ -spring.cloud.vault.token=dummy +TOKEN_X_ISSUER=dummy KAFKA_KEYSTORE_PATH="" \ No newline at end of file diff --git a/apps/generer-synt-amelding-service/src/main/resources/application-dev.yml b/apps/generer-synt-amelding-service/src/main/resources/application-dev.yml deleted file mode 100644 index 968e537aa99..00000000000 --- a/apps/generer-synt-amelding-service/src/main/resources/application-dev.yml +++ /dev/null @@ -1,5 +0,0 @@ -azure: - app: - client: - id: ${client_id} - secret: ${client_secret} diff --git a/apps/generer-synt-amelding-service/src/main/resources/application.yml b/apps/generer-synt-amelding-service/src/main/resources/application.yml index f7d1f1b0875..646d5965c2f 100644 --- a/apps/generer-synt-amelding-service/src/main/resources/application.yml +++ b/apps/generer-synt-amelding-service/src/main/resources/application.yml @@ -19,7 +19,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-generer-synt-amelding-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/generer-synt-amelding-service/src/test/resources/application-test.yml b/apps/generer-synt-amelding-service/src/test/resources/application-test.yml index 1513514ac87..c7ad525dd9c 100644 --- a/apps/generer-synt-amelding-service/src/test/resources/application-test.yml +++ b/apps/generer-synt-amelding-service/src/test/resources/application-test.yml @@ -18,3 +18,4 @@ consumers: AAD_ISSUER_URI: http://localhost:${wiremock.server.port:0}/token +TOKEN_X_ISSUER: dummy diff --git a/apps/geografiske-kodeverk-service/src/main/resources/application.yml b/apps/geografiske-kodeverk-service/src/main/resources/application.yml index 45676355a89..90f1aec1670 100644 --- a/apps/geografiske-kodeverk-service/src/main/resources/application.yml +++ b/apps/geografiske-kodeverk-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-geografiske-kodeverk-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/ApplicationContextTest.java b/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/ApplicationContextTest.java index d4e219fc3b7..f381bd8b4d9 100644 --- a/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/ApplicationContextTest.java +++ b/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/ApplicationContextTest.java @@ -4,8 +4,10 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") public class ApplicationContextTest { @MockBean diff --git a/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/provider/KodeverkControllerTest.java b/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/provider/KodeverkControllerTest.java index 5f8c8ade095..e84648bf685 100644 --- a/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/provider/KodeverkControllerTest.java +++ b/apps/geografiske-kodeverk-service/src/test/java/no/nav/registre/testnav/geografiskekodeverkservice/provider/KodeverkControllerTest.java @@ -9,6 +9,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; @@ -17,10 +18,10 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; @SpringBootTest +@ActiveProfiles("test") @AutoConfigureMockMvc(addFilters = false) class KodeverkControllerTest { @@ -265,7 +266,7 @@ void should_return_bad_request_when_embetenavn_is_not_alphabetical() throws Exce private List readResponse(MvcResult result) throws Exception { Kodeverk[] array = objectMapper.readValue(result.getResponse().getContentAsString(), Kodeverk[].class); - return Arrays.stream(array).collect(Collectors.toUnmodifiableList()); + return Arrays.stream(array).toList(); } } \ No newline at end of file diff --git a/apps/geografiske-kodeverk-service/src/test/resources/application-test.properties b/apps/geografiske-kodeverk-service/src/test/resources/application-test.properties new file mode 100644 index 00000000000..38e5e4b2b5e --- /dev/null +++ b/apps/geografiske-kodeverk-service/src/test/resources/application-test.properties @@ -0,0 +1 @@ +TOKEN_X_ISSUER=DUMMY diff --git a/apps/helsepersonell-service/src/main/resources/application.yml b/apps/helsepersonell-service/src/main/resources/application.yml index 6882258e006..1d0a77c0f9f 100644 --- a/apps/helsepersonell-service/src/main/resources/application.yml +++ b/apps/helsepersonell-service/src/main/resources/application.yml @@ -20,7 +20,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-helsepersonell-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/helsepersonell-service/src/test/resources/application-test.properties b/apps/helsepersonell-service/src/test/resources/application-test.properties new file mode 100644 index 00000000000..e5e55886152 --- /dev/null +++ b/apps/helsepersonell-service/src/test/resources/application-test.properties @@ -0,0 +1 @@ +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/resources/application.yml b/apps/inntektsmelding-generator-service/src/main/resources/application.yml index ca1a4d8fe95..acd2b99aafa 100644 --- a/apps/inntektsmelding-generator-service/src/main/resources/application.yml +++ b/apps/inntektsmelding-generator-service/src/main/resources/application.yml @@ -16,7 +16,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-inntektsmelding-generator-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/inntektsmelding-generator-service/src/test/java/no/nav/registre/inntektsmeldinggeneratorservice/ApplicationContextTest.java b/apps/inntektsmelding-generator-service/src/test/java/no/nav/registre/inntektsmeldinggeneratorservice/ApplicationContextTest.java index f9e74976829..faee7505b3e 100644 --- a/apps/inntektsmelding-generator-service/src/test/java/no/nav/registre/inntektsmeldinggeneratorservice/ApplicationContextTest.java +++ b/apps/inntektsmelding-generator-service/src/test/java/no/nav/registre/inntektsmeldinggeneratorservice/ApplicationContextTest.java @@ -4,7 +4,9 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; +@ActiveProfiles("test") @SpringBootTest public class ApplicationContextTest { diff --git a/apps/inntektsmelding-generator-service/src/test/resources/application-test.properties b/apps/inntektsmelding-generator-service/src/test/resources/application-test.properties index da059fb49a7..69cc41673f4 100644 --- a/apps/inntektsmelding-generator-service/src/test/resources/application-test.properties +++ b/apps/inntektsmelding-generator-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=DUMMY +TOKEN_X_ISSUER=dummy diff --git a/apps/inntektsmelding-service/src/main/resources/application.yml b/apps/inntektsmelding-service/src/main/resources/application.yml index 83fedbcd13d..c47500f7574 100644 --- a/apps/inntektsmelding-service/src/main/resources/application.yml +++ b/apps/inntektsmelding-service/src/main/resources/application.yml @@ -20,7 +20,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-inntektsmelding-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/inntektsmelding-service/src/test/java/no/nav/registre/testnav/inntektsmeldingservice/ApplicationContextTest.java b/apps/inntektsmelding-service/src/test/java/no/nav/registre/testnav/inntektsmeldingservice/ApplicationContextTest.java index 736cbb78c92..a06020db1b7 100644 --- a/apps/inntektsmelding-service/src/test/java/no/nav/registre/testnav/inntektsmeldingservice/ApplicationContextTest.java +++ b/apps/inntektsmelding-service/src/test/java/no/nav/registre/testnav/inntektsmeldingservice/ApplicationContextTest.java @@ -4,8 +4,10 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") public class ApplicationContextTest { @MockBean diff --git a/apps/inntektsmelding-service/src/test/resources/application-test.properties b/apps/inntektsmelding-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/inntektsmelding-service/src/test/resources/application-test.properties +++ b/apps/inntektsmelding-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/jenkins-batch-status-service/src/main/resources/application.yml b/apps/jenkins-batch-status-service/src/main/resources/application.yml index c09c90173bb..282bf9b0a24 100644 --- a/apps/jenkins-batch-status-service/src/main/resources/application.yml +++ b/apps/jenkins-batch-status-service/src/main/resources/application.yml @@ -17,7 +17,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-jenkins-batch-status-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/jenkins-batch-status-service/src/test/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/ApplicationContextTest.java b/apps/jenkins-batch-status-service/src/test/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/ApplicationContextTest.java index 365f550488c..9fc4b631887 100644 --- a/apps/jenkins-batch-status-service/src/test/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/ApplicationContextTest.java +++ b/apps/jenkins-batch-status-service/src/test/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/ApplicationContextTest.java @@ -4,8 +4,10 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") public class ApplicationContextTest { @MockBean diff --git a/apps/jenkins-batch-status-service/src/test/resources/application-test.properties b/apps/jenkins-batch-status-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/jenkins-batch-status-service/src/test/resources/application-test.properties +++ b/apps/jenkins-batch-status-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/joark-dokument-service/src/main/resources/application.yml b/apps/joark-dokument-service/src/main/resources/application.yml index 328c45046f5..d9900d2f2c7 100644 --- a/apps/joark-dokument-service/src/main/resources/application.yml +++ b/apps/joark-dokument-service/src/main/resources/application.yml @@ -22,7 +22,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-joark-dokument-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/joark-dokument-service/src/test/java/no/nav/testnav/joarkdokumentservice/ApplicationContextTest.java b/apps/joark-dokument-service/src/test/java/no/nav/testnav/joarkdokumentservice/ApplicationContextTest.java index e3fb2a3f8a4..b6b552e1b36 100644 --- a/apps/joark-dokument-service/src/test/java/no/nav/testnav/joarkdokumentservice/ApplicationContextTest.java +++ b/apps/joark-dokument-service/src/test/java/no/nav/testnav/joarkdokumentservice/ApplicationContextTest.java @@ -4,7 +4,9 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; +@ActiveProfiles("test") @SpringBootTest public class ApplicationContextTest { diff --git a/apps/joark-dokument-service/src/test/resources/application-test.properties b/apps/joark-dokument-service/src/test/resources/application-test.properties new file mode 100644 index 00000000000..367e3b34681 --- /dev/null +++ b/apps/joark-dokument-service/src/test/resources/application-test.properties @@ -0,0 +1,3 @@ +spring.cloud.vault.token=dummy +azure.app.client.id=dummy +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/apps/miljoer-service/src/main/resources/application.yml b/apps/miljoer-service/src/main/resources/application.yml index daa2c0307ea..7fd89e5b822 100644 --- a/apps/miljoer-service/src/main/resources/application.yml +++ b/apps/miljoer-service/src/main/resources/application.yml @@ -19,7 +19,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-miljoer-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/miljoer-service/src/test/java/no/nav/registre/testnorge/miljoerservice/ApplicationContextTest.java b/apps/miljoer-service/src/test/java/no/nav/registre/testnorge/miljoerservice/ApplicationContextTest.java index 5c714c2b198..44ecb7599b0 100644 --- a/apps/miljoer-service/src/test/java/no/nav/registre/testnorge/miljoerservice/ApplicationContextTest.java +++ b/apps/miljoer-service/src/test/java/no/nav/registre/testnorge/miljoerservice/ApplicationContextTest.java @@ -4,7 +4,9 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.JwtDecoder; +import org.springframework.test.context.ActiveProfiles; +@ActiveProfiles("test") @SpringBootTest public class ApplicationContextTest { diff --git a/apps/miljoer-service/src/test/resources/application-test.properties b/apps/miljoer-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/miljoer-service/src/test/resources/application-test.properties +++ b/apps/miljoer-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/oppsummeringsdokument-service/src/main/resources/application.yml b/apps/oppsummeringsdokument-service/src/main/resources/application.yml index 305f2111889..3c0c3943611 100644 --- a/apps/oppsummeringsdokument-service/src/main/resources/application.yml +++ b/apps/oppsummeringsdokument-service/src/main/resources/application.yml @@ -19,7 +19,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:oppsummeringsdokument-service + accepted-audience: ${TOKEN_X_CLIENT_ID} application: name: oppsummeringsdokument-service version: application.version.todo #TODO Finn ut hvordan denne kan settes fra gradle diff --git a/apps/organisasjon-bestilling-service/src/main/resources/application.yml b/apps/organisasjon-bestilling-service/src/main/resources/application.yml index 0b918a8e94a..3d3df5fd455 100644 --- a/apps/organisasjon-bestilling-service/src/main/resources/application.yml +++ b/apps/organisasjon-bestilling-service/src/main/resources/application.yml @@ -18,7 +18,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:organisasjon-bestilling-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/organisasjon-bestilling-service/src/test/resources/application-test.properties b/apps/organisasjon-bestilling-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/organisasjon-bestilling-service/src/test/resources/application-test.properties +++ b/apps/organisasjon-bestilling-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/organisasjon-faste-data-service/src/main/resources/application.yml b/apps/organisasjon-faste-data-service/src/main/resources/application.yml index 644b91741fa..8a26cd2b93a 100644 --- a/apps/organisasjon-faste-data-service/src/main/resources/application.yml +++ b/apps/organisasjon-faste-data-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-organisasjon-faste-data-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/organisasjon-faste-data-service/src/test/resources/application-test.properties b/apps/organisasjon-faste-data-service/src/test/resources/application-test.properties index 148b7a6e0e6..e5e55886152 100644 --- a/apps/organisasjon-faste-data-service/src/test/resources/application-test.properties +++ b/apps/organisasjon-faste-data-service/src/test/resources/application-test.properties @@ -1 +1 @@ -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/organisasjon-forvalter/src/main/resources/application.yml b/apps/organisasjon-forvalter/src/main/resources/application.yml index e228c997e77..281ffe2add2 100644 --- a/apps/organisasjon-forvalter/src/main/resources/application.yml +++ b/apps/organisasjon-forvalter/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-organisasjon-forvalter + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/organisasjon-forvalter/src/test/resources/application-test.properties b/apps/organisasjon-forvalter/src/test/resources/application-test.properties index 938fc4b3fd4..1e29034ae2b 100644 --- a/apps/organisasjon-forvalter/src/test/resources/application-test.properties +++ b/apps/organisasjon-forvalter/src/test/resources/application-test.properties @@ -1,4 +1,4 @@ -spring.cloud.vault.token=dummy +TOKEN_X_ISSUER=dummy spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver diff --git a/apps/organisasjon-mottak-service/src/main/resources/application.yml b/apps/organisasjon-mottak-service/src/main/resources/application.yml index dc169aaadcb..12b7a1c3f77 100644 --- a/apps/organisasjon-mottak-service/src/main/resources/application.yml +++ b/apps/organisasjon-mottak-service/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-organisasjon-mottak-service + accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: diff --git a/apps/organisasjon-mottak-service/src/test/resources/application-test.properties b/apps/organisasjon-mottak-service/src/test/resources/application-test.properties index 62ea7c95ced..a550c3bea79 100644 --- a/apps/organisasjon-mottak-service/src/test/resources/application-test.properties +++ b/apps/organisasjon-mottak-service/src/test/resources/application-test.properties @@ -1,4 +1,4 @@ -spring.cloud.vault.token=dummy +TOKEN_X_ISSUER=dummy kafka.bootstrapservers= dummy kafka.schemaregistryservers= dummy diff --git a/apps/organisasjon-service/src/main/resources/application.yml b/apps/organisasjon-service/src/main/resources/application.yml index 9c107eba3e6..0b30288e953 100644 --- a/apps/organisasjon-service/src/main/resources/application.yml +++ b/apps/organisasjon-service/src/main/resources/application.yml @@ -13,7 +13,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-organisasjon-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/organisasjon-service/src/test/resources/application-test.properties b/apps/organisasjon-service/src/test/resources/application-test.properties index b14a316d82c..6763c44e6a5 100644 --- a/apps/organisasjon-service/src/test/resources/application-test.properties +++ b/apps/organisasjon-service/src/test/resources/application-test.properties @@ -1,3 +1,3 @@ consumers.ereg.url=http://localhost:${wiremock.server.port} -spring.cloud.vault.token=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/organisasjon-tilgang-service/config.yml b/apps/organisasjon-tilgang-service/config.yml index bff45c004e8..81468423d37 100644 --- a/apps/organisasjon-tilgang-service/config.yml +++ b/apps/organisasjon-tilgang-service/config.yml @@ -71,8 +71,6 @@ spec: env: - name: SPRING_PROFILES_ACTIVE value: prod - - name: ACCEPTED_AUDIENCE - value: dev-gcp:dolly:testnav-organisasjon-tilgang-service gcp: sqlInstances: - type: POSTGRES_15 diff --git a/apps/organisasjon-tilgang-service/src/main/resources/application-local.yml b/apps/organisasjon-tilgang-service/src/main/resources/application-local.yml index 919d2a5f08a..f212b988f4a 100644 --- a/apps/organisasjon-tilgang-service/src/main/resources/application-local.yml +++ b/apps/organisasjon-tilgang-service/src/main/resources/application-local.yml @@ -1,6 +1,6 @@ +TOKEN_X_ISSUER: dummy ALTINN_URL: https://tt02.altinn.no -ACCEPTED_AUDIENCE: dev-gcp:dolly:testnav-organisasjon-tilgang-service altinn.api.key: dummy @@ -13,9 +13,4 @@ spring: flyway: url: jdbc:h2:mem:testdb username: sa - password: - security: - oauth2: - resourceserver: - tokenx: - accepted-audience: dev-gcp:dolly:testnav-organisasjon-tilgang-service \ No newline at end of file + password: \ No newline at end of file diff --git a/apps/organisasjon-tilgang-service/src/main/resources/application.yml b/apps/organisasjon-tilgang-service/src/main/resources/application.yml index 2199840e766..c8e30c1fe89 100644 --- a/apps/organisasjon-tilgang-service/src/main/resources/application.yml +++ b/apps/organisasjon-tilgang-service/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${ACCEPTED_AUDIENCE} + accepted-audience: ${TOKEN_X_CLIENT_ID} jackson: serialization: write_dates_as_timestamps: false diff --git a/apps/organisasjon-tilgang-service/src/test/resources/application-test.yml b/apps/organisasjon-tilgang-service/src/test/resources/application-test.yml index e71cf08015e..dfbee67495e 100644 --- a/apps/organisasjon-tilgang-service/src/test/resources/application-test.yml +++ b/apps/organisasjon-tilgang-service/src/test/resources/application-test.yml @@ -4,4 +4,4 @@ MASKINPORTEN_CLIENT_ID: dummy MASKINPORTEN_CLIENT_JWK: dummy MASKINPORTEN_SCOPES: dummy MASKINPORTEN_WELL_KNOWN_URL: http://localhost:8080 -TOKENDINGS_URL: dummy \ No newline at end of file +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/orgnummer-service/src/test/resources/application-test.properties b/apps/orgnummer-service/src/test/resources/application-test.properties index 4e5df07aef2..e5e55886152 100644 --- a/apps/orgnummer-service/src/test/resources/application-test.properties +++ b/apps/orgnummer-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.enabled=false -spring.flyway.enabled=true -azure.app.client.id=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/orgnummer-service/src/test/resources/bootstrap.yml b/apps/orgnummer-service/src/test/resources/bootstrap.yml deleted file mode 100644 index 0451449ca23..00000000000 --- a/apps/orgnummer-service/src/test/resources/bootstrap.yml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - cloud: - vault: - enabled: false \ No newline at end of file diff --git a/apps/person-faste-data-service/src/test/resources/application-test.properties b/apps/person-faste-data-service/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/apps/person-faste-data-service/src/test/resources/application-test.properties +++ b/apps/person-faste-data-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/person-organisasjon-tilgang-service/config.test.yml b/apps/person-organisasjon-tilgang-service/config.test.yml index c8333fea47a..54478aa5165 100644 --- a/apps/person-organisasjon-tilgang-service/config.test.yml +++ b/apps/person-organisasjon-tilgang-service/config.test.yml @@ -65,7 +65,5 @@ spec: env: - name: SPRING_PROFILES_ACTIVE value: prod - - name: ACCEPTED_AUDIENCE - value: dev-gcp:dolly:testnav-person-organisasjon-tilgang-service-dev - name: ALTINN_URL value: https://tt02.altinn.no diff --git a/apps/person-organisasjon-tilgang-service/config.yml b/apps/person-organisasjon-tilgang-service/config.yml index 6b50b8c7ea4..9cf9e9e8286 100644 --- a/apps/person-organisasjon-tilgang-service/config.yml +++ b/apps/person-organisasjon-tilgang-service/config.yml @@ -60,7 +60,5 @@ spec: env: - name: SPRING_PROFILES_ACTIVE value: prod - - name: ACCEPTED_AUDIENCE - value: dev-gcp:dolly:testnav-person-organisasjon-tilgang-service - name: ALTINN_URL value: https://altinn.no \ No newline at end of file diff --git a/apps/person-organisasjon-tilgang-service/src/main/resources/application-local.yml b/apps/person-organisasjon-tilgang-service/src/main/resources/application-local.yml index 619ed0070da..75b070dc5c2 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/resources/application-local.yml +++ b/apps/person-organisasjon-tilgang-service/src/main/resources/application-local.yml @@ -1,7 +1,8 @@ -ACCEPTED_AUDIENCE: dev-gcp:dolly:testnav-person-tilgang-service-dev ALTINN_URL: https://tt02.altinn.no -TOKENDINGS_URL: dummy +TOKEN_X_ISSUER: dummy +OKEN_X_JWKS_URI: dummy +TOKEN_X_CLIENT_ID: dummy ALTINN_API_KEY: dummy MASKINPORTEN_CLIENT_ID: dummy diff --git a/apps/person-organisasjon-tilgang-service/src/main/resources/application-virtual.yml b/apps/person-organisasjon-tilgang-service/src/main/resources/application-virtual.yml index 4ccf23a19b7..328010a8d87 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/resources/application-virtual.yml +++ b/apps/person-organisasjon-tilgang-service/src/main/resources/application-virtual.yml @@ -1,18 +1,12 @@ -spring: - security: - oauth2: - resourceserver: - tokenx: - issuer-uri: http://tokendings:8080 - jwk-set-uri: http://tokendings:8080/jwks - accepted-audience: dev-gcp:dolly:testnav-person-organisasjon-tilgang-service +TOKEN_X_ISSUER: http://tokendings:8080 +OKEN_X_JWKS_URI: http://tokendings:8080/jwks +TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-person-organisasjon-tilgang-service + altinn: api: url: http://altinn:8080 key: dummy-altinn-key - -TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-person-organisasjon-tilgang-service TOKEN_X_WELL_KNOWN_URL: http://tokendings:8080/.well-known/oauth-authorization-server MASKINPORTEN_CLIENT_ID: client-id diff --git a/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml b/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml index 1c39105ed8f..749173ef3ec 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml +++ b/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml @@ -10,7 +10,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${ACCEPTED_AUDIENCE} + accepted-audience: ${TOKEN_X_CLIENT_ID} jackson: serialization: write_dates_as_timestamps: false diff --git a/apps/person-organisasjon-tilgang-service/src/test/resources/application-test.yml b/apps/person-organisasjon-tilgang-service/src/test/resources/application-test.yml index 4498acd4c67..a52f05f20ca 100644 --- a/apps/person-organisasjon-tilgang-service/src/test/resources/application-test.yml +++ b/apps/person-organisasjon-tilgang-service/src/test/resources/application-test.yml @@ -1,4 +1,4 @@ -TOKENDINGS_URL: dummy +TOKEN_X_ISSUER: dummy ALTINN_URL: dummy ALTINN_API_KEY: dummy MASKINPORTEN_CLIENT_ID: dummy diff --git a/apps/person-search-service/src/main/resources/application.yml b/apps/person-search-service/src/main/resources/application.yml index dca7eccde22..c98ec2ef19c 100644 --- a/apps/person-search-service/src/main/resources/application.yml +++ b/apps/person-search-service/src/main/resources/application.yml @@ -19,7 +19,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-person-search-service + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: vault: enabled: false diff --git a/apps/person-search-service/src/test/resources/application-test.yml b/apps/person-search-service/src/test/resources/application-test.yml index 3a0f14cc6c1..6ddfd499610 100644 --- a/apps/person-search-service/src/test/resources/application-test.yml +++ b/apps/person-search-service/src/test/resources/application-test.yml @@ -1,13 +1,4 @@ -spring: - cloud: - vault: - token: dummy - -azure: - app: - client: - id: dummy - secret: dummy +TOKEN_X_ISSUER: dummy elasticsearch: client: diff --git a/apps/person-service/src/main/resources/application.yml b/apps/person-service/src/main/resources/application.yml index 78338d5457a..484075fff2e 100644 --- a/apps/person-service/src/main/resources/application.yml +++ b/apps/person-service/src/main/resources/application.yml @@ -21,7 +21,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-person-service + accepted-audience: ${TOKEN_X_CLIENT_ID} jackson: serialization: write_dates_as_timestamps: false diff --git a/apps/person-service/src/test/resources/application-test.properties b/apps/person-service/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/apps/person-service/src/test/resources/application-test.properties +++ b/apps/person-service/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/apps/person-service/src/test/resources/bootstrap-test.yml b/apps/person-service/src/test/resources/bootstrap-test.yml deleted file mode 100644 index 0451449ca23..00000000000 --- a/apps/person-service/src/test/resources/bootstrap-test.yml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - cloud: - vault: - enabled: false \ No newline at end of file diff --git a/apps/profil-api/src/main/resources/application-dev.yml b/apps/profil-api/src/main/resources/application-dev.yml index 1fd4c13efb3..67eeb473689 100644 --- a/apps/profil-api/src/main/resources/application-dev.yml +++ b/apps/profil-api/src/main/resources/application-dev.yml @@ -1,12 +1,4 @@ -spring: - security: - oauth2: - resourceserver: - tokenx: - accepted-audience: dev-gcp:dolly:testnorge-profil-api-dev - - consumers: testnav-person-organisasjon-tilgang-service: cluster: dev-gcp diff --git a/apps/profil-api/src/test/resources/application-test.yml b/apps/profil-api/src/test/resources/application-test.yml index b77364d0b03..91377f25679 100644 --- a/apps/profil-api/src/test/resources/application-test.yml +++ b/apps/profil-api/src/test/resources/application-test.yml @@ -1,9 +1,4 @@ -spring.cloud.vault.token: dummy - -CLIENT_SECRET: dummy -CLIENT_ID: dummy - -azure.app.client.id: dummy +TOKEN_X_ISSUER: dummy consumers: testnav-person-organisasjon-tilgang-service: diff --git a/apps/synt-sykemelding-api/src/test/resources/application-test.yml b/apps/synt-sykemelding-api/src/test/resources/application-test.yml index 36f73fafe86..1f8e50d2449 100644 --- a/apps/synt-sykemelding-api/src/test/resources/application-test.yml +++ b/apps/synt-sykemelding-api/src/test/resources/application-test.yml @@ -2,19 +2,7 @@ wiremock: server: port: 0 -spring: - cloud: - vault: - enabled: false - token: dummy - -azure: - app: - client: - id: dummy - secret: dummy - -TOKEN_X_CLIENT_ID: test +TOKEN_X_ISSUER: dummy consumers: synt-sykemelding: diff --git a/apps/synt-vedtakshistorikk-service/src/test/resources/application-test.yml b/apps/synt-vedtakshistorikk-service/src/test/resources/application-test.yml index aae5c789dd2..c3803f91db5 100644 --- a/apps/synt-vedtakshistorikk-service/src/test/resources/application-test.yml +++ b/apps/synt-vedtakshistorikk-service/src/test/resources/application-test.yml @@ -1,13 +1,4 @@ -spring: - cloud: - vault: - token: dummy - -azure: - app: - client: - id: dummy - secret: dummy +TOKEN_X_ISSUER: dummy consumers: synt-vedtakshistorikk: diff --git a/apps/testnav-ident-pool/src/test/resources/application.properties b/apps/testnav-ident-pool/src/test/resources/application.properties index 38a61f770b5..1691598aacc 100644 --- a/apps/testnav-ident-pool/src/test/resources/application.properties +++ b/apps/testnav-ident-pool/src/test/resources/application.properties @@ -3,5 +3,5 @@ spring.datasource.driver-class-name=org.h2.Driver spring.datasource.url=jdbc:h2:mem:testdb;MODE=Postgresql;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE; tps-forvalteren.rest.api.url=dummy -client_id=dummy -client_secret=dummy \ No newline at end of file + +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/apps/testnorge-statisk-data-forvalter/src/test/resources/application-test.yml b/apps/testnorge-statisk-data-forvalter/src/test/resources/application-test.yml index 796bbf785f2..645c29acb45 100644 --- a/apps/testnorge-statisk-data-forvalter/src/test/resources/application-test.yml +++ b/apps/testnorge-statisk-data-forvalter/src/test/resources/application-test.yml @@ -58,4 +58,6 @@ controller.staticdata.cache.hours: 24 azure.app.client.id: dummy KAFKA_SCHEMA_REGISTRY: http://localhost:9009 -kafka.groupid: organisasjon-forvalter-v1 \ No newline at end of file +kafka.groupid: organisasjon-forvalter-v1 + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/tilbakemelding-api/src/test/resources/application-test.properties b/apps/tilbakemelding-api/src/test/resources/application-test.properties index 3f367f2b39c..264669ce891 100644 --- a/apps/tilbakemelding-api/src/test/resources/application-test.properties +++ b/apps/tilbakemelding-api/src/test/resources/application-test.properties @@ -1,3 +1,4 @@ spring.cloud.vault.token=dummy SLACK_TOKEN=dummy -SLACK_CHANNEL=dummy \ No newline at end of file +SLACK_CHANNEL=dummy +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/apps/tps-messaging-service/src/test/Resources/application-test.yaml b/apps/tps-messaging-service/src/test/Resources/application-test.yaml index c26aab17ea7..703b0468a5a 100644 --- a/apps/tps-messaging-service/src/test/Resources/application-test.yaml +++ b/apps/tps-messaging-service/src/test/Resources/application-test.yaml @@ -12,4 +12,6 @@ consumers: url: http://not.actually.used cluster: dev-gcp namespace: dolly - name: testnav-miljoer-service \ No newline at end of file + name: testnav-miljoer-service + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/udi-stub/src/test/resources/application-test.yml b/apps/udi-stub/src/test/resources/application-test.yml index 8edb78eaf38..7e72df27c24 100644 --- a/apps/udi-stub/src/test/resources/application-test.yml +++ b/apps/udi-stub/src/test/resources/application-test.yml @@ -14,3 +14,5 @@ spring: ddl-auto: create flyway: enabled: false + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/varslinger-service/src/test/resources/application-test.properties b/apps/varslinger-service/src/test/resources/application-test.properties index 08706a33278..367e3b34681 100644 --- a/apps/varslinger-service/src/test/resources/application-test.properties +++ b/apps/varslinger-service/src/test/resources/application-test.properties @@ -1,2 +1,3 @@ spring.cloud.vault.token=dummy -azure.app.client.id=dummy \ No newline at end of file +azure.app.client.id=dummy +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/proxies/aareg-proxy/src/main/resources/application-local.yaml b/proxies/aareg-proxy/src/main/resources/application-local.yaml index c228d5d75c5..7d3efcea59b 100644 --- a/proxies/aareg-proxy/src/main/resources/application-local.yaml +++ b/proxies/aareg-proxy/src/main/resources/application-local.yaml @@ -1,4 +1,4 @@ -TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-aareg-proxy +TOKEN_X_ISSUER: dummy management: endpoint: diff --git a/proxies/aareg-proxy/src/test/resources/application-test.properties b/proxies/aareg-proxy/src/test/resources/application-test.properties new file mode 100644 index 00000000000..e5e55886152 --- /dev/null +++ b/proxies/aareg-proxy/src/test/resources/application-test.properties @@ -0,0 +1 @@ +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/proxies/aareg-synt-services-proxy/src/test/resources/application-test.properties b/proxies/aareg-synt-services-proxy/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/proxies/aareg-synt-services-proxy/src/test/resources/application-test.properties +++ b/proxies/aareg-synt-services-proxy/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml b/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml index e49e4d8c0ac..e9ee116ac3c 100644 --- a/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml +++ b/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: tokenx: issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: dev-gcp:dolly:testnav-arbeidsplassencv-proxy + accepted-audience: ${TOKEN_X_CLIENT_ID} cloud: gateway: httpclient: diff --git a/proxies/arbeidsplassencv-proxy/src/test/resources/application-test.yml b/proxies/arbeidsplassencv-proxy/src/test/resources/application-test.yml index c84ad4a48ba..f00334410e1 100644 --- a/proxies/arbeidsplassencv-proxy/src/test/resources/application-test.yml +++ b/proxies/arbeidsplassencv-proxy/src/test/resources/application-test.yml @@ -1,4 +1,4 @@ -azure.app.client.id: dummy +TOKEN_X_ISSUER: dummy consumers: arbeidsplassencv: diff --git a/proxies/arena-forvalteren-proxy/src/test/resources/application-test.yml b/proxies/arena-forvalteren-proxy/src/test/resources/application-test.yml index 8f6f189803a..57492dbb248 100644 --- a/proxies/arena-forvalteren-proxy/src/test/resources/application-test.yml +++ b/proxies/arena-forvalteren-proxy/src/test/resources/application-test.yml @@ -4,4 +4,6 @@ app: name: arena-dummy namespace: teamarenanais url: http://arena-dummy.dummy.no - cluster: dev-fss \ No newline at end of file + cluster: dev-fss + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/batch-adeo-proxy/src/test/resources/application-test.properties b/proxies/batch-adeo-proxy/src/test/resources/application-test.properties index f44e7773252..483fe127f1f 100644 --- a/proxies/batch-adeo-proxy/src/test/resources/application-test.properties +++ b/proxies/batch-adeo-proxy/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER= dummy \ No newline at end of file diff --git a/proxies/brregstub-proxy/src/test/resources/application-test.yml b/proxies/brregstub-proxy/src/test/resources/application-test.yml index 45a7f438eb7..f05debbd219 100644 --- a/proxies/brregstub-proxy/src/test/resources/application-test.yml +++ b/proxies/brregstub-proxy/src/test/resources/application-test.yml @@ -1 +1 @@ -azure.app.client.id: dummy \ No newline at end of file +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/dokarkiv-proxy/src/test/resources/application-test.yml b/proxies/dokarkiv-proxy/src/test/resources/application-test.yml index fb5da8c5127..24e4a7df170 100644 --- a/proxies/dokarkiv-proxy/src/test/resources/application-test.yml +++ b/proxies/dokarkiv-proxy/src/test/resources/application-test.yml @@ -1,6 +1,4 @@ -spring.cloud.vault.token: dummy -azure.app.client.id: dummy -azure.app.client.secret: dummy +TOKEN_X_ISSUER: dummy consumers: dokarkiv: diff --git a/proxies/ereg-proxy/src/test/resources/application-test.properties b/proxies/ereg-proxy/src/test/resources/application-test.properties index f44e7773252..e5e55886152 100644 --- a/proxies/ereg-proxy/src/test/resources/application-test.properties +++ b/proxies/ereg-proxy/src/test/resources/application-test.properties @@ -1,3 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/proxies/histark-proxy/src/test/resources/application-test.yml b/proxies/histark-proxy/src/test/resources/application-test.yml index 737a427b9cc..6c4ae555764 100644 --- a/proxies/histark-proxy/src/test/resources/application-test.yml +++ b/proxies/histark-proxy/src/test/resources/application-test.yml @@ -1,2 +1 @@ -azure.app.client.id: dummy -azure.app.client.secret: dummy +TOKEN_X_ISSUER: dummy diff --git a/proxies/inntektstub-proxy/src/test/resources/application-test.yml b/proxies/inntektstub-proxy/src/test/resources/application-test.yml index 45a7f438eb7..f05debbd219 100644 --- a/proxies/inntektstub-proxy/src/test/resources/application-test.yml +++ b/proxies/inntektstub-proxy/src/test/resources/application-test.yml @@ -1 +1 @@ -azure.app.client.id: dummy \ No newline at end of file +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/inst-proxy/src/test/java/no/nav/testnav/proxies/instproxy/ApplicationContextTest.java b/proxies/inst-proxy/src/test/java/no/nav/testnav/proxies/instproxy/ApplicationContextTest.java index 8eb36dcd572..a306f7e9271 100644 --- a/proxies/inst-proxy/src/test/java/no/nav/testnav/proxies/instproxy/ApplicationContextTest.java +++ b/proxies/inst-proxy/src/test/java/no/nav/testnav/proxies/instproxy/ApplicationContextTest.java @@ -4,8 +4,10 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") class ApplicationContextTest { @MockBean diff --git a/proxies/inst-proxy/src/test/resources/application-test.properties b/proxies/inst-proxy/src/test/resources/application-test.properties new file mode 100644 index 00000000000..e5e55886152 --- /dev/null +++ b/proxies/inst-proxy/src/test/resources/application-test.properties @@ -0,0 +1 @@ +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/proxies/kodeverk-proxy/src/test/resources/application-test.properties b/proxies/kodeverk-proxy/src/test/resources/application-test.properties index 18ea64dc24a..ee0ab3849bc 100644 --- a/proxies/kodeverk-proxy/src/test/resources/application-test.properties +++ b/proxies/kodeverk-proxy/src/test/resources/application-test.properties @@ -1,4 +1,2 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy +TOKEN_X_ISSUER=dummy proxy.url=http://localhost \ No newline at end of file diff --git a/proxies/kontoregister-person-proxy/src/test/resources/application-test.yml b/proxies/kontoregister-person-proxy/src/test/resources/application-test.yml index a45d3c87283..6c4ae555764 100644 --- a/proxies/kontoregister-person-proxy/src/test/resources/application-test.yml +++ b/proxies/kontoregister-person-proxy/src/test/resources/application-test.yml @@ -1 +1 @@ -azure.app.client.id: dummy +TOKEN_X_ISSUER: dummy diff --git a/proxies/krrstub-proxy/src/test/resources/application-test.yml b/proxies/krrstub-proxy/src/test/resources/application-test.yml index 45a7f438eb7..f05debbd219 100644 --- a/proxies/krrstub-proxy/src/test/resources/application-test.yml +++ b/proxies/krrstub-proxy/src/test/resources/application-test.yml @@ -1 +1 @@ -azure.app.client.id: dummy \ No newline at end of file +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/medl-proxy/src/test/resources/application-test.yml b/proxies/medl-proxy/src/test/resources/application-test.yml index 45a7f438eb7..5f3a2a2c0c8 100644 --- a/proxies/medl-proxy/src/test/resources/application-test.yml +++ b/proxies/medl-proxy/src/test/resources/application-test.yml @@ -1 +1,2 @@ -azure.app.client.id: dummy \ No newline at end of file +azure.app.client.id: dummy +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/norg2-proxy/src/test/resources/application-test.yml b/proxies/norg2-proxy/src/test/resources/application-test.yml index 45a7f438eb7..f05debbd219 100644 --- a/proxies/norg2-proxy/src/test/resources/application-test.yml +++ b/proxies/norg2-proxy/src/test/resources/application-test.yml @@ -1 +1 @@ -azure.app.client.id: dummy \ No newline at end of file +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/pdl-proxy/src/test/resources/application-test.properties b/proxies/pdl-proxy/src/test/resources/application-test.properties index aff06b97955..aa18dbf1e43 100644 --- a/proxies/pdl-proxy/src/test/resources/application-test.properties +++ b/proxies/pdl-proxy/src/test/resources/application-test.properties @@ -1,6 +1,4 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy +TOKEN_X_ISSUER=dummy sts.token.provider.username=dummy sts.token.provider.password=dummy diff --git a/proxies/pensjon-testdata-facade-proxy/src/test/resources/application-test.yml b/proxies/pensjon-testdata-facade-proxy/src/test/resources/application-test.yml index f693ce3567f..30e48d6e0e9 100644 --- a/proxies/pensjon-testdata-facade-proxy/src/test/resources/application-test.yml +++ b/proxies/pensjon-testdata-facade-proxy/src/test/resources/application-test.yml @@ -1,4 +1,4 @@ -azure.app.client.id: dummy +TOKEN_X_ISSUER: dummy consumers: samboer-testdata: diff --git a/proxies/saf-proxy/src/test/resources/application-test.yml b/proxies/saf-proxy/src/test/resources/application-test.yml index a5f9b6a19d2..3a0b87cb27e 100644 --- a/proxies/saf-proxy/src/test/resources/application-test.yml +++ b/proxies/saf-proxy/src/test/resources/application-test.yml @@ -1,5 +1,4 @@ -azure.app.client.id: dummy -azure.app.client.secret: dummy +TOKEN_X_ISSUER: dummy consumers: saf: url: http://saf-dummy.dummy.no diff --git a/proxies/sigrunstub-proxy/src/test/resources/application-test.properties b/proxies/sigrunstub-proxy/src/test/resources/application-test.properties index f44e7773252..06f135abbda 100644 --- a/proxies/sigrunstub-proxy/src/test/resources/application-test.properties +++ b/proxies/sigrunstub-proxy/src/test/resources/application-test.properties @@ -1,3 +1,4 @@ spring.cloud.vault.token=dummy azure.app.client.id=dummy -azure.app.client.secret=dummy \ No newline at end of file +azure.app.client.secret=dummy +TOKEN_X_ISSUER=dummy \ No newline at end of file diff --git a/proxies/skjermingsregister-proxy/src/test/resources/application-test.yml b/proxies/skjermingsregister-proxy/src/test/resources/application-test.yml index 4772c647cd8..f77593af929 100644 --- a/proxies/skjermingsregister-proxy/src/test/resources/application-test.yml +++ b/proxies/skjermingsregister-proxy/src/test/resources/application-test.yml @@ -1,6 +1,4 @@ -spring.cloud.vault.token: dummy -azure.app.client.id: dummy -azure.app.client.secret: dummy +TOKEN_X_ISSUER: dummy proxy.url: http://localhost STS_TOKEN_PROVIDER_USERNAME: dummy STS_TOKEN_PROVIDER_PASSWORD: dummy \ No newline at end of file diff --git a/proxies/tps-forvalteren-proxy/src/test/resources/application-test.yml b/proxies/tps-forvalteren-proxy/src/test/resources/application-test.yml index 20fa5a451fa..438707ee212 100644 --- a/proxies/tps-forvalteren-proxy/src/test/resources/application-test.yml +++ b/proxies/tps-forvalteren-proxy/src/test/resources/application-test.yml @@ -8,4 +8,6 @@ proxy: url: http://localhost username: dummy -password: dummy \ No newline at end of file +password: dummy + +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/proxies/udistub-proxy/src/test/resources/application-test.properties b/proxies/udistub-proxy/src/test/resources/application-test.properties index 18ea64dc24a..483fe127f1f 100644 --- a/proxies/udistub-proxy/src/test/resources/application-test.properties +++ b/proxies/udistub-proxy/src/test/resources/application-test.properties @@ -1,4 +1 @@ -spring.cloud.vault.token=dummy -azure.app.client.id=dummy -azure.app.client.secret=dummy -proxy.url=http://localhost \ No newline at end of file +TOKEN_X_ISSUER= dummy \ No newline at end of file