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

bugfix/missing_azure_app_client #3689

Merged
merged 3 commits into from
Dec 11, 2024
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
@@ -0,0 +1,7 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}
TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-adresse-service

spring:
config:
import: "sm://"
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

consumers:
oppsummeringsdokument-service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
flyway:
url: jdbc:h2:mem:testdb
username: sa
password:
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
Expand All @@ -9,8 +12,3 @@ spring:
url: r2dbc:postgresql://localhost:3306/testnav-app-tilgang-analyse-service-db
username: testnav-app-tilgang-analyse-service
password: ${DB_PASSWORD}
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-adresse-service
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"

consumers:
dolly-backend:
url: https://dolly-backend.intern.dev.nav.no
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
10 changes: 7 additions & 3 deletions apps/bruker-service/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}
CRYPTOGRAPHY_SECRET: DUMMY SUPER SECRET CRYPTOGRAPHY KEY THAT IS NOT SECURE
JWT_SECRET: DUMMY SUPER SECRET JWT KEY THAT IS NOT SECURE

TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-bruker-service-dev
TOKENDINGS_URL: ${TOKEN_X_ISSUER}
TOKENDINGS_URL: ${TOKEN_X_ISSUER}

spring:
application:
name: testnav-bruker-service-dev
config:
import: "sm://"
flyway:
url: jdbc:h2:mem:testdb
username: sa
Expand All @@ -14,4 +18,4 @@ spring:
consumers:
testnav-person-organisasjon-tilgang-service:
url: https://testnav-person-organisasjon-tilgang-service-dev.intern.dev.nav.no
name: testnav-person-organisasjon-tilgang-service-dev
name: testnav-person-organisasjon-tilgang-service-dev
10 changes: 4 additions & 6 deletions apps/budpro-service/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

management:
endpoints:
Expand All @@ -15,4 +13,4 @@ management:

consumers:
generer-navn-service:
url: "https://generer-navn-service.intern.dev.nav.no"
url: "https://generer-navn-service.intern.dev.nav.no"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProfile name="prod,dev">
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

dolly:
client:
general:
Expand All @@ -12,11 +15,6 @@ spring:
url: jdbc:postgresql://localhost:5432/testnav-dolly-backend-local
username: testnav-dolly-backend-local
password: ${sm://testnav-dolly-backend-local}
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

management:
endpoints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class AaregConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class ArenaForvalterConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class InstdataConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class KontoregisterConsumerTest {
private static final String IDENT = "12345678901";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class KrrstubConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class PensjonforvalterConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class SigrunStubConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@ActiveProfiles("test")
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations = "classpath:application.yaml")
@TestPropertySource(locations = "classpath:application.yml")
@AutoConfigureWireMock(port = 0)
class TpsMessagingConsumerTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}
POST_LOGOUT_REDIRECT_URI: 'http://localhost:3000/login'
REDIS_HOST: localhost
TOKEN_X_ISSUER: dummy
Expand All @@ -13,8 +15,6 @@ spring:
client:
registration:
aad:
client-id: ${sm://azure-app-client-id}
client-secret: ${sm://azure-app-client-secret}
authorization-grant-type: authorization_code
redirect-uri: 'http://localhost:3000/login/oauth2/code/{registrationId}'
scope: openid, offline_access, ${sm://azure-app-client-id}/.default
Expand Down
2 changes: 1 addition & 1 deletion apps/dollystatus/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
client:
registration:
aad:
client-id: ${sm://azure-app-client-id}
client-secret: ${sm://azure-app-client-secret}
scope: openid, ${sm://azure-app-client-id}/.default

consumers:
endringsmelding-service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

consumers:
adresse-service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
client:
registration:
aad:
client-id: ${sm://azure-app-client-id}
client-secret: ${sm://azure-app-client-secret}
scope: openid, ${sm://azure-app-client-id}/.default

consumers:
testnorge-profil-api:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}

spring:
config:
import: "sm://"
security:
oauth2:
resourceserver:
aad:
accepted-audience: ${sm://azure-app-client-id}, api://${sm://azure-app-client-id}

consumers:
oppsummeringsdokument-service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</root>
</springProfile>

<springProfile name="dev">
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
Expand Down
Loading
Loading