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

Oppdatert systemkonfigurasjon og refaktorert filnavn #3373

Merged
merged 15 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 11 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
2 changes: 2 additions & 0 deletions .github/workflows/app.tps-messaging-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- libs/servlet-security
- apps/tps-messaging-service/**
- .github/workflows/app.tps-messaging-service.yml
- .github/workflows/common.workflow.backend.yml

jobs:
workflow:
Expand All @@ -17,6 +18,7 @@ jobs:
working-directory: "apps/tps-messaging-service"
deploy-tag: "#deploy-tps-messaging-service"
permissions:
checks: write
contents: read
id-token: write
secrets:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/common.workflow.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ jobs:
build-root-directory: ${{ inputs.working-directory }}
arguments: build --scan
cache-read-only: false
- name: Publish results (unit test)
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "**/build/test-results/test/TEST-*.xml"
- name: "Docker"
id: docker-build-push
if: |
Expand Down
4 changes: 2 additions & 2 deletions apps/adresse-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=dummy
6 changes: 3 additions & 3 deletions apps/amelding-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-amelding-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.token=dummy
azure.app.client.id=dummy
azure.app.client.secret=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-app-tilgang-analyse-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ spring:
flyway:
url: jdbc:h2:mem:testdb
username: sa
password:
password:

TOKEN_X_ISSUER: dummy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-arbeidsforhold-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.enabled=false

azure.app.client.id=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-batch-bestilling-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER= dummy
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
CRYPTOGRAPHY_SECRET: DUMMY SUPER SECRET CRYPTOGRAPHY KEY THAT IS NOT SECURE
JWT_SECRET: DUMMY SUPER SECRET JWT KEY THAT IS NOT SECURE

azure.app.client.id: ${client_id}
azure.app.client.secret: ${client_secret}

TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-bruker-service-dev
TOKENDINGS_URL: https://tokenx.dev-gcp.nav.cloud.nais.io
TOKENDINGS_URL: ${TOKEN_X_ISSUER}
spring:
application:
name: testnav-bruker-service-dev
Expand Down
4 changes: 2 additions & 2 deletions apps/bruker-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spring:
oauth2:
resourceserver:
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
jackson:
serialization:
Expand Down
4 changes: 2 additions & 2 deletions apps/dolly-backend/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ spring:
#The client_id of this application
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/dolly-frontend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
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
@@ -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: "{}"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-endringsmelding-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.token=dummy
azure.app.client.id=dummy
azure.app.client.secret=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-fss:dolly:ereg-batch-status-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
azure.app.client.id: ${client_id}
azure.app.client.secret: ${client_secret}

consumers:
testnorge-profil-api:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-generer-arbeidsforhold-populasjon-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:generer-navn-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-generer-organisasjon-populasjon-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
KAFKA_KEYSTORE_PATH=""

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-generer-synt-amelding-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ consumers:


AAD_ISSUER_URI: http://localhost:${wiremock.server.port:0}/token
TOKEN_X_ISSUER: dummy
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b
azure.app.client.id: ${client_id}
azure.app.client.secret: ${client_secret}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-geografiske-kodeverk-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {

Expand Down Expand Up @@ -265,7 +266,7 @@ void should_return_bad_request_when_embetenavn_is_not_alphabetical() throws Exce

private List<Kodeverk> 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();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=DUMMY
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ spring:
jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys
accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id}
tokenx:
issuer-uri: https://tokenx.dev-gcp.nav.cloud.nais.io
jwk-set-uri: https://tokenx.dev-gcp.nav.cloud.nais.io/jwks
accepted-audience: dev-gcp:dolly:testnav-helsepersonell-service
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=dummy
Loading
Loading