From fbb1e64b026b884dda55e3bbc89744db7207fc48 Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Wed, 20 Nov 2024 15:39:49 +0100 Subject: [PATCH] - Removed use of Vault kv/preprod/fss/oppsummeringsdokument-service/dev since it is apparently no longer in use. --- apps/oppsummeringsdokument-service/README.md | 21 ++++++++++--------- .../build.gradle | 1 - .../settings.gradle | 1 - .../config/LocalVaultConfig.java | 12 ----------- .../src/main/resources/application.yml | 3 --- .../resources/application-test.properties | 5 ----- 6 files changed, 11 insertions(+), 32 deletions(-) delete mode 100644 apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/LocalVaultConfig.java delete mode 100644 apps/oppsummeringsdokument-service/src/test/resources/application-test.properties diff --git a/apps/oppsummeringsdokument-service/README.md b/apps/oppsummeringsdokument-service/README.md index 83d2d498325..28afbdf4187 100644 --- a/apps/oppsummeringsdokument-service/README.md +++ b/apps/oppsummeringsdokument-service/README.md @@ -11,26 +11,27 @@ API for å sende inn oppsummeringsdokumenter til AAreg, og søke i de innsendte Applikasjonen kan nås fra [/swagger](https://testnav-oppsummeringsdokument-service.intern.dev.nav.no/swagger) -endepunktet. -## Lokal utvikling +## Lokal kjøring +* [Generelt.](../../docs/local_general.md) + +For å kjøre lokalt med OpenSearch: ``` --Dspring.cloud.vault.token={VAULT_TOKEN} -Dspring.profiles.active=dev +> docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" --name opensearch-node -d opensearchproject/opensearch:latest ``` -For å kjøre lokalt med opensearch: - -docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" --name opensearch-node -d opensearchproject/opensearch:latest - -lister alle indekser: +Liste over alle indekser: http://localhost:9200/_cat/indices?v -curl kommandoer for å søke lokalt: +`curl` for å søke lokalt: -curl -X GET "localhost:9200/oppsummeringsdokument-8/_search?pretty" -H 'Content-Type: application/json' -d' +``` +> curl -X GET "localhost:9200/oppsummeringsdokument-8/_search?pretty" -H 'Content-Type: application/json' -d' { "query": { "match": {"miljo": "q1"} } } -' \ No newline at end of file +' +``` \ No newline at end of file diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index afe4654c998..53d2b548a79 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -18,7 +18,6 @@ dependencies { implementation "no.nav.testnav.libs:security-core" implementation "no.nav.testnav.libs:servlet-core" implementation "no.nav.testnav.libs:servlet-security" - implementation "no.nav.testnav.libs:vault" implementation "no.nav.testnav.xsd:arbeidsforhold-xsd" implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml" diff --git a/apps/oppsummeringsdokument-service/settings.gradle b/apps/oppsummeringsdokument-service/settings.gradle index f74780146e5..c63fd9917c8 100644 --- a/apps/oppsummeringsdokument-service/settings.gradle +++ b/apps/oppsummeringsdokument-service/settings.gradle @@ -11,7 +11,6 @@ includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' includeBuild '../../xsd/arbeidsforhold-xsd' -includeBuild '../../libs/vault' develocity { buildScan { diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/LocalVaultConfig.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/LocalVaultConfig.java deleted file mode 100644 index 6a0af60770b..00000000000 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/LocalVaultConfig.java +++ /dev/null @@ -1,12 +0,0 @@ -package no.nav.testnav.apps.oppsummeringsdokumentservice.config; - -import no.nav.testnav.libs.vault.AbstractLocalVaultConfiguration; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.vault.annotation.VaultPropertySource; - -@Configuration -@Profile("dev") -@VaultPropertySource(value = "kv/preprod/fss/oppsummeringsdokument-service/dev", ignoreSecretNotFound = false) -public class LocalVaultConfig extends AbstractLocalVaultConfiguration { -} \ No newline at end of file diff --git a/apps/oppsummeringsdokument-service/src/main/resources/application.yml b/apps/oppsummeringsdokument-service/src/main/resources/application.yml index 2925c0e6cac..a3800a156d5 100644 --- a/apps/oppsummeringsdokument-service/src/main/resources/application.yml +++ b/apps/oppsummeringsdokument-service/src/main/resources/application.yml @@ -12,9 +12,6 @@ spring: name: oppsummeringsdokument-service version: application.version.todo #TODO Finn ut hvordan denne kan settes fra gradle description: Tjeneste for å sende inn oppsummeringsdokument til aareg og søke i innsendte oppsummeringsdokumenter. - cloud: - vault: - enabled: false springdoc: swagger-ui: diff --git a/apps/oppsummeringsdokument-service/src/test/resources/application-test.properties b/apps/oppsummeringsdokument-service/src/test/resources/application-test.properties deleted file mode 100644 index 22db53e5b18..00000000000 --- a/apps/oppsummeringsdokument-service/src/test/resources/application-test.properties +++ /dev/null @@ -1,5 +0,0 @@ -TOKEN_X_ISSUER=dummy -OPENSEARCH_USERNAME=username -OPENSEARCH_PASSWORD=password -OPENSEARCH_HOST=localhost -OPENSEARCH_PORT=9200 \ No newline at end of file