I am trying to run vault in on premises k8s. I am deploying using helm chart. I went through this link Autounseal-transit
But it requires another vault. Is there a way to automatically unseal on restart of pods or kubernetes nodes?
Then you’ll need to setup something like another cluster, which then will have to be unsealed as well. Sounds like shamir keys is your best bet unless you run a in-house KMS/HSM.
As far as the post startup hook I can work but it will not be secure.
You could script something that will call vault operator unseal with a single shard (no need for 3 since you’ve already thrown this security feature out the window). But you will end up with the shard(s) in your deployment configuration. You can then use the shard to do vault operator generate-root and do whatever you want with the secrets.
I guess that’s fine for a home lab or even a dev environment, but not much more.
Secure introduction of secrets is hard. Don’t let any vendor (including Hashicorp) convince you otherwise.
The only good solution is to tie yourself to a given platform, let it handle both the authentication and initial secret management. Then run Vault on top of that for the devops friendly API.
Hello @ixe013 ,
Thanks for explanation but it’s not what I asked.
I’ve already feeded my credentials.
Please check that topic: >>> here
I don’t have an installed Vault yet. I would like to install it by using Helm chart to AWS/EKS.
Regarding to the documentation, I should put the following expression to values.yaml file for aws auto-unseal, shouldn’t I?
seal "awskms" {
region = "us-east-1"
access_key = "AKIAIOSFODNN7EXAMPLE"
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
kms_key_id = "???"
endpoint = "?????"
}
The question is that where/how can I get kms_key and endpoint before installing Vault?
You must create the key prior to installing Vault. You could use Terraform or your mouse to create a KMS key that will be used to unseal Vault. Once create, put the key id in your configuration.