diff --git a/.github/workflows/alerts.yaml b/.github/workflows/alerts.yaml index 255192ba..a9efb873 100644 --- a/.github/workflows/alerts.yaml +++ b/.github/workflows/alerts.yaml @@ -17,5 +17,5 @@ jobs: uses: nais/deploy/actions/deploy@v1 env: APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} - CLUSTER: prod-fss + CLUSTER: prod-gcp RESOURCE: alerts.yaml diff --git a/.github/workflows/deploy-preprod.yaml b/.github/workflows/deploy-preprod.yaml index 11155320..e8b4510d 100644 --- a/.github/workflows/deploy-preprod.yaml +++ b/.github/workflows/deploy-preprod.yaml @@ -54,7 +54,7 @@ jobs: echo ${IMAGE} deploy-dev: - name: Deploy to NAIS Dev-fss + name: Deploy to NAIS dev-gcp needs: build runs-on: ubuntu-latest steps: @@ -62,7 +62,7 @@ jobs: - uses: nais/deploy/actions/deploy@v1 env: APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} - CLUSTER: dev-fss + CLUSTER: dev-gcp RESOURCE: naiserator-dev.yaml # Notify Slack diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b7c5493a..e23d046d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -55,7 +55,7 @@ jobs: deploy-dev: if: github.ref == 'refs/heads/master' - name: Deploy to NAIS Dev-fss + name: Deploy to NAIS dev-gcp needs: build runs-on: ubuntu-latest steps: @@ -63,7 +63,7 @@ jobs: - uses: nais/deploy/actions/deploy@v1 env: APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} - CLUSTER: dev-fss + CLUSTER: dev-gcp RESOURCE: naiserator-dev.yaml # Notify Slack @@ -79,7 +79,7 @@ jobs: deploy-prod: if: github.ref == 'refs/heads/master' - name: Deploy to NAIS Prod-fss + name: Deploy to NAIS prod-gcp needs: deploy-dev runs-on: ubuntu-latest steps: @@ -87,7 +87,7 @@ jobs: - uses: nais/deploy/actions/deploy@v1 env: APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} - CLUSTER: prod-fss + CLUSTER: prod-gcp RESOURCE: naiserator-prod.yaml # Notify Slack diff --git a/Dockerfile b/Dockerfile index 1d6eae31..0bc32773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ -FROM navikt/java:11-appdynamics -ENV APPD_ENABLED=true -LABEL org.opencontainers.image.source=https://github.com/navikt/syfomotebehov - -COPY init.sh /init-scripts/init.sh - -COPY build/libs/*.jar app.jar - -ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom \ - -Dspring.profiles.active=remote" +FROM gcr.io/distroless/java17 +WORKDIR /app +COPY build/libs/app.jar app.jar +ENV JDK_JAVA_OPTIONS="-XX:MaxRAMPercentage=75 -Dspring.profiles.active=remote" +ENV TZ="Europe/Oslo" +EXPOSE 8080 +USER nonroot +CMD [ "app.jar" ] diff --git a/build.gradle.kts b/build.gradle.kts index da28ffbe..b95e89a2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,11 +11,13 @@ object Versions { const val flywayVersion = "8.4.4" const val tokenSupportVersion = "1.3.19" const val ojdbcVersion = "19.3.0.0" - const val h2Version = "2.1.210" const val mockkVersion = "1.12.7" const val springMockkVersion = "3.1.1" const val confluent = "7.1.1" const val isdialogmoteSchema = "1.0.5" + const val hikari = "5.0.1" + const val postgres = "42.6.0" + const val postgresEmbedded = "0.13.4" } plugins { @@ -78,32 +80,33 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-jersey") implementation("org.springframework.boot:spring-boot-starter-cache") implementation("org.springframework.boot:spring-boot-starter-data-jpa") - implementation("org.springframework.boot:spring-boot-starter-jta-atomikos") implementation("org.springframework.boot:spring-boot-starter-webflux") implementation("io.micrometer:micrometer-registry-prometheus:1.8.2") implementation("no.nav.security:token-validation-spring:${Versions.tokenSupportVersion}") - implementation("com.oracle.ojdbc:ojdbc8:${Versions.ojdbcVersion}") implementation("org.springframework.kafka:spring-kafka") implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}") implementation("io.confluent:kafka-schema-registry:${Versions.confluent}") implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:${Versions.isdialogmoteSchema}") - implementation("org.flywaydb:flyway-core:${Versions.flywayVersion}") implementation("javax.inject:javax.inject:1") implementation("org.slf4j:slf4j-api:1.7.35") implementation("net.logstash.logback:logstash-logback-encoder:6.4") implementation("org.apache.commons:commons-lang3:3.5") implementation("com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20211018.2") + implementation("org.flywaydb:flyway-core:${Versions.flywayVersion}") + implementation("com.zaxxer:HikariCP:${Versions.hikari}") + implementation("org.postgresql:postgresql:${Versions.postgres}") + testImplementation("com.opentable.components:otj-pg-embedded:${Versions.postgresEmbedded}") + testImplementation("org.junit.jupiter:junit-jupiter:${Versions.junitJupiterVersion}") testImplementation("no.nav.security:token-validation-test-support:${Versions.tokenSupportVersion}") testImplementation("org.springframework.kafka:spring-kafka-test") testImplementation("org.springframework.boot:spring-boot-starter-test") { exclude(module = "junit") } - testImplementation("com.h2database:h2:${Versions.h2Version}") testImplementation("io.mockk:mockk:${Versions.mockkVersion}") testImplementation("com.ninja-squad:springmockk:${Versions.springMockkVersion}") } diff --git a/init.sh b/init.sh deleted file mode 100644 index a4320c9e..00000000 --- a/init.sh +++ /dev/null @@ -1,3 +0,0 @@ -export SPRING_DATASOURCE_URL=$(cat /secrets/syfomotebehovdb/config/jdbc_url) -export SPRING_DATASOURCE_USERNAME=$(cat /secrets/syfomotebehovdb/credentials/username) -export SPRING_DATASOURCE_PASSWORD=$(cat /secrets/syfomotebehovdb/credentials/password) diff --git a/naiserator-dev.yaml b/naiserator-dev.yaml index d1a2d7d8..e848b5b8 100644 --- a/naiserator-dev.yaml +++ b/naiserator-dev.yaml @@ -8,7 +8,11 @@ metadata: spec: image: {{ image }} port: 8080 - team: teamsykefravr + startup: + path: /syfomotebehov/internal/isAlive + periodSeconds: 5 + timeout: 5 + failureThreshold: 10 liveness: path: /syfomotebehov/internal/isAlive initialDelay: 30 @@ -21,11 +25,10 @@ spec: timeout: 1 resources: limits: - cpu: 2000m - memory: 2048Mi + memory: 1048Mi requests: - cpu: 1000m - memory: 1024Mi + cpu: 100m + memory: 512Mi replicas: min: 2 max: 4 @@ -34,10 +37,7 @@ spec: enabled: true path: /syfomotebehov/internal/prometheus ingresses: - - "https://syfomotebehov.dev.intern.nav.no" - - "https://syfomotebehov.nais.preprod.local" - - "https://app-q1.adeo.no/syfomotebehov" - - "https://syfomotebehov.dev-fss-pub.nais.io" + - "https://syfomotebehov.intern.dev.nav.no" tokenx: enabled: true accessPolicy: @@ -45,90 +45,72 @@ spec: rules: - application: syfomodiaperson namespace: teamsykefravr - cluster: dev-fss - application: dialogmote-frontend - namespace: team-esyfo - cluster: dev-gcp - application: ditt-sykefravaer namespace: flex - cluster: dev-gcp - - application: isyfomock - namespace: teamsykefravr - cluster: dev-gcp outbound: + external: + - host: "pdl-api.dev-fss-pub.nais.io" rules: - application: esyfovarsel - namespace: team-esyfo - cluster: dev-gcp + - application: syfobrukertilgang + - application: istilgangskontroll + namespace: teamsykefravr + - application: syfobehandlendeenhet + namespace: teamsykefravr - application: isnarmesteleder namespace: teamsykefravr - cluster: dev-gcp azure: application: enabled: true tenant: trygdeetaten.no - replyURLs: - - "https://syfomotebehov.dev.intern.nav.no/oauth2/callback" claims: extra: - "NAVident" - vault: + idporten: enabled: true - paths: - - kvPath: "/oracle/data/dev/creds/syfomotebehov_q1-user" - mountPath: "/secrets/syfomotebehovdb/credentials" - - kvPath: "/oracle/data/dev/config/syfomotebehov_q1" - mountPath: "/secrets/syfomotebehovdb/config" - - kvPath: "/kv/preprod/fss/syfomotebehov/team-esyfo" - mountPath: "/var/run/secrets/nais.io/vault" - envFrom: - - configmap: loginservice-idporten + sidecar: + enabled: true + gcp: + sqlInstances: + - type: POSTGRES_14 + databases: + - name: syfomotebehov-db + diskAutoresize: true kafka: pool: nav-dev env: - name: APP_NAME value: "syfomotebehov" - - name: APPDYNAMICS_CONTROLLER_HOST_NAME - value: appdynamics.adeo.no - - name: APPDYNAMICS_CONTROLLER_PORT - value: "443" - - name: APPDYNAMICS_CONTROLLER_SSL_ENABLED + - name: TOGGLE_KANDIDATLISTA value: "true" - - name: toggle_enable_nullstill - value: 'false' - - name: SPRING_KAFKA_BOOTSTRAP_SERVERS - value: b27apvl00045.preprod.local:8443,b27apvl00046.preprod.local:8443,b27apvl00047.preprod.local:8443 + - name: TOKENX_IDP + value: "https://oidc-ver2.difi.no/idporten-oidc-provider/" + - name: DIALOGMOTE_FRONTEND_CLIENT_ID + value: "dev-gcp:team-esyfo:dialogmote-frontend" + - name: DITT_SYKEFRAVAER_FRONTEND_CLIENT_ID + value: "dev-gcp:flex:ditt-sykefravaer" + - name: PDL_CLIENT_ID + value: "dev-fss.pdl.pdl-api" - name: PDL_URL - value: https://pdl-api.nais.preprod.local/graphql + value: "https://pdl-api.dev-fss-pub.nais.io/graphql" + - name: ISTILGANGSKONTROLL_CLIENT_ID + value: "dev-gcp.teamsykefravr.istilgangskontroll" + - name: ISTILGANGSKONTROLL_URL + value: "http://istilgangskontroll.teamsykefravr" + - name: SYFOBRUKERTILGANG_CLIENT_ID + value: "dev-gcp.team-esyfo.syfobrukertilgang" - name: SYFOBRUKERTILGANG_URL - value: https://syfobrukertilgang.nais.preprod.local - - name: SYFOTILGANGSKONTROLL_CLIENT_ID - value: "dev-fss.teamsykefravr.syfo-tilgangskontroll" - - name: TILGANGSKONTROLLAPI_URL - value: https://syfo-tilgangskontroll.nais.preprod.local/syfo-tilgangskontroll/api/tilgang - - name: ESYFOVARSELAPI_URL - value: https://esyfovarsel.dev.intern.nav.no/api/bruker - - name: SECURITY_TOKEN_SERVICE_REST_URL - value: https://security-token-service.nais.preprod.local + value: "http://syfobrukertilgang" + - name: ESYFOVARSEL_CLIENT_ID + value: "dev-gcp.team-esyfo.esyfovarsel" + - name: ESYFOVARSEL_URL + value: "http://esyfovarsel" - name: SYFOBEHANDLENDEENHET_CLIENT_ID value: "dev-gcp.teamsykefravr.syfobehandlendeenhet" - name: SYFOBEHANDLENDEENHET_URL - value: "https://syfobehandlendeenhet.dev.intern.nav.no" - - name: NO_NAV_SECURITY_JWT_ISSUER_INTERN_DISCOVERYURL - value: https://isso-q.adeo.no:443/isso/oauth2/.well-known/openid-configuration - - name: KAFKA_ENV_NAME - value: q1 - - name: DIALOGMOTE_FRONTEND_CLIENT_ID - value: dev-gcp:team-esyfo:dialogmote-frontend - - name: SYFOBRUKERTILGANG_CLIENT_ID - value: dev-fss:team-esyfo:syfobrukertilgang - - name: TOKENX_IDP - value: https://oidc-ver2.difi.no/idporten-oidc-provider/ - - name: DITT_SYKEFRAVAER_FRONTEND_CLIENT_ID - value: dev-gcp:flex:ditt-sykefravaer - - name: TOGGLE_KANDIDATLISTA - value: "true" - - name: ISNARMESTELEDER_URL - value: "https://isnarmesteleder.dev.intern.nav.no" + value: "http://syfobehandlendeenhet.teamsykefravr" - name: ISNARMESTELEDER_CLIENT_ID value: "dev-gcp.teamsykefravr.isnarmesteleder" + - name: ISNARMESTELEDER_URL + value: "http://isnarmesteleder.teamsykefravr" diff --git a/naiserator-prod.yaml b/naiserator-prod.yaml index 2f1c7aab..f1d3028d 100644 --- a/naiserator-prod.yaml +++ b/naiserator-prod.yaml @@ -8,7 +8,11 @@ metadata: spec: image: {{ image }} port: 8080 - team: teamsykefravr + startup: + path: /syfomotebehov/internal/isAlive + periodSeconds: 5 + timeout: 5 + failureThreshold: 10 liveness: path: /syfomotebehov/internal/isAlive initialDelay: 30 @@ -21,11 +25,10 @@ spec: timeout: 1 resources: limits: - cpu: 2000m - memory: 2048Mi + memory: 1048Mi requests: - cpu: 1000m - memory: 1536Mi + cpu: 100m + memory: 512Mi replicas: min: 2 max: 4 @@ -35,9 +38,6 @@ spec: path: /syfomotebehov/internal/prometheus ingresses: - "https://syfomotebehov.intern.nav.no" - - "https://syfomotebehov.nais.adeo.no" - - "https://app.adeo.no/syfomotebehov" - - "https://syfomotebehov.prod-fss-pub.nais.io" tokenx: enabled: true accessPolicy: @@ -45,87 +45,73 @@ spec: rules: - application: syfomodiaperson namespace: teamsykefravr - cluster: prod-fss - application: dialogmote-frontend - namespace: team-esyfo - cluster: prod-gcp - application: ditt-sykefravaer namespace: flex - cluster: prod-gcp outbound: + external: + - host: "pdl-api.prod-fss-pub.nais.io" rules: - application: esyfovarsel - namespace: team-esyfo - cluster: prod-gcp + - application: syfobrukertilgang + - application: istilgangskontroll + namespace: teamsykefravr + - application: syfobehandlendeenhet + namespace: teamsykefravr - application: isnarmesteleder namespace: teamsykefravr - cluster: prod-gcp azure: application: enabled: true tenant: nav.no - replyURLs: - - "https://syfomotebehov.intern.nav.no/oauth2/callback" claims: extra: - "NAVident" - vault: + idporten: enabled: true - paths: - - kvPath: "/oracle/data/prod/creds/syfomotebehov_p-user" - mountPath: "/secrets/syfomotebehovdb/credentials" - - kvPath: "/oracle/data/prod/config/syfomotebehov_p" - mountPath: "/secrets/syfomotebehovdb/config" - - kvPath: "/kv/prod/fss/syfomotebehov/team-esyfo" - mountPath: "/var/run/secrets/nais.io/vault" - envFrom: - - configmap: loginservice-idporten + sidecar: + enabled: true + gcp: + sqlInstances: + - type: POSTGRES_14 + tier: db-custom-1-3840 + databases: + - name: syfomotebehov-db + diskAutoresize: true kafka: pool: nav-prod env: - name: APP_NAME value: "syfomotebehov" - - name: APPDYNAMICS_CONTROLLER_HOST_NAME - value: appdynamics.adeo.no - - name: APPDYNAMICS_CONTROLLER_PORT - value: "443" - - name: APPDYNAMICS_CONTROLLER_SSL_ENABLED + - name: TOGGLE_KANDIDATLISTA value: "true" - - name: toggle_enable_nullstill - value: 'false' - - name: SPRING_KAFKA_BOOTSTRAP_SERVERS - value: a01apvl00145.adeo.no:8443,a01apvl00146.adeo.no:8443,a01apvl00147.adeo.no:8443,a01apvl00148.adeo.no:8443,a01apvl00149.adeo.no:8443,a01apvl00150.adeo.no:8443 + - name: TOKENX_IDP + value: "https://oidc.difi.no/idporten-oidc-provider/" + - name: DIALOGMOTE_FRONTEND_CLIENT_ID + value: "prod-gcp:team-esyfo:dialogmote-frontend" + - name: DITT_SYKEFRAVAER_FRONTEND_CLIENT_ID + value: "prod-gcp:flex:ditt-sykefravaer" + - name: PDL_CLIENT_ID + value: "prod-fss.pdl.pdl-api" - name: PDL_URL - value: https://pdl-api.nais.adeo.no/graphql + value: "https://pdl-api.prod-fss-pub.nais.io/graphql" + - name: ISTILGANGSKONTROLL_CLIENT_ID + value: "prod-gcp.teamsykefravr.istilgangskontroll" + - name: ISTILGANGSKONTROLL_URL + value: "http://istilgangskontroll.teamsykefravr" + - name: SYFOBRUKERTILGANG_CLIENT_ID + value: "prod-gcp.team-esyfo.syfobrukertilgang" - name: SYFOBRUKERTILGANG_URL - value: https://syfobrukertilgang.nais.adeo.no - - name: SYFOTILGANGSKONTROLL_CLIENT_ID - value: "prod-fss.teamsykefravr.syfo-tilgangskontroll" - - name: TILGANGSKONTROLLAPI_URL - value: https://syfo-tilgangskontroll.nais.adeo.no/syfo-tilgangskontroll/api/tilgang - - name: ESYFOVARSELAPI_URL - value: https://esyfovarsel.intern.nav.no/api/bruker - - name: SECURITY_TOKEN_SERVICE_REST_URL - value: https://security-token-service.nais.adeo.no + value: "http://syfobrukertilgang" + - name: ESYFOVARSEL_CLIENT_ID + value: "prod-gcp.team-esyfo.esyfovarsel" + - name: ESYFOVARSEL_URL + value: "http://esyfovarsel" - name: SYFOBEHANDLENDEENHET_CLIENT_ID value: "prod-gcp.teamsykefravr.syfobehandlendeenhet" - name: SYFOBEHANDLENDEENHET_URL - value: "https://syfobehandlendeenhet.intern.nav.no" - - name: NO_NAV_SECURITY_JWT_ISSUER_INTERN_DISCOVERYURL - value: https://isso.adeo.no:443/isso/oauth2/.well-known/openid-configuration - - name: KAFKA_ENV_NAME - value: p - - name: DIALOGMOTE_FRONTEND_CLIENT_ID - value: prod-gcp:team-esyfo:dialogmote-frontend - - name: SYFOBRUKERTILGANG_CLIENT_ID - value: prod-fss:team-esyfo:syfobrukertilgang - - name: TOKENX_IDP - value: https://oidc.difi.no/idporten-oidc-provider/ - - name: DITT_SYKEFRAVAER_FRONTEND_CLIENT_ID - value: prod-gcp:flex:ditt-sykefravaer - - name: TOGGLE_KANDIDATLISTA - value: "true" - - name: ISNARMESTELEDER_URL - value: "https://isnarmesteleder.intern.nav.no" + value: "http://syfobehandlendeenhet.teamsykefravr" - name: ISNARMESTELEDER_CLIENT_ID value: "prod-gcp.teamsykefravr.isnarmesteleder" + - name: ISNARMESTELEDER_URL + value: "http://isnarmesteleder.teamsykefravr" diff --git a/src/main/kotlin/no/nav/syfo/Application.kt b/src/main/kotlin/no/nav/syfo/Application.kt index 23d5c732..f6a5ef06 100644 --- a/src/main/kotlin/no/nav/syfo/Application.kt +++ b/src/main/kotlin/no/nav/syfo/Application.kt @@ -3,7 +3,6 @@ package no.nav.syfo import no.nav.security.token.support.spring.api.EnableJwtTokenValidation import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration -import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration import org.springframework.boot.runApplication @@ -11,7 +10,6 @@ import org.springframework.boot.runApplication exclude = [ JpaRepositoriesAutoConfiguration::class, HibernateJpaAutoConfiguration::class, - FlywayAutoConfiguration::class ] ) @EnableJwtTokenValidation diff --git a/src/main/kotlin/no/nav/syfo/config/FlywayConfig.kt b/src/main/kotlin/no/nav/syfo/config/FlywayConfig.kt deleted file mode 100644 index beb6c008..00000000 --- a/src/main/kotlin/no/nav/syfo/config/FlywayConfig.kt +++ /dev/null @@ -1,28 +0,0 @@ -package no.nav.syfo.config - -import org.flywaydb.core.Flyway -import org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer -import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.transaction.jta.JtaTransactionManager -import javax.sql.DataSource - -@Configuration -class FlywayConfig { - - @Bean - fun flyway(dataSource: DataSource): Flyway = Flyway.configure().dataSource(dataSource).load() - - // Sørger for at flyway migrering skjer etter at JTA transaction manager er ferdig satt opp av Spring. - // Forhindrer WARNING: transaction manager not running? loggspam fra Atomikos. - @Bean - fun flywayMigrationStrategy(jtaTransactionManager: JtaTransactionManager) = - FlywayMigrationStrategy { flyway -> - flyway.migrate() - } - - @Bean - fun flywayMigrationInitializer(flyway: Flyway, flywayMigrationStrategy: FlywayMigrationStrategy) = - FlywayMigrationInitializer(flyway, flywayMigrationStrategy) -} diff --git a/src/main/kotlin/no/nav/syfo/consumer/esyfovarsel/EsyfovarselConsumer.kt b/src/main/kotlin/no/nav/syfo/consumer/esyfovarsel/EsyfovarselConsumer.kt index 9db72302..b16f7f6f 100644 --- a/src/main/kotlin/no/nav/syfo/consumer/esyfovarsel/EsyfovarselConsumer.kt +++ b/src/main/kotlin/no/nav/syfo/consumer/esyfovarsel/EsyfovarselConsumer.kt @@ -22,7 +22,7 @@ class EsyfovarselConsumer( private val contextHolder: TokenValidationContextHolder, private val webClient: WebClient, private val metric: Metric, - @Value("\${esyfovarselapi.url}") private val baseUrl: String + @Value("\${esyfovarsel.url}") private val baseUrl: String ) { fun varsel39Sent(aktorId: String): Boolean { val callId = createCallId() diff --git a/src/main/kotlin/no/nav/syfo/consumer/pdl/PdlConsumer.kt b/src/main/kotlin/no/nav/syfo/consumer/pdl/PdlConsumer.kt index c65acde4..ec15029d 100644 --- a/src/main/kotlin/no/nav/syfo/consumer/pdl/PdlConsumer.kt +++ b/src/main/kotlin/no/nav/syfo/consumer/pdl/PdlConsumer.kt @@ -1,6 +1,8 @@ package no.nav.syfo.consumer.pdl -import no.nav.syfo.consumer.sts.StsConsumer +import no.nav.security.token.support.core.context.TokenValidationContextHolder +import no.nav.syfo.api.auth.OIDCIssuer +import no.nav.syfo.api.auth.OIDCUtil import no.nav.syfo.metric.Metric import no.nav.syfo.util.* import org.slf4j.LoggerFactory @@ -16,8 +18,8 @@ import org.springframework.web.client.RestTemplate class PdlConsumer( private val metric: Metric, @Value("\${pdl.url}") private val pdlUrl: String, - private val stsConsumer: StsConsumer, - private val restTemplate: RestTemplate + private val restTemplate: RestTemplate, + private val oidcContextHolder: TokenValidationContextHolder ) { fun person(ident: String): PdlHentPerson? { metric.tellHendelse("call_pdl") @@ -133,12 +135,11 @@ class PdlConsumer( } private fun createRequestEntity(request: PdlRequest): HttpEntity { - val stsToken: String = stsConsumer.token() + val token = OIDCUtil.tokenFraOIDC(oidcContextHolder, OIDCIssuer.INTERN_AZUREAD_V2) val headers = HttpHeaders() headers.contentType = MediaType.APPLICATION_JSON headers.set(TEMA_HEADER, ALLE_TEMA_HEADERVERDI) - headers.set(AUTHORIZATION, bearerCredentials(stsToken)) - headers.set(NAV_CONSUMER_TOKEN_HEADER, bearerCredentials(stsToken)) + headers.set(AUTHORIZATION, bearerCredentials(token)) return HttpEntity(request, headers) } diff --git a/src/main/kotlin/no/nav/syfo/consumer/sts/StsConsumer.kt b/src/main/kotlin/no/nav/syfo/consumer/sts/StsConsumer.kt deleted file mode 100644 index 253c805e..00000000 --- a/src/main/kotlin/no/nav/syfo/consumer/sts/StsConsumer.kt +++ /dev/null @@ -1,92 +0,0 @@ -package no.nav.syfo.consumer.sts - -import com.fasterxml.jackson.annotation.JsonProperty -import no.nav.syfo.metric.Metric -import no.nav.syfo.util.basicCredentials -import org.slf4j.LoggerFactory -import org.springframework.beans.factory.annotation.Value -import org.springframework.http.* -import org.springframework.stereotype.Service -import org.springframework.web.reactive.function.client.* -import reactor.core.publisher.Mono -import java.time.LocalDateTime - -@Service -class StsConsumer( - private val metric: Metric, - @Value("\${security.token.service.rest.url}") private val baseUrl: String, - @Value("\${srv.username}") private val username: String, - @Value("\${srv.password}") private val password: String -) { - private var cachedOidcToken: STSToken? = null - - private val webClient = WebClient - .builder() - .baseUrl(baseUrl) - .defaultHeader(HttpHeaders.AUTHORIZATION, basicCredentials(username, password)) - .build() - - fun token(): String { - if (STSToken.shouldRenew(cachedOidcToken)) { - val response = webClient - .get() - .uri(getStsTokenUrl()) - .accept(MediaType.APPLICATION_JSON) - .retrieve() - .onStatus({ obj: HttpStatus -> obj.is4xxClientError }) { response -> - logError(response) - Mono.error(RuntimeException("4xx")) - } - .onStatus({ obj: HttpStatus -> obj.is5xxServerError }) { response -> - logError(response) - Mono.error(RuntimeException("5xx")) - } - .bodyToMono() - .block() - cachedOidcToken = response - metric.tellEndepunktKall(METRIC_CALL_STS_SUCCESS) - } - return cachedOidcToken!!.access_token - } - - fun logError(response: ClientResponse) { - LOG.error("Request to get STS failed with status: ${response.rawStatusCode()}") - metric.tellHendelse(METRIC_CALL_STS_FAIL) - } - - companion object { - private val LOG = LoggerFactory.getLogger(StsConsumer::class.java) - - const val METRIC_CALL_STS_SUCCESS = "call_sts_success" - const val METRIC_CALL_STS_FAIL = "call_sts_fail" - } - - private fun getStsTokenUrl() = "$baseUrl/rest/v1/sts/token?grant_type=client_credentials&scope=openid" -} - -data class STSToken( - @JsonProperty(value = "access_token", required = true) - val access_token: String, - @JsonProperty(value = "token_type", required = true) - val token_type: String, - @JsonProperty(value = "expires_in", required = true) - val expires_in: Int -) { - // Expire 10 seconds before token expiration - - val expirationTime: LocalDateTime = LocalDateTime.now().plusSeconds(expires_in - 10L) - - companion object { - fun shouldRenew(token: STSToken?): Boolean { - if (token == null) { - return true - } - - return isExpired(token) - } - - private fun isExpired(token: STSToken): Boolean { - return token.expirationTime.isBefore(LocalDateTime.now()) - } - } -} diff --git a/src/main/kotlin/no/nav/syfo/consumer/veiledertilgang/VeilederTilgangConsumer.kt b/src/main/kotlin/no/nav/syfo/consumer/veiledertilgang/VeilederTilgangConsumer.kt index b0565931..b1dbb3e4 100644 --- a/src/main/kotlin/no/nav/syfo/consumer/veiledertilgang/VeilederTilgangConsumer.kt +++ b/src/main/kotlin/no/nav/syfo/consumer/veiledertilgang/VeilederTilgangConsumer.kt @@ -14,8 +14,8 @@ import org.springframework.web.client.* @Service class VeilederTilgangConsumer( - @Value("\${syfotilgangskontroll.client.id}") private val syfotilgangskontrollClientId: String, - @Value("\${tilgangskontrollapi.url}") private val tilgangskontrollUrl: String, + @Value("\${istilgangskontroll.client.id}") private val syfotilgangskontrollClientId: String, + @Value("\${istilgangskontroll.url}") private val tilgangskontrollUrl: String, private val azureAdV2TokenConsumer: AzureAdV2TokenConsumer, private val metric: Metric, private val template: RestTemplate, diff --git a/src/main/kotlin/no/nav/syfo/motebehov/database/MotebehovDAO.kt b/src/main/kotlin/no/nav/syfo/motebehov/database/MotebehovDAO.kt index 6262c09b..8b2d7dd2 100644 --- a/src/main/kotlin/no/nav/syfo/motebehov/database/MotebehovDAO.kt +++ b/src/main/kotlin/no/nav/syfo/motebehov/database/MotebehovDAO.kt @@ -40,14 +40,14 @@ class MotebehovDAO(private val namedParameterJdbcTemplate: NamedParameterJdbcTem } fun hentUbehandledeMotebehov(aktoerId: String): List { - return Optional.ofNullable(jdbcTemplate.query("SELECT * FROM motebehov WHERE aktoer_id = ? AND har_motebehov = 1 AND behandlet_veileder_ident IS NULL", innsendingRowMapper, aktoerId)).orElse(emptyList()) + return Optional.ofNullable(jdbcTemplate.query("SELECT * FROM motebehov WHERE aktoer_id = ? AND har_motebehov AND behandlet_veileder_ident IS NULL", innsendingRowMapper, aktoerId)).orElse(emptyList()) } fun oppdaterUbehandledeMotebehovTilBehandlet( motebehovUUID: UUID, veilederIdent: String ): Int { - val oppdaterSql = "UPDATE motebehov SET behandlet_tidspunkt = ?, behandlet_veileder_ident = ? WHERE motebehov_uuid = ? AND har_motebehov = 1 AND behandlet_veileder_ident IS NULL" + val oppdaterSql = "UPDATE motebehov SET behandlet_tidspunkt = ?, behandlet_veileder_ident = ? WHERE motebehov_uuid = ? AND har_motebehov AND behandlet_veileder_ident IS NULL" return jdbcTemplate.update(oppdaterSql, convert(LocalDateTime.now()), veilederIdent, motebehovUUID.toString()) } diff --git a/src/main/kotlin/no/nav/syfo/oppfolgingstilfelle/database/OppfolgingstilfelleDAO.kt b/src/main/kotlin/no/nav/syfo/oppfolgingstilfelle/database/OppfolgingstilfelleDAO.kt index 53d3cb8a..5e039b56 100644 --- a/src/main/kotlin/no/nav/syfo/oppfolgingstilfelle/database/OppfolgingstilfelleDAO.kt +++ b/src/main/kotlin/no/nav/syfo/oppfolgingstilfelle/database/OppfolgingstilfelleDAO.kt @@ -98,8 +98,8 @@ class OppfolgingstilfelleDAO @Inject constructor( fun nullstillOppfolgingstilfeller(fnr: String): Int { val oppfolgingstilfeller = get(fnr) return if (oppfolgingstilfeller.isNotEmpty()) { - val oppfolgingstilfelleIder: List = oppfolgingstilfeller.map { - it.uuid + val oppfolgingstilfelleIder: List = oppfolgingstilfeller.map { + it.uuid.toString() } namedParameterJdbcTemplate.update( "DELETE FROM oppfolgingstilfelle WHERE oppfolgingstilfelle_uuid IN (:oppfolgingstilfelleIder)", diff --git a/src/main/resources/application-preprod.yaml b/src/main/resources/application-preprod.yaml deleted file mode 100644 index 4a1e36b4..00000000 --- a/src/main/resources/application-preprod.yaml +++ /dev/null @@ -1,9 +0,0 @@ -management: - endpoints.web.exposure.include: '*' - endpoint: - health.show-details: always - security.enabled: false - -server: - servlet: - context-path: /syfomotebehov diff --git a/src/main/resources/application-remote.yaml b/src/main/resources/application-remote.yaml deleted file mode 100644 index ba89b2e5..00000000 --- a/src/main/resources/application-remote.yaml +++ /dev/null @@ -1 +0,0 @@ -spring.jta.atomikos.properties.log-base-dir: '/tmp' \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index f8b9e705..6f5f528e 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -7,19 +7,10 @@ no.nav.security: discoveryurl: ${LOGINSERVICE_IDPORTEN_DISCOVERY_URL} accepted_audience: ${LOGINSERVICE_IDPORTEN_AUDIENCE} cookiename: selvbetjening-idtoken - proxy-url: http://webproxy.nais:8088 - intern: - discoveryurl: - accepted_audience: modiabrukerdialog-p,modiabrukerdialog-q1,veilarblogin-p,veilarblogin-q1,fpsak-frontend-p,fpsak-frontend-q1,fplos-p,fplos-q1 - cookiename: ID_token internazureadv2: discoveryurl: ${azure.app.well.known.url} accepted_audience: ${azure.app.client.id} cookiename: ID_token - proxy-url: http://webproxy.nais:8088 - sts: - discoveryurl: http://security-token-service.default/rest/v1/sts/.well-known/openid-configuration - accepted_audience: srvesyfovarsel tokenx: discoveryurl: ${TOKEN_X_WELL_KNOWN_URL} accepted_audience: ${TOKEN_X_CLIENT_ID} @@ -39,8 +30,12 @@ server: spring: main.banner-mode: 'off' - jta.atomikos.datasource: - max-pool-size: 32 - min-pool-size: 8 + flyway: + enabled: true + datasource: + url: jdbc:postgresql://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}?user=${DATABASE_USERNAME}&password=${DATABASE_PASSWORD} + hikari: + minimum-idle: 2 + maximum-pool-size: 8 dev: false diff --git a/src/main/resources/db/migration/R__grant_to_cloudsqliamuser.sql b/src/main/resources/db/migration/R__grant_to_cloudsqliamuser.sql new file mode 100644 index 00000000..361c14f7 --- /dev/null +++ b/src/main/resources/db/migration/R__grant_to_cloudsqliamuser.sql @@ -0,0 +1,3 @@ +REVOKE ALL ON ALL TABLES IN SCHEMA public FROM cloudsqliamuser; +-- GRANT SELECT ON ALL TABLES IN SCHEMA public TO cloudsqliamuser; +GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO cloudsqliamuser; diff --git a/src/main/resources/db/migration/V1_10__change_column_name_in_aktive_dialogmoter_tabell.sql b/src/main/resources/db/migration/V1_10__change_column_name_in_aktive_dialogmoter_tabell.sql deleted file mode 100644 index 35cd9d9f..00000000 --- a/src/main/resources/db/migration/V1_10__change_column_name_in_aktive_dialogmoter_tabell.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE DIALOGMOTER - RENAME COLUMN dialogmote_uuid TO dialogmote_extern_uuid; diff --git a/src/main/resources/db/migration/V1_11__legg_til_tabell_dialogmotekandidat.sql b/src/main/resources/db/migration/V1_11__legg_til_tabell_dialogmotekandidat.sql deleted file mode 100644 index 0d0e8117..00000000 --- a/src/main/resources/db/migration/V1_11__legg_til_tabell_dialogmotekandidat.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE DIALOGMOTEKANDIDAT -( - uuid VARCHAR(36) NOT NULL, - dialogmotekandidat_external_uuid VARCHAR(36) NOT NULL, - person_ident VARCHAR(11) NOT NULL, - kandidat VARCHAR(1) NOT NULL, - arsak VARCHAR(36) NOT NULL, - created_at TIMESTAMP NOT NULL, - database_updated_at TIMESTAMP NOT NULL, - CONSTRAINT DIALOGMOTEKANDIDAT_PK PRIMARY KEY (uuid), - CONSTRAINT DIALOGMOTEKANDIDAT_EXTERN_UUID_UNIQUE UNIQUE (dialogmotekandidat_external_uuid) -); diff --git a/src/main/resources/db/migration/V1_12__Legg_til_fnr_kolonner.sql b/src/main/resources/db/migration/V1_12__Legg_til_fnr_kolonner.sql deleted file mode 100644 index 720a792f..00000000 --- a/src/main/resources/db/migration/V1_12__Legg_til_fnr_kolonner.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE MOTEBEHOV -ADD( - sm_fnr VARCHAR(11), - opprettet_av_fnr VARCHAR(11) -); diff --git a/src/main/resources/db/migration/V1_1__Initial_version.sql b/src/main/resources/db/migration/V1_1__Initial_version.sql deleted file mode 100644 index 1332787e..00000000 --- a/src/main/resources/db/migration/V1_1__Initial_version.sql +++ /dev/null @@ -1,20 +0,0 @@ --- ROLLBACK-START ------------------- --- DROP TABLE MOTEBEHOV; - ---------------- --- ROLLBACK-END - -CREATE TABLE MOTEBEHOV ( - motebehov_uuid VARCHAR(36) NOT NULL, - opprettet_dato TIMESTAMP NOT NULL, - opprettet_av VARCHAR(13) NOT NULL, - aktoer_id VARCHAR(13) NOT NULL, - virksomhetsnummer VARCHAR(9) NOT NULL, - friskmelding_forventning CLOB, - tiltak CLOB, - tiltak_resultat CLOB, - har_motebehov NUMBER CHECK (har_motebehov IN (1, 0)), - forklaring CLOB, - CONSTRAINT MOTEBEHOV_PK PRIMARY KEY (motebehov_uuid) -); diff --git a/src/main/resources/db/migration/V1_1__grant_to_cloudsqliamuser.sql b/src/main/resources/db/migration/V1_1__grant_to_cloudsqliamuser.sql new file mode 100644 index 00000000..bb4c1025 --- /dev/null +++ b/src/main/resources/db/migration/V1_1__grant_to_cloudsqliamuser.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + CREATE ROLE cloudsqliamuser WITH NOLOGIN; + EXCEPTION WHEN DUPLICATE_OBJECT THEN + RAISE NOTICE 'not creating role cloudsqliamuser -- it already exists'; +END +$$; diff --git a/src/main/resources/db/migration/V1_2__Legg_til_tildeltenhet_kolonne.sql b/src/main/resources/db/migration/V1_2__Legg_til_tildeltenhet_kolonne.sql deleted file mode 100644 index 49941e98..00000000 --- a/src/main/resources/db/migration/V1_2__Legg_til_tildeltenhet_kolonne.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE MOTEBEHOV -ADD tildelt_enhet VARCHAR(10) \ No newline at end of file diff --git a/src/main/resources/db/migration/V1_2__motebehov.sql b/src/main/resources/db/migration/V1_2__motebehov.sql new file mode 100644 index 00000000..80aada59 --- /dev/null +++ b/src/main/resources/db/migration/V1_2__motebehov.sql @@ -0,0 +1,20 @@ +CREATE TABLE MOTEBEHOV ( + id SERIAL PRIMARY KEY, + motebehov_uuid VARCHAR(36) NOT NULL UNIQUE, + opprettet_dato TIMESTAMP NOT NULL, + opprettet_av VARCHAR(13) NOT NULL, + aktoer_id VARCHAR(13) NOT NULL, + virksomhetsnummer VARCHAR(9) NOT NULL, + har_motebehov BOOLEAN NOT NULL, + forklaring TEXT, + tildelt_enhet VARCHAR(10), + behandlet_tidspunkt TIMESTAMP, + behandlet_veileder_ident VARCHAR (20), + skjematype VARCHAR(10), + sm_fnr VARCHAR(11), + opprettet_av_fnr VARCHAR(11) +); + +CREATE INDEX opprettet_av_aktor_id_index ON MOTEBEHOV(opprettet_av, aktoer_id); + +CREATE INDEX aktor_id_index ON MOTEBEHOV(aktoer_id); diff --git a/src/main/resources/db/migration/V1_3__legg_til_kolonner_motebehov.sql b/src/main/resources/db/migration/V1_3__legg_til_kolonner_motebehov.sql deleted file mode 100644 index 5298a848..00000000 --- a/src/main/resources/db/migration/V1_3__legg_til_kolonner_motebehov.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE MOTEBEHOV -ADD ( - behandlet_tidspunkt TIMESTAMP, - behandlet_veileder_ident VARCHAR (20) - ); diff --git a/src/main/resources/db/migration/V1_6__legg_til_tabell_oppfolgingstilfelle.sql b/src/main/resources/db/migration/V1_3__oppfolgingstilfelle.sql similarity index 57% rename from src/main/resources/db/migration/V1_6__legg_til_tabell_oppfolgingstilfelle.sql rename to src/main/resources/db/migration/V1_3__oppfolgingstilfelle.sql index 190dd36a..27abda5c 100644 --- a/src/main/resources/db/migration/V1_6__legg_til_tabell_oppfolgingstilfelle.sql +++ b/src/main/resources/db/migration/V1_3__oppfolgingstilfelle.sql @@ -1,22 +1,13 @@ --- ROLLBACK-START ------------------- --- DROP TABLE OPPFOLGINGSTILFELLE; - ---------------- --- ROLLBACK-END - -DELETE FROM OPPFOLGINGSTILFELLE; - -DROP TABLE OPPFOLGINGSTILFELLE; - CREATE TABLE OPPFOLGINGSTILFELLE ( - oppfolgingstilfelle_uuid VARCHAR(36) NOT NULL, + id SERIAL PRIMARY KEY, + oppfolgingstilfelle_uuid VARCHAR(36) NOT NULL UNIQUE, opprettet TIMESTAMP NOT NULL, sist_endret TIMESTAMP NOT NULL, fnr VARCHAR(11) NOT NULL, virksomhetsnummer VARCHAR(9) NOT NULL, fom TIMESTAMP NOT NULL, tom TIMESTAMP NOT NULL, - CONSTRAINT OPPFOLGINGSTILFELLE_PK PRIMARY KEY(oppfolgingstilfelle_uuid), CONSTRAINT FNR_VIRKSOMHETSNR_UNIQUE UNIQUE (fnr, virksomhetsnummer) ); + +CREATE INDEX oppfolgingstilfelle_fnr_index ON OPPFOLGINGSTILFELLE(fnr); diff --git a/src/main/resources/db/migration/V1_4__dialogmote.sql b/src/main/resources/db/migration/V1_4__dialogmote.sql new file mode 100644 index 00000000..442a5d6f --- /dev/null +++ b/src/main/resources/db/migration/V1_4__dialogmote.sql @@ -0,0 +1,14 @@ +CREATE TABLE DIALOGMOTER +( + id SERIAL PRIMARY KEY, + uuid VARCHAR(36) NOT NULL UNIQUE, + dialogmote_extern_uuid VARCHAR(36) NOT NULL, + dialogmote_tidspunkt TIMESTAMP NOT NULL, + status_endring_tidspunkt TIMESTAMP NOT NULL, + db_endring_tidspunkt TIMESTAMP NOT NULL, + status_endring_type VARCHAR(36) NOT NULL, + person_ident VARCHAR(11) NOT NULL, + virksomhetsnummer VARCHAR(9) NOT NULL +); + +CREATE INDEX dialogmote_personident_index ON DIALOGMOTER(person_ident); diff --git a/src/main/resources/db/migration/V1_4__fjern_kolonner_motebehov.sql b/src/main/resources/db/migration/V1_4__fjern_kolonner_motebehov.sql deleted file mode 100644 index 479630b1..00000000 --- a/src/main/resources/db/migration/V1_4__fjern_kolonner_motebehov.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE MOTEBEHOV -DROP ( - friskmelding_forventning, - tiltak, - tiltak_resultat - ); diff --git a/src/main/resources/db/migration/V1_5__dialogmotekandidat.sql b/src/main/resources/db/migration/V1_5__dialogmotekandidat.sql new file mode 100644 index 00000000..b19d6a0b --- /dev/null +++ b/src/main/resources/db/migration/V1_5__dialogmotekandidat.sql @@ -0,0 +1,13 @@ +CREATE TABLE DIALOGMOTEKANDIDAT +( + id SERIAL PRIMARY KEY, + uuid VARCHAR(36) NOT NULL UNIQUE, + dialogmotekandidat_external_uuid VARCHAR(36) NOT NULL UNIQUE, + person_ident VARCHAR(11) NOT NULL, + kandidat VARCHAR(1) NOT NULL, + arsak VARCHAR(36) NOT NULL, + created_at TIMESTAMP NOT NULL, + database_updated_at TIMESTAMP NOT NULL +); + +CREATE INDEX dialogmotekandidat_personident_index ON DIALOGMOTEKANDIDAT(person_ident); diff --git a/src/main/resources/db/migration/V1_5__legg_til_tabell_oppfolgingstilfelle.sql b/src/main/resources/db/migration/V1_5__legg_til_tabell_oppfolgingstilfelle.sql deleted file mode 100644 index 1d03b066..00000000 --- a/src/main/resources/db/migration/V1_5__legg_til_tabell_oppfolgingstilfelle.sql +++ /dev/null @@ -1,18 +0,0 @@ --- ROLLBACK-START ------------------- --- DROP TABLE OPPFOLGINGSTILFELLE; - ---------------- --- ROLLBACK-END - -CREATE TABLE OPPFOLGINGSTILFELLE ( - oppfolgingstilfelle_uuid VARCHAR(36) NOT NULL, - opprettet TIMESTAMP NOT NULL, - sist_endret TIMESTAMP NOT NULL, - aktoer_id VARCHAR(13) NOT NULL, - virksomhetsnummer VARCHAR(9) NOT NULL, - fom TIMESTAMP NOT NULL, - tom TIMESTAMP NOT NULL, - CONSTRAINT OPPFOLGINGSTILFELLE_PK PRIMARY KEY(oppfolgingstilfelle_uuid), - CONSTRAINT AKTOR_VIRKSOMHETSNR_UNIQUE UNIQUE (aktoer_id, virksomhetsnummer) -); diff --git a/src/main/resources/db/migration/V1_7__legg_til_index.sql b/src/main/resources/db/migration/V1_7__legg_til_index.sql deleted file mode 100644 index 83152461..00000000 --- a/src/main/resources/db/migration/V1_7__legg_til_index.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE INDEX opprettet_av_aktor_id_index ON MOTEBEHOV(opprettet_av, aktoer_id); \ No newline at end of file diff --git a/src/main/resources/db/migration/V1_8__legg_til_kolonne_skjematype.sql b/src/main/resources/db/migration/V1_8__legg_til_kolonne_skjematype.sql deleted file mode 100644 index 16158ed2..00000000 --- a/src/main/resources/db/migration/V1_8__legg_til_kolonne_skjematype.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE MOTEBEHOV -ADD skjematype VARCHAR(10) diff --git a/src/main/resources/db/migration/V1_9__legg_til_tabell_aktive_dialogmoter.sql b/src/main/resources/db/migration/V1_9__legg_til_tabell_aktive_dialogmoter.sql deleted file mode 100644 index 8bb6e91d..00000000 --- a/src/main/resources/db/migration/V1_9__legg_til_tabell_aktive_dialogmoter.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE DIALOGMOTER -( - uuid VARCHAR(36) NOT NULL, - dialogmote_uuid VARCHAR(36) NOT NULL, - dialogmote_tidspunkt TIMESTAMP NOT NULL, - status_endring_tidspunkt TIMESTAMP NOT NULL, - db_endring_tidspunkt TIMESTAMP NOT NULL, - status_endring_type VARCHAR(36) NOT NULL, - person_ident VARCHAR(11) NOT NULL, - virksomhetsnummer VARCHAR(9) NOT NULL, - CONSTRAINT DIALOGMOTER_PK PRIMARY KEY (uuid), - CONSTRAINT DIALOGMOTE_UUID_UNIQUE UNIQUE (dialogmote_uuid) -); diff --git a/src/main/resources/policy/requestSamlPolicy.xml b/src/main/resources/policy/requestSamlPolicy.xml deleted file mode 100644 index 0ddcb69d..00000000 --- a/src/main/resources/policy/requestSamlPolicy.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0 - - http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0 - http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer - - - - - - - - - diff --git a/src/main/resources/policy/requestSamlPolicyNoTransportBinding.xml b/src/main/resources/policy/requestSamlPolicyNoTransportBinding.xml deleted file mode 100644 index 846767d4..00000000 --- a/src/main/resources/policy/requestSamlPolicyNoTransportBinding.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0 - - http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0 - http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer - - - - - - - - - diff --git a/src/main/resources/policy/untPolicy.xml b/src/main/resources/policy/untPolicy.xml deleted file mode 100644 index 47b025a3..00000000 --- a/src/main/resources/policy/untPolicy.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/kotlin/no/nav/syfo/LocalApplicationConfig.kt b/src/test/kotlin/no/nav/syfo/LocalApplicationConfig.kt index 27480668..0554b5d1 100644 --- a/src/test/kotlin/no/nav/syfo/LocalApplicationConfig.kt +++ b/src/test/kotlin/no/nav/syfo/LocalApplicationConfig.kt @@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.SerializationFeature import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule +import com.opentable.db.postgres.embedded.EmbeddedPostgres import no.nav.security.token.support.test.spring.TokenGeneratorConfiguration import no.nav.syfo.config.kafka.FunctionSerializer import org.apache.kafka.common.serialization.StringSerializer @@ -14,10 +15,19 @@ import org.springframework.context.annotation.Import import org.springframework.kafka.core.DefaultKafkaProducerFactory import org.springframework.kafka.core.KafkaTemplate import org.springframework.kafka.core.ProducerFactory +import javax.sql.DataSource @Configuration @Import(TokenGeneratorConfiguration::class) class LocalApplicationConfig { + + private var embeddedPostgres: EmbeddedPostgres = EmbeddedPostgres.builder().start() + + @Bean + fun embeddedPostgres(): DataSource { + return embeddedPostgres.postgresDatabase + } + @Bean fun kafkaTemplate(producerFactory: ProducerFactory): KafkaTemplate { return KafkaTemplate(producerFactory) diff --git a/src/test/kotlin/no/nav/syfo/config/ApplicationConfigTest.kt b/src/test/kotlin/no/nav/syfo/config/ApplicationConfigTest.kt index cb4962d1..3b15bf77 100644 --- a/src/test/kotlin/no/nav/syfo/config/ApplicationConfigTest.kt +++ b/src/test/kotlin/no/nav/syfo/config/ApplicationConfigTest.kt @@ -3,6 +3,7 @@ package no.nav.syfo.config import no.nav.syfo.LocalApplication import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.annotation.DirtiesContext import org.springframework.test.context.junit.jupiter.SpringExtension diff --git a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidsgiverV2Test.kt b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidsgiverV2Test.kt index 856f7dce..b2c97153 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidsgiverV2Test.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidsgiverV2Test.kt @@ -8,7 +8,6 @@ import no.nav.syfo.LocalApplication import no.nav.syfo.consumer.azuread.v2.AzureAdV2TokenConsumer import no.nav.syfo.consumer.brukertilgang.BrukertilgangConsumer import no.nav.syfo.consumer.pdl.PdlConsumer -import no.nav.syfo.consumer.sts.StsConsumer import no.nav.syfo.dialogmotekandidat.database.DialogmotekandidatDAO import no.nav.syfo.dialogmotekandidat.database.DialogmotekandidatEndringArsak import no.nav.syfo.motebehov.MotebehovSvar @@ -65,7 +64,7 @@ class MotebehovArbeidsgiverV2Test { @Value("\${syfobehandlendeenhet.url}") private lateinit var behandlendeenhetUrl: String - @Value("\${tilgangskontrollapi.url}") + @Value("\${istilgangskontroll.url}") private lateinit var tilgangskontrollUrl: String @Autowired @@ -103,9 +102,6 @@ class MotebehovArbeidsgiverV2Test { @MockkBean private lateinit var brukertilgangConsumer: BrukertilgangConsumer - @MockkBean - private lateinit var stsConsumer: StsConsumer - @MockkBean(relaxed = true) private lateinit var oversikthendelseProducer: OversikthendelseProducer @@ -113,8 +109,6 @@ class MotebehovArbeidsgiverV2Test { private val motebehovGenerator = MotebehovGenerator() - private val stsToken = generateStsToken().access_token - @BeforeEach fun setUp() { every { brukertilgangConsumer.hasAccessToAnsatt(ARBEIDSTAKER_FNR) } returns true @@ -123,7 +117,6 @@ class MotebehovArbeidsgiverV2Test { every { pdlConsumer.aktorid(LEDER_FNR) } returns LEDER_AKTORID every { pdlConsumer.isKode6(ARBEIDSTAKER_FNR) } returns false - every { stsConsumer.token() } returns stsToken mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build() mockRestServiceWithProxyServer = MockRestServiceServer.bindTo(restTemplateWithProxy).build() diff --git a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidstakerV2Test.kt b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidstakerV2Test.kt index 1a289252..b47cf7fe 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidstakerV2Test.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovArbeidstakerV2Test.kt @@ -7,7 +7,6 @@ import no.nav.security.token.support.core.context.TokenValidationContextHolder import no.nav.syfo.LocalApplication import no.nav.syfo.consumer.azuread.v2.AzureAdV2TokenConsumer import no.nav.syfo.consumer.pdl.PdlConsumer -import no.nav.syfo.consumer.sts.StsConsumer import no.nav.syfo.dialogmotekandidat.database.DialogmotekandidatDAO import no.nav.syfo.dialogmotekandidat.database.DialogmotekandidatEndringArsak import no.nav.syfo.motebehov.MotebehovSvar @@ -31,7 +30,6 @@ import no.nav.syfo.testhelper.assertion.assertMotebehovStatus import no.nav.syfo.testhelper.generator.MotebehovGenerator import no.nav.syfo.testhelper.generator.generateOppfolgingstilfellePerson import no.nav.syfo.testhelper.generator.generatePdlHentPerson -import no.nav.syfo.testhelper.generator.generateStsToken import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.* @@ -63,7 +61,7 @@ class MotebehovArbeidstakerV2Test { @Value("\${syfobehandlendeenhet.url}") private lateinit var behandlendeenhetUrl: String - @Value("\${tilgangskontrollapi.url}") + @Value("\${istilgangskontroll.url}") private lateinit var tilgangskontrollUrl: String @Inject @@ -98,9 +96,6 @@ class MotebehovArbeidstakerV2Test { @MockkBean private lateinit var pdlConsumer: PdlConsumer - @MockkBean - private lateinit var stsConsumer: StsConsumer - @MockkBean(relaxed = true) private lateinit var oversikthendelseProducer: OversikthendelseProducer @@ -108,14 +103,11 @@ class MotebehovArbeidstakerV2Test { private val motebehovGenerator = MotebehovGenerator() - private val stsToken = generateStsToken().access_token - @BeforeEach fun setUp() { every { pdlConsumer.person(ARBEIDSTAKER_FNR) } returns generatePdlHentPerson(null, null) every { pdlConsumer.aktorid(any()) } returns ARBEIDSTAKER_AKTORID every { pdlConsumer.fnr(any()) } returns ARBEIDSTAKER_FNR - every { stsConsumer.token() } returns stsToken every { pdlConsumer.isKode6(ARBEIDSTAKER_FNR) } returns false mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build() diff --git a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovComponentTest.kt b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovComponentTest.kt index 0df0783b..f13530dd 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovComponentTest.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/api/MotebehovComponentTest.kt @@ -8,7 +8,6 @@ import no.nav.syfo.LocalApplication import no.nav.syfo.consumer.azuread.v2.AzureAdV2TokenConsumer import no.nav.syfo.consumer.brukertilgang.BrukertilgangConsumer import no.nav.syfo.consumer.pdl.PdlConsumer -import no.nav.syfo.consumer.sts.StsConsumer import no.nav.syfo.motebehov.database.MotebehovDAO import no.nav.syfo.oversikthendelse.OversikthendelseProducer import no.nav.syfo.testhelper.OidcTestHelper.loggInnBruker @@ -21,7 +20,6 @@ import no.nav.syfo.testhelper.UserConstants.VIRKSOMHETSNUMMER import no.nav.syfo.testhelper.clearCache import no.nav.syfo.testhelper.generator.MotebehovGenerator import no.nav.syfo.testhelper.generator.generatePdlHentPerson -import no.nav.syfo.testhelper.generator.generateStsToken import no.nav.syfo.testhelper.mockAndExpectBehandlendeEnhetRequest import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.AfterEach @@ -73,9 +71,6 @@ class MotebehovComponentTest { @MockkBean private lateinit var brukertilgangConsumer: BrukertilgangConsumer - @MockkBean - private lateinit var stsConsumer: StsConsumer - @Inject @Qualifier("restTemplateWithProxy") private lateinit var restTemplateWithProxy: RestTemplate @@ -85,8 +80,6 @@ class MotebehovComponentTest { private val motebehovGenerator = MotebehovGenerator() - private val stsToken = generateStsToken().access_token - @BeforeEach fun setUp() { every { brukertilgangConsumer.hasAccessToAnsatt(ARBEIDSTAKER_FNR) } returns true @@ -96,7 +89,6 @@ class MotebehovComponentTest { every { pdlConsumer.aktorid(LEDER_FNR) } returns LEDER_AKTORID every { pdlConsumer.fnr(LEDER_AKTORID) } returns LEDER_FNR every { pdlConsumer.isKode6(ARBEIDSTAKER_FNR) } returns false - every { stsConsumer.token() } returns stsToken mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build() mockRestServiceWithProxyServer = MockRestServiceServer.bindTo(restTemplateWithProxy).build() diff --git a/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADControllerV2Test.kt b/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADControllerV2Test.kt index 1e666930..0283cdc6 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADControllerV2Test.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADControllerV2Test.kt @@ -9,7 +9,6 @@ import no.nav.syfo.LocalApplication import no.nav.syfo.consumer.azuread.v2.AzureAdV2TokenConsumer import no.nav.syfo.consumer.brukertilgang.BrukertilgangConsumer import no.nav.syfo.consumer.pdl.PdlConsumer -import no.nav.syfo.consumer.sts.StsConsumer import no.nav.syfo.motebehov.MotebehovSvar import no.nav.syfo.motebehov.NyttMotebehov import no.nav.syfo.motebehov.api.MotebehovBrukerController @@ -28,7 +27,6 @@ import no.nav.syfo.testhelper.UserConstants.VEILEDER_ID import no.nav.syfo.testhelper.UserConstants.VIRKSOMHETSNUMMER import no.nav.syfo.testhelper.clearCache import no.nav.syfo.testhelper.generator.generatePdlHentPerson -import no.nav.syfo.testhelper.generator.generateStsToken import no.nav.syfo.testhelper.mockAndExpectBehandlendeEnhetRequest import no.nav.syfo.testhelper.mockSvarFraSyfoTilgangskontrollV2TilgangTilBruker import org.assertj.core.api.Assertions.assertThat @@ -63,7 +61,7 @@ class MotebehovVeilederADControllerV2Test { @Value("\${azure.openid.config.token.endpoint}") private lateinit var azureTokenEndpoint: String - @Value("\${tilgangskontrollapi.url}") + @Value("\${istilgangskontroll.url}") private lateinit var tilgangskontrollUrl: String @Value("\${syfobehandlendeenhet.url}") @@ -93,9 +91,6 @@ class MotebehovVeilederADControllerV2Test { @MockkBean(relaxed = true) private lateinit var pdlConsumer: PdlConsumer - @MockkBean - private lateinit var stsConsumer: StsConsumer - @MockkBean private lateinit var kafkaTemplate: KafkaTemplate @@ -106,8 +101,6 @@ class MotebehovVeilederADControllerV2Test { private lateinit var restTemplateWithProxy: RestTemplate private lateinit var mockRestServiceWithProxyServer: MockRestServiceServer - private val stsToken = generateStsToken().access_token - @BeforeEach fun setUp() { cleanDB() @@ -124,7 +117,6 @@ class MotebehovVeilederADControllerV2Test { every { pdlConsumer.fnr(LEDER_AKTORID) } returns LEDER_FNR every { pdlConsumer.person(ARBEIDSTAKER_FNR) } returns generatePdlHentPerson(null, null) every { pdlConsumer.person(LEDER_FNR) } returns generatePdlHentPerson(null, null) - every { stsConsumer.token() } returns stsToken } @AfterEach diff --git a/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADTilgangV2Test.kt b/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADTilgangV2Test.kt index 26ff98c2..c0c99f46 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADTilgangV2Test.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/api/internad/v2/MotebehovVeilederADTilgangV2Test.kt @@ -29,7 +29,7 @@ class MotebehovVeilederADTilgangV2Test { @Value("\${azure.openid.config.token.endpoint}") private lateinit var azureTokenEndpoint: String - @Value("\${tilgangskontrollapi.url}") + @Value("\${istilgangskontroll.url}") private lateinit var tilgangskontrollUrl: String @Inject diff --git a/src/test/kotlin/no/nav/syfo/motebehov/database/MotebehovDAOTest.kt b/src/test/kotlin/no/nav/syfo/motebehov/database/MotebehovDAOTest.kt index 212211d5..f6767fac 100644 --- a/src/test/kotlin/no/nav/syfo/motebehov/database/MotebehovDAOTest.kt +++ b/src/test/kotlin/no/nav/syfo/motebehov/database/MotebehovDAOTest.kt @@ -36,7 +36,7 @@ class MotebehovDAOTest { private fun insertPMotebehov(motebehov: PMotebehov) { val sqlInsert = - "INSERT INTO MOTEBEHOV VALUES('bae778f2-a085-11e8-98d0-529269fb1459', '" + motebehov.opprettetDato + "', '" + motebehov.opprettetAv + "', '" + motebehov.aktoerId + "', '" + motebehov.virksomhetsnummer + "', '" + '1' + "', '" + motebehov.forklaring + "', '" + motebehov.tildeltEnhet + "', null, null, null, null, null)" + "INSERT INTO MOTEBEHOV VALUES(DEFAULT, 'bae778f2-a085-11e8-98d0-529269fb1459', '" + motebehov.opprettetDato + "', '" + motebehov.opprettetAv + "', '" + motebehov.aktoerId + "', '" + motebehov.virksomhetsnummer + "', '" + "true" + "', '" + motebehov.forklaring + "', '" + motebehov.tildeltEnhet + "', null, null, null, null, null)" jdbcTemplate.update(sqlInsert) } diff --git a/src/test/kotlin/no/nav/syfo/testhelper/generator/StsTokenGenerator.kt b/src/test/kotlin/no/nav/syfo/testhelper/generator/StsTokenGenerator.kt deleted file mode 100644 index ec8c1b7a..00000000 --- a/src/test/kotlin/no/nav/syfo/testhelper/generator/StsTokenGenerator.kt +++ /dev/null @@ -1,14 +0,0 @@ -package no.nav.syfo.testhelper.generator - -import no.nav.syfo.consumer.sts.STSToken -import no.nav.syfo.testhelper.UserConstants - -val stsToken = STSToken( - access_token = UserConstants.STS_TOKEN, - token_type = "Bearer", - expires_in = 3600 -) - -fun generateStsToken(): STSToken { - return stsToken.copy() -} diff --git a/src/test/kotlin/no/nav/syfo/varsel/VarselLederComponentTest.kt b/src/test/kotlin/no/nav/syfo/varsel/VarselLederComponentTest.kt index ed94ee88..d6d65b90 100644 --- a/src/test/kotlin/no/nav/syfo/varsel/VarselLederComponentTest.kt +++ b/src/test/kotlin/no/nav/syfo/varsel/VarselLederComponentTest.kt @@ -5,7 +5,6 @@ import io.mockk.every import io.mockk.verify import no.nav.syfo.LocalApplication import no.nav.syfo.consumer.pdl.PdlConsumer -import no.nav.syfo.consumer.sts.StsConsumer import no.nav.syfo.motebehov.MotebehovService import no.nav.syfo.motebehov.api.dbCreateOppfolgingstilfelle import no.nav.syfo.motebehov.motebehovstatus.MotebehovSkjemaType @@ -68,9 +67,6 @@ class VarselLederComponentTest { @MockkBean private lateinit var kafkaTemplate: KafkaTemplate - @MockkBean - private lateinit var stsConsumer: StsConsumer - private lateinit var mockRestServiceServer: MockRestServiceServer private val motebehovGenerator = MotebehovGenerator() @@ -82,14 +78,12 @@ class VarselLederComponentTest { arbeidstakerFnr = ARBEIDSTAKER_FNR ) - private val stsToken = generateStsToken().access_token @BeforeEach fun setUp() { cleanDB() mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build() every { pdlConsumer.fnr(ARBEIDSTAKER_AKTORID) } returns ARBEIDSTAKER_FNR - every { stsConsumer.token() } returns stsToken mockEsyfovarselHendelseFuture() } diff --git a/src/test/resources/application.yaml b/src/test/resources/application.yaml index 41efd4e0..4085aa25 100644 --- a/src/test/resources/application.yaml +++ b/src/test/resources/application.yaml @@ -7,17 +7,13 @@ spring: max-poll-records: 1 auto-offset-reset: earliest enable-auto-commit: false - h2.console: + flyway: enabled: true - path: '/h2' datasource: - url: 'jdbc:h2:mem:testdb' - driver-class-name: 'org.h2.Driver' - username: 'sa' - password: - jta.atomikos.datasource: - max-pool-size: 32 - min-pool-size: 8 + url: jdbc:postgresql://localhost:5432/syfomotebehov?user=postgres&password=postgres + hikari: + minimum-idle: 2 + maximum-pool-size: 8 cache: type: none server: @@ -37,7 +33,6 @@ azure: aktorregister.rest.url: "aktorregister.url" pdl.url: "https://pdl" -securitytokenservice.url: "sts.url" srvsyfomotebehov: username: "kek" @@ -46,9 +41,6 @@ srvsyfomotebehov: srv.username: "kek" srv.password: "bur" -toggle.enable: - nullstill: true - no.nav.security: jwt: issuer: @@ -56,17 +48,10 @@ no.nav.security: discoveryurl: http://selvbetjening-metadata accepted_audience: aud-localhost cookie_name: localhost-idtoken - intern: - discoveryurl: http://intern-metadata - accepted_audience: aud-localhost - cookiename: localhost-idtoken internazureadv2: discoveryurl: http://internazureadv2-metadata accepted_audience: azure.app.client.id cookiename: localhost-idtoken - sts: - discoveryurl: http://sts-metadata - accepted_audience: clientID tokenx: discoveryurl: http://tokenx-metadata accepted_audience: clientID @@ -80,11 +65,15 @@ nais.cluster.name: 'local' dev: true -syfobehandlendeenhet.client.id: "dev-fss:teamsykefravr:syfobehandlendeenhet" -syfobehandlendeenhet.url: "https://syfobehandlendeenhet" -syfotilgangskontroll.client.id: "syfotilgangskontrollId" -tilgangskontrollapi.url: "https://www.ikke.no" -security.token.service.rest.url: "https://security-token-service" +toggle.kandidatlista: true +dialogmote.frontend.client.id: "dialogmote-frontend" +ditt.sykefravaer.frontend.client.id: "ditt-sykefravaer-frontend" +esyfovarsel.client.id: "dev-gcp:team-esyfo:esyfovarsel" +esyfovarsel.url: "http://esyfovarsel" +syfobehandlendeenhet.client.id: "dev-gcp:teamsykefravr:syfobehandlendeenhet" +syfobehandlendeenhet.url: "http://syfobehandlendeenhet.teamsykefravr" +istilgangskontroll.client.id: "dev-gcp.teamsykefravr.istilgangskontrollId" +istilgangskontroll.url: "http://istilgangskontroll" kafka.brokers: localhost://9092 kafka.truststore.path: /truststore kafka.keystore.path: /keystore @@ -93,16 +82,11 @@ kafka.env.name: "local" kafka.schema.registry.user: "kafka.schema.registry.user" kafka.schema.registry.password: "kafka.schema.registry.password" kafka.schema.registry: "kafka.schema.registry" -esyfovarselapi.url: "https://esyfovarselapiurl" app.name: "syfomotebehov" dialogmote.client.id: "dialogmote" -dialogmotearbeidsgiver.client.id: "dialogmotearbeidsgiver" -dialogmote.frontend.client.id: "dialogmote-frontend" -ditt.sykefravaer.frontend.client.id: "ditt-sykefravaer-frontend" tokenx.idp: "idporten" token.x.well.known.url: "https://token-x-well-known-url" token.x.client.id: "tokenx-client-id" token.x.private.jwk: "tokenx-jwk" -toggle.kandidatlista: true isnarmesteleder.url: "something" isnarmesteleder.client.id: "something" diff --git a/src/test/resources/db/migration/V99_2__testdata.sql b/src/test/resources/db/migration/V99_2__testdata.sql deleted file mode 100644 index 937896d2..00000000 --- a/src/test/resources/db/migration/V99_2__testdata.sql +++ /dev/null @@ -1 +0,0 @@ ---INSERT INTO CAR VALUES ('id', 'blue', 'SUZUKI', DATE '2018-02-22'); \ No newline at end of file