I am looking for opinions on the advantages/disadvantages of accessing vault through different means.
I have my secrets stored in vault and I have considered two ways to access them.
Setting an environment variable on the machine where my application is running and passing the environment variable as a parameter for the application to query the secret from the vault.
Using a a Spring Dependency to connect and retrieve to the vault where the token and url would be passed as VM arguments to the Java application.
In terms of scalability and security which approach would you prefer?