Skip to content

Commit cb45ac7

Browse files
committed
Merge branch 'master' into feature/slette-a-melding
2 parents 33c6144 + 16de375 commit cb45ac7

File tree

416 files changed

+1891
-3545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

416 files changed

+1891
-3545
lines changed

.github/workflows/integration-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
uses: ./.github/workflows/common.integration-test.yml
1515
with:
1616
working-directory: "apps/bruker-service/"
17-
healthcheck: "http://localhost:8002/internal/isAlive"
17+
healthcheck: "http://localhost:8002/internal/health/liveness"
1818
secrets:
1919
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}

.github/workflows/proxy.brregstub-reverse-proxy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: brregstub-reverse--proxy
1+
name: brregstub-reverse-proxy
22

33
on:
44
push:
55
paths:
6-
- "plugins/**"
7-
- "libs/reactive-core/**"
8-
- "libs/reactive-proxy/**"
9-
- "proxies/brregstub-reverse-proxy/**"
10-
- ".github/workflows/proxy.brregstub-reverse-proxy.yml"
6+
- .github/workflows/proxy.brregstub-reverse-proxy.yml
7+
- libs/reactive-core/**
8+
- libs/reactive-proxy/**
9+
- plugins/**
10+
- proxies/brregstub-reverse-proxy/**
1111

1212
jobs:
1313
workflow:

apps/adresse-service/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
ingresses:
1919
- "https://testnav-adresse-service.intern.dev.nav.no"
2020
liveness:
21-
path: /internal/isAlive
21+
path: /internal/health/liveness
2222
periodSeconds: 30
2323
initialDelay: 30
2424
observability:
@@ -29,7 +29,7 @@ spec:
2929
enabled: true
3030
runtime: java
3131
readiness:
32-
path: /internal/isReady
32+
path: /internal/health/readiness
3333
initialDelay: 30
3434
prometheus:
3535
enabled: true

apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/AdresseServiceApplicationStarter.java

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import no.nav.dolly.libs.nais.NaisEnvironmentApplicationContextInitializer;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.boot.builder.SpringApplicationBuilder;
6+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
67

8+
@EnableWebSecurity
79
@SpringBootApplication
810
public class AdresseServiceApplicationStarter {
911

Original file line numberDiff line numberDiff line change
@@ -1,39 +1,25 @@
11
package no.nav.testnav.apps.adresseservice.config;
22

3+
import no.nav.dolly.libs.security.config.DollyHttpSecurity;
34
import org.springframework.context.annotation.Bean;
45
import org.springframework.context.annotation.Configuration;
5-
import org.springframework.context.annotation.Profile;
6-
import org.springframework.core.annotation.Order;
76
import org.springframework.security.config.Customizer;
87
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
9-
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
108
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
119
import org.springframework.security.config.http.SessionCreationPolicy;
1210
import org.springframework.security.web.SecurityFilterChain;
1311

14-
@EnableWebSecurity
1512
@Configuration
16-
@Profile({ "prod", "local" })
17-
@Order(1)
18-
public class SecurityConfig {
13+
class SecurityConfig {
1914

2015
@Bean
21-
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
22-
23-
httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
16+
SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
17+
return httpSecurity
18+
.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
2419
.csrf(AbstractHttpConfigurer::disable)
25-
.authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers(
26-
"/internal/**",
27-
"/webjars/**",
28-
"/swagger-resources/**",
29-
"/v3/api-docs/**",
30-
"/swagger-ui/**",
31-
"/swagger",
32-
"/error",
33-
"/swagger-ui.html"
34-
).permitAll().requestMatchers("/api/**").fullyAuthenticated())
35-
.oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(Customizer.withDefaults()));
36-
37-
return httpSecurity.build();
20+
.authorizeHttpRequests(DollyHttpSecurity.withDefaultHttpRequests())
21+
.oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(Customizer.withDefaults()))
22+
.build();
3823
}
24+
3925
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
spring:
22
application:
33
name: adresse-service
4+
config:
5+
import: "classpath:dolly-application.yml"
46
flyway:
57
enabled: false
68
security:
@@ -13,35 +15,9 @@ spring:
1315
issuer-uri: ${TOKEN_X_ISSUER}
1416
accepted-audience: ${TOKEN_X_CLIENT_ID}
1517

16-
springdoc:
17-
swagger-ui:
18-
disable-swagger-default-url: true
19-
url: /v3/api-docs
20-
2118
consumers:
2219
pdl-services:
2320
url: https://testnav-pdl-proxy.dev-fss-pub.nais.io
2421
cluster: dev-fss
2522
namespace: dolly
26-
name: testnav-pdl-proxy
27-
28-
management:
29-
endpoints:
30-
access:
31-
default: read_only
32-
web:
33-
base-path: /internal
34-
exposure:
35-
include: prometheus,health
36-
path-mapping:
37-
prometheus: metrics
38-
prometheus:
39-
metrics:
40-
export:
41-
enabled: true
42-
server:
43-
servlet:
44-
encoding:
45-
charset: UTF-8
46-
error:
47-
include-message: always
23+
name: testnav-pdl-proxy
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
package no.nav.testnav.apps.adresseservice;
22

3-
import no.nav.dolly.libs.nais.DollySpringBootTest;
4-
import org.junit.jupiter.api.Test;
5-
6-
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
3+
import no.nav.dolly.libs.test.DollySpringBootTest;
4+
import no.nav.dolly.libs.test.DollyApplicationContextTest;
75

86
@DollySpringBootTest
9-
class ApplicationContextTest {
10-
11-
@Test
12-
void load_app_context() {
13-
assertThat(true).isTrue();
14-
}
15-
16-
}
7+
class ApplicationContextTest extends DollyApplicationContextTest {
8+
}

apps/altinn3-tilgang-service/config.dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
- host: platform.tt02.altinn.no
3939
- host: data.brreg.no
4040
liveness:
41-
path: /internal/isAlive
41+
path: /internal/health/liveness
4242
initialDelay: 10
4343
periodSeconds: 5
4444
failureThreshold: 500
@@ -50,7 +50,7 @@ spec:
5050
enabled: true
5151
runtime: java
5252
readiness:
53-
path: /internal/isReady
53+
path: /internal/health/readiness
5454
initialDelay: 10
5555
periodSeconds: 5
5656
failureThreshold: 500

apps/altinn3-tilgang-service/config.prod.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
- host: platform.altinn.no
4343
- host: data.brreg.no
4444
liveness:
45-
path: /internal/isAlive
45+
path: /internal/health/liveness
4646
initialDelay: 10
4747
periodSeconds: 5
4848
failureThreshold: 500
@@ -54,7 +54,7 @@ spec:
5454
enabled: true
5555
runtime: java
5656
readiness:
57-
path: /internal/isReady
57+
path: /internal/health/readiness
5858
initialDelay: 10
5959
periodSeconds: 5
6060
failureThreshold: 500

apps/altinn3-tilgang-service/src/main/resources/application.yml

+2-24
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ spring:
22
application:
33
name: testnav-altinn3-tilgang-service
44
description: Tjeneste for å hente og sette tilganger for orgnisasjoner
5+
config:
6+
import: "classpath:dolly-application.yml"
57
security:
68
oauth2:
79
resourceserver:
@@ -15,37 +17,13 @@ spring:
1517
serialization:
1618
write_dates_as_timestamps: false
1719

18-
springdoc:
19-
swagger-ui:
20-
disable-swagger-default-url: true
21-
url: /v3/api-docs
22-
2320
altinn:
2421
api:
2522
url: ${ALTINN_URL}
2623
resource:
2724
owner: nav
2825
identifier: godkjente-dolly-tilganger
2926

30-
management:
31-
endpoints:
32-
access:
33-
default: read_only
34-
web:
35-
base-path: /internal
36-
exposure:
37-
include: prometheus,health
38-
path-mapping:
39-
prometheus: metrics
40-
prometheus:
41-
metrics:
42-
export:
43-
enabled: true
44-
4527
server:
46-
servlet:
47-
encoding:
48-
charset: UTF-8
4928
error:
50-
include-message: always
5129
include-stacktrace: never
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
package no.nav.testnav.altinn3tilgangservice;
22

3-
import no.nav.dolly.libs.nais.DollySpringBootTest;
4-
import org.junit.jupiter.api.Test;
5-
6-
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
3+
import no.nav.dolly.libs.test.DollySpringBootTest;
4+
import no.nav.dolly.libs.test.DollyApplicationContextTest;
75

86
@DollySpringBootTest
9-
class ApplicationContextTest {
10-
11-
@Test
12-
void load_app_context() {
13-
assertThat(true).isTrue();
14-
}
15-
7+
class ApplicationContextTest extends DollyApplicationContextTest {
168
}

apps/app-tilgang-analyse-service/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
databases:
3131
- name: testnav-app-tilgang-analyse-service-db
3232
liveness:
33-
path: /internal/isAlive
33+
path: /internal/health/liveness
3434
initialDelay: 4
3535
periodSeconds: 5
3636
failureThreshold: 500
@@ -42,7 +42,7 @@ spec:
4242
enabled: true
4343
runtime: java
4444
readiness:
45-
path: /internal/isReady
45+
path: /internal/health/readiness
4646
initialDelay: 4
4747
periodSeconds: 5
4848
failureThreshold: 500

apps/app-tilgang-analyse-service/src/main/resources/application.yml

+3-28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ spring:
22
application:
33
name: testnav-app-tilgang-analyse-service
44
description: API for å app tilgang analyse
5+
config:
6+
import: "classpath:dolly-application.yml"
57
security:
68
oauth2:
79
resourceserver:
@@ -12,34 +14,7 @@ spring:
1214
issuer-uri: ${TOKEN_X_ISSUER}
1315
accepted-audience: ${TOKEN_X_CLIENT_ID}
1416

15-
springdoc:
16-
swagger-ui:
17-
disable-swagger-default-url: true
18-
url: /v3/api-docs
19-
2017
consumers:
2118
github:
2219
url: https://api.github.com
23-
token: ${DOLLY_READER_TOKEN}
24-
25-
management:
26-
endpoints:
27-
access:
28-
default: read_only
29-
web:
30-
base-path: /internal
31-
exposure:
32-
include: prometheus,health
33-
path-mapping:
34-
prometheus: metrics
35-
prometheus:
36-
metrics:
37-
export:
38-
enabled: true
39-
40-
server:
41-
servlet:
42-
encoding:
43-
charset: UTF-8
44-
error:
45-
include-message: always
20+
token: ${DOLLY_READER_TOKEN}
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
package no.nav.testnav.apps.apptilganganalyseservice;
22

3-
import no.nav.dolly.libs.nais.DollySpringBootTest;
4-
import org.junit.jupiter.api.Test;
5-
6-
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
3+
import no.nav.dolly.libs.test.DollySpringBootTest;
4+
import no.nav.dolly.libs.test.DollyApplicationContextTest;
75

86
@DollySpringBootTest
9-
class ApplicationContextTest {
10-
11-
@Test
12-
void load_app_context() {
13-
assertThat(true).isTrue();
14-
}
15-
7+
class ApplicationContextTest extends DollyApplicationContextTest {
168
}

apps/batch-bestilling-service/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
enabled: true
2727
tenant: nav.no
2828
liveness:
29-
path: /internal/isAlive
29+
path: /internal/health/liveness
3030
initialDelay: 30
3131
periodSeconds: 30
3232
failureThreshold: 500
@@ -38,7 +38,7 @@ spec:
3838
enabled: true
3939
runtime: java
4040
readiness:
41-
path: /internal/isReady
41+
path: /internal/health/readiness
4242
initialDelay: 30
4343
failureThreshold: 500
4444
prometheus:

apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/BatchBestillingServiceApplicationStarter.java

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import no.nav.dolly.libs.nais.NaisEnvironmentApplicationContextInitializer;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.boot.builder.SpringApplicationBuilder;
6+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
67

8+
@EnableWebSecurity
79
@SpringBootApplication
810
public class BatchBestillingServiceApplicationStarter {
911
public static void main(String[] args) {

0 commit comments

Comments
 (0)