Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes remaining configration of jwk-set-uri (instead using issuer-uri). #3757

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
r2dbc:
url: r2dbc:postgresql://${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_DEV_TESTNAV_BRUKER_SERVICE_DEV_DB_HOST}:${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_DEV_TESTNAV_BRUKER_SERVICE_DEV_DB_PORT}/${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_DEV_TESTNAV_BRUKER_SERVICE_DEV_DB_DATABASE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
r2dbc:
url: r2dbc:postgresql://${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_TESTNAV_BRUKER_SERVICE_DB_HOST}:${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_TESTNAV_BRUKER_SERVICE_DB_PORT}/${NAIS_DATABASE_TESTNAV_BRUKER_SERVICE_TESTNAV_BRUKER_SERVICE_DB_DATABASE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: http://tokendings:8080
jwk-set-uri: http://tokendings:8080/jwks
accepted-audience: dev-gcp:dolly:testnav-bruker-service
jackson:
serialization:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${wiremockBaseUrl}
jwk-set-uri: ${wiremockBaseUrl}/jwks

consumers:
testnav-altinn3-tilgang-service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

consumers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

spring:
security:
oauth2:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

spring:
security:
oauth2:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
issuer-uri: ${TOKEN_X_ISSUER}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

spring:
security:
oauth2:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
issuer-uri: ${TOKEN_X_ISSUER}
accepted-audience: ${TOKEN_X_CLIENT_ID}

open:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID
accepted-audience: ${TOKEN_X_CLIENT_ID}

testnorge:
analyse:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

spring:
datasource:
url: jdbc:postgresql://${NAIS_DATABASE_TESTNAV_ORGANISASJON_FORVALTER_ORGANISASJON_FORVALTER_DB_HOST}:${NAIS_DATABASE_TESTNAV_ORGANISASJON_FORVALTER_ORGANISASJON_FORVALTER_DB_PORT}/${NAIS_DATABASE_TESTNAV_ORGANISASJON_FORVALTER_ORGANISASJON_FORVALTER_DB_DATABASE}?user=${NAIS_DATABASE_TESTNAV_ORGANISASJON_FORVALTER_ORGANISASJON_FORVALTER_DB_USERNAME}&password=${NAIS_DATABASE_TESTNAV_ORGANISASJON_FORVALTER_ORGANISASJON_FORVALTER_DB_PASSWORD}
Expand All @@ -15,5 +14,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
2 changes: 0 additions & 2 deletions apps/pdl-forvalter/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

spring:
application:
name: testnav-pdl-forvalter
Expand All @@ -22,5 +21,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${ACCEPTED_AUDIENCE}
2 changes: 0 additions & 2 deletions apps/person-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

spring:
security:
oauth2:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

spring:
oauth2:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
datasource:
url: jdbc:postgresql://${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_HOST}:${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_PORT}/${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_DATABASE}?user=${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_USERNAME}&password=${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_PASSWORD}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
gcp:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

spring:
security:
oauth2:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
issuer-uri: ${TOKEN_X_ISSUER}
accepted-audience: ${TOKEN_X_CLIENT_ID}
1 change: 0 additions & 1 deletion apps/udi-stub/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ private static void configureForLocalProfile(Map<String, Object> properties) {
properties.putIfAbsent("AZURE_APP_CLIENT_ID", "${sm\\://azure-app-client-id}");
properties.putIfAbsent("AZURE_APP_CLIENT_SECRET", "${sm\\://azure-app-client-secret}");
properties.putIfAbsent("AZURE_OPENID_CONFIG_ISSUER", "${sm\\://azure-openid-config-issuer}");
properties.putIfAbsent("AZURE_OPENID_CONFIG_JWKS_URI", "${sm\\://azure-openid-config-jwks-uri}");
properties.putIfAbsent("AZURE_OPENID_CONFIG_TOKEN_ENDPOINT", "${sm\\://azure-openid-config-token-endpoint}");
properties.putIfAbsent("CRYPTOGRAPHY_SECRET", DUMMY); // Used by bruker-service only.
properties.putIfAbsent("JWT_SECRET", DUMMY); // Used by bruker-service only.
Expand All @@ -49,7 +48,6 @@ private static void configureForLocalProfile(Map<String, Object> properties) {
properties.putIfAbsent("SLACK_CHANNEL", DUMMY); // Used by tilbakemelding-api only.
properties.putIfAbsent("SLACK_TOKEN", DUMMY); // Used by tilbakemelding-api only.
properties.putIfAbsent("TOKEN_X_ISSUER", "${sm\\://token-x-issuer}");
properties.putIfAbsent("TOKEN_X_JWKS_URI", "${sm\\://token-x-jwks-uri}");

}

Expand All @@ -63,10 +61,11 @@ private static void configureForTestProfile(Map<String, Object> properties) {
// Setting dummy placeholders.
Stream
.of(
"spring.cloud.vault.token", // For apps using no.nav.testnav.libs:vault.

"ALTINN_API_KEY",
"ALTINN_URL",
"AZURE_OPENID_CONFIG_ISSUER",
"AZURE_OPENID_CONFIG_JWKS_URI",
"AZURE_OPENID_CONFIG_TOKEN_ENDPOINT",
"CRYPTOGRAPHY_SECRET", // Used by bruker-service only.
"IDPORTEN_CLIENT_ID", // Used by dolly-frontend only.
Expand All @@ -77,8 +76,7 @@ private static void configureForTestProfile(Map<String, Object> properties) {
"MASKINPORTEN_SCOPES",
"MASKINPORTEN_WELL_KNOWN_URL",
"TOKEN_X_CLIENT_ID",
"TOKEN_X_ISSUER",
"spring.cloud.vault.token" // For apps using no.nav.testnav.libs:vault.
"TOKEN_X_ISSUER"
)
.forEach(key -> properties.putIfAbsent(key, DUMMY));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ spring:
resourceserver:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}