How to Disable Hashicorp Vault in Spring Boot

Viewed 290

I'm currently integrating my Spring Boot Application with Hashicorp Vault. I need to disable vault in one of the remote environments where the application will be deployed to. Currently running Vault Server in dev mode. Although this is possible with Spring Cloud Vault, how would this be done with Spring Boot and Vault?

The library I'm using here is spring-vault-core

Note :- I'm not using Spring Cloud Vault

I haven't come across a direct way with which vault can be disabled. Any help would be appreciated.

VaultConfiguration :-

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.vault.config.EnvironmentVaultConfiguration;

@Configuration
@PropertySource(value = "file:/home/user/application.properties")
@Import(value = EnvironmentVaultConfiguration.class)
public class VaultEnvironmentConfig {}

Application Properties :-

#------------------------------------------------------------------
# Vault
#------------------------------------------------------------------
vault.uri=http://127.0.0.1:8200
vault.token=s.tPbXNRsXJQO5vmmQThcqqHtO

I'm using VaultTemplate to write and read secrets from Vault.

0 Answers
Related