Skip to content

Commit

Permalink
Revert "change/azure-app-client-deprecated (#3686)"
Browse files Browse the repository at this point in the history
This reverts commit d307c60.
  • Loading branch information
stigus committed Dec 9, 2024
1 parent d307c60 commit fe62c4e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ spring:
cloud:
gcp:
secretmanager:
enabled: false
security:
oauth2:
client:
registration:
aad:
client-id: dummy
client-secret: dummy
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ spring:
cloud:
gcp:
secretmanager:
enabled: false
security:
oauth2:
client:
registration:
aad:
client-id: dummy
client-secret: dummy
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ 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,10 +7,9 @@
public class AzureNavClientCredential extends ClientCredential {

public AzureNavClientCredential(
@Value("${spring.security.oauth2.client.registration.aad.client-id:#{null}}") String clientId,
@Value("${spring.security.oauth2.client.registration.aad.client-secret:#{null}}") String clientSecret
@Value("${azure.app.client.id:#{null}}") String clientId,
@Value("${azure.app.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,6 +6,16 @@ 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,12 +1,13 @@
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,6 +1,4 @@
spring:
security:
oauth2:
resourceserver:
trygdeetaten:
issuer-uri: # Intentionally left blank.
azure:
openid:
config:
issuer: dummy

0 comments on commit fe62c4e

Please sign in to comment.