Skip to content

Commit

Permalink
change/azure-app-client-deprecated (#3686)
Browse files Browse the repository at this point in the history
Henter config fra ordinær Spring Boot config i stedet fra custom azure.app.client.[id|secret].
  • Loading branch information
rfc3092 authored Dec 9, 2024
1 parent 78df828 commit d307c60
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ spring:
cloud:
gcp:
secretmanager:
enabled: false
enabled: false
security:
oauth2:
client:
registration:
aad:
client-id: dummy
client-secret: dummy
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ spring:
cloud:
gcp:
secretmanager:
enabled: false
enabled: false
security:
oauth2:
client:
registration:
aad:
client-id: dummy
client-secret: dummy
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ aareg:
pageSize: 2

controller.staticdata.cache.hours: 24
azure.app.client.id: dummy

KAFKA_SCHEMA_REGISTRY: http://localhost:9009
kafka.groupid: organisasjon-forvalter-v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
public class AzureNavClientCredential extends ClientCredential {

public AzureNavClientCredential(
@Value("${azure.app.client.id:#{null}}") String clientId,
@Value("${azure.app.client.secret:#{null}}") String clientSecret
@Value("${spring.security.oauth2.client.registration.aad.client-id:#{null}}") String clientId,
@Value("${spring.security.oauth2.client.registration.aad.client-secret:#{null}}") String clientSecret
) {
super(clientId, clientSecret);
}

}
2 changes: 1 addition & 1 deletion proxies/fullmakt-proxy/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
aad:
issuer-uri: ${AAD_ISSUER_URI}/v2.0
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
accepted-audience: ${AZURE_APP_CLIENT_ID}, api://${AZURE_APP_CLIENT_ID}
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
aad:
issuer-uri: ${AAD_ISSUER_URI}/v2.0
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
accepted-audience: ${AZURE_APP_CLIENT_ID}, api://${AZURE_APP_CLIENT_ID}
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ spring:
config:
import: "sm://"

azure:
nav:
app:
client:
id: ${sm://azure-app-client-id}
secret: ${sm://azure-app-client-secret}
openid:
config:
issuer: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b

consumers:
synt-meldekort:
url: https://synthdata-arena-meldekort.intern.dev.nav.no
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
spring:
application:
name: testnav-synthdata-meldekort-proxy
desciption: Proxy for synthdata-arena-meldekort som legger på sikkerhet.
security:
oauth2:
resourceserver:
trygdeetaten:
issuer-uri: ${azure.openid.config.issuer}
jwk-set-uri: ${azure.openid.config.jwks.uri}
issuer-uri: ${AZURE_OPENID_CONFIG_ISSUER}
jwk-set-uri: ${AZURE_OPENID_CONFIG_JWKS_URI}
accepted-audience: ${AZURE_APP_CLIENT_ID}, api:// ${AZURE_APP_CLIENT_ID}
codec:
max-in-memory-size: 15MB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
azure:
openid:
config:
issuer: dummy
spring:
security:
oauth2:
resourceserver:
trygdeetaten:
issuer-uri: # Intentionally left blank.

0 comments on commit d307c60

Please sign in to comment.