Skip to content

Commit

Permalink
Merge branch 'master' into feature/kodeverk-service
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum authored Mar 22, 2024
2 parents cb3ca47 + 08ba8ef commit 4889d64
Show file tree
Hide file tree
Showing 111 changed files with 1,291 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app.ereg-batch-status-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: "dev-fss"
cluster: "dev-gcp"
working-directory: "apps/ereg-batch-status-service"
deploy-tag: "#deploy-ereg-batch-status-service"
permissions:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/proxy.modapp-ereg-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: modapp-ereg-proxy

on:
push:
paths:
- libs/reactive-core
- libs/reactive-proxy
- libs/reactive-security
- libs/security-core
- proxies/modapp-ereg-proxy/**
- .github/workflows/proxy.modapp-ereg-proxy.yml

jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: "dev-fss"
working-directory: "proxies/modapp-ereg-proxy"
deploy-tag: "#deploy-proxy"
permissions:
contents: read
id-token: write
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.idea/
*target/
*.iml
*.http

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

Expand Down
4 changes: 3 additions & 1 deletion apps/adresse-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
4 changes: 3 additions & 1 deletion apps/amelding-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ server:
servlet:
encoding:
charset: UTF-8
error:
include-message: always

consumers:
dolly-backend:
Expand Down
4 changes: 3 additions & 1 deletion apps/brreg-stub/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
4 changes: 3 additions & 1 deletion apps/bruker-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
7 changes: 7 additions & 0 deletions apps/budpro-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ consumers:
app:
security:
allow-api: true

server:
servlet:
encoding:
charset: UTF-8
error:
include-message: always
7 changes: 2 additions & 5 deletions apps/dolly-backend/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ server:
encoding:
charset: UTF-8
max-http-header-size: 70KB
error:
include-message: always

spring:
cloud:
Expand Down Expand Up @@ -83,11 +85,6 @@ open:
total-fields: 1500
index: bestilling

tps:
person:
service:
wait: 30_000

consumers:
testnav-organisasjon-forvalter:
name: testnav-organisasjon-forvalter
Expand Down
2 changes: 2 additions & 0 deletions apps/dolly-frontend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ server:
servlet:
encoding:
charset: UTF-8
error:
include-message: always

logging:
pattern:
Expand Down
2 changes: 2 additions & 0 deletions apps/dollystatus/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ server:
servlet:
encoding:
charset: UTF-8
error:
include-message: always

logging:
level:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ server:
servlet:
encoding:
charset: UTF-8
error:
include-message: always

logging:
level:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ management:
server:
servlet:
encoding:
charset: UTF-8
charset: UTF-8
error:
include-message: always
2 changes: 1 addition & 1 deletion apps/ereg-batch-status-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
App for å hente ut batch status.

## Swagger
Swagger finnes under [/swagger](https://ereg-batch-status-service.dev.intern.nav.no/swagger) -endepunktet til applikasjonen.
Swagger finnes under [/swagger](https://testnav-ereg-batch-status-service.intern.dev.nav.no/swagger) -endepunktet til applikasjonen.

## Lokal kjøring
Ha naisdevice kjørende og kjør EregBatchServiceServiceApplicationStarter med følgende argumenter:
Expand Down
10 changes: 5 additions & 5 deletions apps/ereg-batch-status-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ dependencies {

implementation 'no.nav.testnav.libs:data-transfer-objects'
implementation 'no.nav.testnav.libs:reactive-core'
implementation 'no.nav.testnav.libs:servlet-core'
implementation 'no.nav.testnav.libs:servlet-security'
implementation 'no.nav.testnav.libs:reactive-security'
implementation 'no.nav.testnav.libs:security-core'

implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-security'

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

implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config
implementation 'org.springframework.boot:spring-boot-starter-actuator'

implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0'
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20'

implementation 'net.logstash.logback:logstash-logback-encoder:7.4'
Expand Down
5 changes: 4 additions & 1 deletion apps/ereg-batch-status-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
cluster: dev-gcp
- application: organisasjon-bestilling-service
cluster: dev-gcp
outbound:
external:
- host: testnav-modapp-ereg-proxy.dev-fss-pub.nais.io
tokenx:
enabled: true
azure:
Expand Down Expand Up @@ -48,4 +51,4 @@ spec:
limits:
memory: 2048Mi
ingresses:
- "https://ereg-batch-status-service.dev-fss-pub.nais.io"
- "https://testnav-ereg-batch-status-service.intern.dev.nav.no"
4 changes: 2 additions & 2 deletions apps/ereg-batch-status-service/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ rootProject.name = 'ereg-batch-status-service'

includeBuild '../../libs/data-transfer-objects'
includeBuild '../../libs/reactive-core'
includeBuild '../../libs/servlet-core'
includeBuild '../../libs/servlet-security'
includeBuild '../../libs/reactive-security'
includeBuild '../../libs/security-core'

gradleEnterprise {
buildScan {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package no.nav.registre.testnorge.eregbatchstatusservice.config;

import no.nav.testnav.libs.reactivecore.config.CoreConfig;
import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.reactive.config.EnableWebFlux;

import no.nav.testnav.libs.servletcore.config.ApplicationCoreConfig;
import no.nav.testnav.libs.servletsecurity.config.SecureOAuth2ServerToServerConfiguration;

@Configuration
@EnableWebFlux
@Import({
ApplicationCoreConfig.class,
CoreConfig.class,
SecurityConfig.class,
SecureOAuth2ServerToServerConfiguration.class
})
public class ApplicationConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package no.nav.registre.testnorge.eregbatchstatusservice.config;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import no.nav.testnav.libs.securitycore.domain.ServerProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import static lombok.AccessLevel.PACKAGE;

/**
* Samler alle placeholders for ulike {@code consumers.*}-konfigurasjon her, dvs. subklasser av {@code ServerProperties}.
* <br/><br/>
* Husk at Spring Boot bruker <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.typesafe-configuration-properties.relaxed-binding">relaxed binding</a>
* mellom configuration properties og field names.
*
* @see ServerProperties
*/
@Configuration
@ConfigurationProperties(prefix = "consumers")
@NoArgsConstructor(access = PACKAGE)
@Getter
@Setter(PACKAGE)
public class Consumers {

private ServerProperties modappEregProxy;

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import no.nav.testnav.libs.reactivecore.config.ApplicationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.http.HttpHeaders;

import java.util.Arrays;

import no.nav.testnav.libs.servletcore.config.ApplicationProperties;

@Configuration
public class OpenApiConfig implements WebMvcConfigurer {
public class OpenApiConfig {

@Bean
public OpenAPI openApi(ApplicationProperties applicationProperties) {
Expand All @@ -27,7 +25,7 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) {
.scheme("bearer")
.bearerFormat("JWT")
.in(SecurityScheme.In.HEADER)
.name("Authorization")
.name(HttpHeaders.AUTHORIZATION)
))
.addSecurityItem(
new SecurityRequirement().addList("bearer-jwt", Arrays.asList("read", "write")))
Expand All @@ -47,9 +45,4 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) {
)
);
}

@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/swagger").setViewName("redirect:/swagger-ui.html");
}
}
Loading

0 comments on commit 4889d64

Please sign in to comment.