Skip to content

Commit

Permalink
Merge branch 'master' into change/clientcredential_factory
Browse files Browse the repository at this point in the history
# Conflicts:
#	libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/domain/AzureNavProxyClientCredential.java
#	libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/domain/AzureTrygdeetatenClientCredential.java
#	libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/domain/azuread/AzureNavClientCredential.java
#	libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/domain/azuread/ClientCredential.java
#	libs/security-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  • Loading branch information
rfc3092 committed Dec 13, 2024
2 parents aa81a41 + ce0806d commit 799d3fb
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
@EnableElasticsearchRepositories("no.nav.dolly.elastic")
public class OpenSearchConfig extends AbstractOpenSearchConfiguration {

@Value("${open.search.username}")
@Value("${OPEN_SEARCH_USERNAME}")
private String username;

@Value("${open.search.password}")
@Value("${OPEN_SEARCH_PASSWORD}")
private String password;

@Value("${open.search.uri}")
@Value("${OPEN_SEARCH_URI}")
private String uri;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@EnableElasticsearchRepositories("no.nav.dolly.elastic")
public class OpenSearchLocalConfig extends AbstractOpenSearchConfiguration {

@Value("${open.search.uri}")
@Value("${OPEN_SEARCH_URI}")
private String uri;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
@Service
public class ElasticParamsConsumer {

private WebClient webClient;
private String username;
private String password;
private String index;
private final WebClient webClient;
private final String username;
private final String password;
private final String index;

public ElasticParamsConsumer(
WebClient.Builder webClientBuilder,
@Value("${open.search.username}") String username,
@Value("${open.search.password}") String password,
@Value("${open.search.uri}") String uri,
@Value("${OPEN_SEARCH_USERNAME:''}") String username,
@Value("${OPEN_SEARCH_PASSWORD:''}") String password,
@Value("${OPEN_SEARCH_URI}") String uri,
@Value("${open.search.index}") String index) {

webClient = webClientBuilder
.baseUrl(uri)
.build();
Expand Down
4 changes: 1 addition & 3 deletions apps/dolly-backend/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}
OPEN_SEARCH_URI: http://localhost:9200

dolly:
client:
Expand Down Expand Up @@ -29,9 +30,6 @@ management:

open:
search:
uri: http://localhost:9200
username: dummy
password: dummy
index: local

consumers:
Expand Down
10 changes: 4 additions & 6 deletions apps/dolly-backend/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
OPEN_SEARCH_URI: dummy
TOKEN_X_ISSUER: dummy

APP_NAME: dolly
APP_VERSION: ${application.version}
environment: localhost
TOKEN_X_ISSUER: dummy

jira:
host: http://localhost:${wiremock.server.port:0}/jira
Expand All @@ -10,11 +11,8 @@ jira:

open:
search:
uri: dummy
username: dummy
password: dummy
total-fields: 150
index: dummy
index: test

consumers:
kodeverk-api:
Expand Down
2 changes: 0 additions & 2 deletions apps/oppsummeringsdokument-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,5 @@ spec:
memory: 1024Mi
limits:
memory: 2048Mi
envFrom:
- secret: teamdolly-opensearch
ingresses:
- "https://testnav-oppsummeringsdokument-service.intern.dev.nav.no"
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package no.nav.testnav.apps.oppsummeringsdokumentservice.config;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.opensearch.client.RestHighLevelClient;
import org.opensearch.data.client.orhlc.AbstractOpenSearchConfiguration;
Expand All @@ -9,7 +8,6 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;

import java.time.Duration;

Expand All @@ -18,7 +16,7 @@
@Profile("dev")
public class OpenSearchLocalConfig extends AbstractOpenSearchConfiguration {

@Value("${open.search.uri}")
@Value("${OPEN_SEARCH_URI}")
private String uri;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
@Configuration
public class OpensearchConfig extends AbstractOpenSearchConfiguration {

@Value("${open.search.username}")
@Value("${OPEN_SEARCH_USERNAME}")
private String username;

@Value("${open.search.password}")
@Value("${OPEN_SEARCH_PASSWORD}")
private String password;

@Value("${open.search.uri}")
@Value("${OPEN_SEARCH_URI}")
private String uri;

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
AZURE_APP_CLIENT_ID: ${sm://azure-app-client-id}
AZURE_APP_CLIENT_SECRET: ${sm://azure-app-client-secret}
OPEN_SEARCH_URI: http://localhost:9200

spring:
config:
import: "sm://"

open:
search:
index: local
uri: http://localhost:9200
index: local

0 comments on commit 799d3fb

Please sign in to comment.