Skip to content

Commit

Permalink
Merge branch 'master' into feature/elastic-search-start
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Oct 24, 2023
2 parents e792d51 + 5f445cf commit 194dddb
Show file tree
Hide file tree
Showing 361 changed files with 8,318 additions and 3,111 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/app.testnorge-bisys.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/proxy.aareg-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/aareg-proxy"
deploy-tag: "#deploy-aareg-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.aareg-synt-services-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/aareg-synt-services-proxy"
deploy-tag: "#deploy-aareg-synt-services-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.arbeidsplassencv-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/arbeidsplassencv-proxy"
deploy-tag: "#deploy-arbeidsplassencv-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.arena-forvalteren-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/arena-forvalteren-proxy"
deploy-tag: "#deploy-arena-forvalteren-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.batch-adeo-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/batch-adeo-proxy"
deploy-tag: "#deploy-batch-adeo-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.brregstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/brregstub-proxy"
deploy-tag: "#deploy-brregstub-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.dokarkiv-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/dokarkiv-proxy"
deploy-tag: "#deploy-dokarkiv-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.ereg-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/ereg-proxy"
deploy-tag: "#deploy-ereg-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.histark-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/histark-proxy"
deploy-tag: "#deploy-histark-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.hodejegeren-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/hodejegeren-proxy"
deploy-tag: "#deploy-hodejegeren-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.inntektstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/inntektstub-proxy"
deploy-tag: "#deploy-inntektstub-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.inst-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/inst-proxy"
deploy-tag: "#deploy-inst-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.kodeverk-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/kodeverk-proxy"
deploy-tag: "#deploy-kodeverk-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.kontoregister-person-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/kontoregister-person-proxy"
deploy-tag: "#deploy-kontoregister-person-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.krrstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/krrstub-proxy"
deploy-tag: "#deploy-krrstub-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.medl-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/medl-proxy"
deploy-tag: "#deploy-medl-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.norg2-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/norg2-proxy"
deploy-tag: "#deploy-norg2-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.pdl-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/pdl-proxy"
deploy-tag: "#deploy-pdl-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.pensjon-testdata-facade-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/pensjon-testdata-facade-proxy"
deploy-tag: "#deploy-pensjon-testdata-facade-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.saf-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/saf-proxy"
deploy-tag: "#deploy-saf-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.sigrunstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/sigrunstub-proxy"
deploy-tag: "#deploy-sigrunstub-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.skjermingsregister-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/skjermingsregister-proxy"
deploy-tag: "#deploy-skjermingsregister-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.statisk-data-forvalter-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/statisk-data-forvalter-proxy"
deploy-tag: "#deploy-statisk-data-forvalter-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.synthdata-meldekort-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: ./.github/workflows/common.workflow.backend.yml
with:
working-directory: "proxies/synthdata-meldekort-proxy"
deploy-tag: "#deploy-synthdata-meldekort-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.tps-forvalteren-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/tps-forvalteren-proxy"
deploy-tag: "#deploy-tps-forvalteren-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.udistub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/udistub-proxy"
deploy-tag: "#deploy-udistub-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ navikt/*/lib/

*.DS_Store

*apps/testnorge-bisys/c:/

### Gradle ###
.gradle
*build/
Expand Down
2 changes: 1 addition & 1 deletion apps/adresse-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

implementation 'org.springframework.cloud:spring-cloud-starter-vault-config'

implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'ma.glasnost.orika:orika-core:1.5.4'
implementation 'org.hibernate.validator:hibernate-validator'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
Expand All @@ -30,8 +31,7 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
"/error",
"/swagger-ui.html"
).permitAll().requestMatchers("/api/**").fullyAuthenticated())
.oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> {
}));
.oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(Customizer.withDefaults()));

return httpSecurity.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ClientAuthentication clientAuthentication() {
}
var token = System.getProperty(VAULT_TOKEN);
if (isBlank(token)) {
throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt.");
throw new IllegalArgumentException("Påkrevet property 'spring.cloud.vault.token' er ikke satt.");
}
return new TokenAuthentication(System.getProperty(VAULT_TOKEN));
}
Expand Down
2 changes: 1 addition & 1 deletion apps/amelding-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.hibernate.validator:hibernate-validator'

implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0'
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.4'
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16'
implementation 'net.logstash.logback:logstash-logback-encoder:7.4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ClientAuthentication clientAuthentication() {
}
var token = System.getProperty(VAULT_TOKEN);
if (isBlank(token)) {
throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt.");
throw new IllegalArgumentException("Påkrevet property 'spring.cloud.vault.token' er ikke satt.");
}
return new TokenAuthentication(System.getProperty(VAULT_TOKEN));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@ public class SecurityConfig {
private final JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager;

@Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
return http.csrf().disable()
.authorizeExchange()
.pathMatchers(
"/swagger**",
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) {
return httpSecurity
.csrf(csrfSpec -> csrfSpec.disable())
.authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers(
"/internal/**",
"/webjars/**",
"/v3/api-docs/**",
"/internal/isReady",
"/internal/isAlive",
"/internal/metrics"
).permitAll()
.anyExchange().authenticated()
.and()
.oauth2ResourceServer()
.jwt(spec -> spec.authenticationManager(jwtReactiveAuthenticationManager))
.and().build();
"/swagger-ui/**",
"/swagger",
"/error",
"/swagger-ui.html"
).permitAll().anyExchange().authenticated())
.oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtSpec -> jwtSpec.authenticationManager(jwtReactiveAuthenticationManager)))
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import org.junit.jupiter.api.Test;
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.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
public JwtDecoder jwtDecoder;
public ReactiveJwtDecoder reactiveJwtDecoder;

@Test
@SuppressWarnings("java:S2699")
Expand Down
2 changes: 1 addition & 1 deletion apps/app-tilgang-analyse-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'

implementation 'net.logstash.logback:logstash-logback-encoder:7.4'
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0'
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.4'
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ClientAuthentication clientAuthentication() {
}
var token = System.getProperty(VAULT_TOKEN);
if (isBlank(token)) {
throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt.");
throw new IllegalArgumentException("Påkrevet property 'spring.cloud.vault.token' er ikke satt.");
}
return new TokenAuthentication(System.getProperty(VAULT_TOKEN));
}
Expand Down
Loading

0 comments on commit 194dddb

Please sign in to comment.