diff --git a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java index d5795d77967..7f2ce2bae18 100644 --- a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java +++ b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java @@ -2,6 +2,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; +import org.springframework.lang.NonNull; import org.springframework.vault.annotation.VaultPropertySource; import org.springframework.vault.authentication.ClientAuthentication; import org.springframework.vault.authentication.TokenAuthentication; @@ -13,17 +14,18 @@ @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -@VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { - private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override + @NonNull public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); } @Override + @NonNull public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java index db8513cfdb5..9d48992a2e6 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java @@ -2,6 +2,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; +import org.springframework.lang.NonNull; import org.springframework.vault.annotation.VaultPropertySource; import org.springframework.vault.authentication.ClientAuthentication; import org.springframework.vault.authentication.TokenAuthentication; @@ -12,18 +13,19 @@ @Configuration @Profile("local") -@VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override + @NonNull public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); } @Override + @NonNull public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); diff --git a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java index 69c2518b831..cffa79859bc 100644 --- a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java +++ b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java @@ -2,6 +2,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; +import org.springframework.lang.NonNull; import org.springframework.vault.annotation.VaultPropertySource; import org.springframework.vault.authentication.ClientAuthentication; import org.springframework.vault.authentication.TokenAuthentication; @@ -13,17 +14,18 @@ @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -@VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override + @NonNull public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); } @Override + @NonNull public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); diff --git a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java index 0a1c47022a5..02e7974a2d0 100644 --- a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java +++ b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java @@ -2,6 +2,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; +import org.springframework.lang.NonNull; import org.springframework.vault.annotation.VaultPropertySource; import org.springframework.vault.authentication.ClientAuthentication; import org.springframework.vault.authentication.TokenAuthentication; @@ -13,17 +14,18 @@ @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -@VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override + @NonNull public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); } @Override + @NonNull public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN"));