Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup/fjerner_app-1_vault #3464

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"));
Expand Down
Loading