-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Vault will not automatically unseal even if using an autoseal #6810
Comments
Hi @Raghavendarlokineni ! Thanks for posting this issue! I tested this extensively on Vault 1.1.0 and I was able to successfully unseal using AWSKMS after having first unsealed it using Shamir. I think we need to figure out what's different about how we're doing it. I posted extensive instructions on the vault-tool forum here. Mainly the process was, first start Vault with the first config and unseal it to get the Shamir keys. Then stop Vault and restart it with the second config and Another thing to check through would be if the AWS key and secret you're using locally have proper access to the key ID shown and it's in the proper region. |
Thanks, @tyrannosaurus-becks for sharing the info. We tried the procedure that you have shared above. But was wondering what is the use case of integrating vault solution with AWS KMS for auto unseal as for the first time we need to unseal it manually. Instead, we have developed automation scripts which check for initialization, if not initialize and unseal it. Run this script as cron to check if Vault seals, if so this will auto-unseal with scripts developed. |
Got the same issue as OP. Can you even use auto-unseal if you haven't unsealed manually the first time? |
@djordje-petrovic it's an intended behavior that you'd need to unseal Vault manually the first time because the Shamir algorithm is used to generate the Vault master key that's used for all encryption. |
@djordje-petrovic actually, I stand corrected! A colleague checked in with me and let me know you should be able to do that. |
@tyrannosaurus-becks Thanks for clearing that up. So any idea what could be causing this? My vault status output is the same as OP's with:
|
It always defaults back to shamir. I've seen it say AWS only when first initialized with it. It's just a label, you can always check the config to see what is being actually used. |
Yeah, you are right. Anyway my issue was caused by a human error. I was trying to unknowingly join the new nodes to the existing cluster which has a manual seal. After deploying a new consul cluster with a different join tag everything was up and running. |
We were also hit by this when following the steps outlined on https://www.vaultproject.io/docs/concepts/seal.html#seal-migration when migrating our seal to The way we solved it was to run |
@albertoal Until the migration is finalized the new data isn't persisted, and until that happens other nodes in the cluster can't read it. We don't have a way to invalidate other cluster members at the moment because the seal is pretty fundamental to getting a node into a running state. So this is expected. Closing as OP is gone and the other questions have been solved. |
Describe Bug
core: entering seal migration mode; Vault will not automatically unseal even if using an autoseal: from_barrier_type=shamir to_barrier_type=awskms
To Reproduce
Steps to reproduce the behavior:
vault server -config=/etc/service/vault-server/config.hcl
Expected behavior
Vault should get unsealed when integrated with AWS-KMS.
Environment:
vault status
):vault version
):Vault server configuration file(s):
The text was updated successfully, but these errors were encountered: