vault icon indicating copy to clipboard operation
vault copied to clipboard

Unseal vault container or decrypt stored secret with access to container and initial root token

Open UchihaItachiSama opened this issue 3 years ago • 3 comments
trafficstars

Lost the unseal keys for a test vault container, I am able to exec into the container and have the initial root token. Is there a possibility to re-key or unseal the vault using the root token. Or decrypt the value under /vault/file/logical/xxx/ ?

UchihaItachiSama avatar Nov 10 '22 15:11 UchihaItachiSama

Does this document help? https://developer.hashicorp.com/vault/docs/concepts/seal#rekeying Please let me know if you have more questions!

heatherezell avatar Nov 10 '22 19:11 heatherezell

I looked at rekeying but it requires the vault to be unsealed.

Usage: vault operator rekey [options] [KEY]

  Generates a new set of unseal keys. This can optionally change the total
  number of key shares or the required threshold of those key shares to
  reconstruct the master key. This operation is zero downtime, but it requires
  the Vault is unsealed and a quorum of existing unseal keys are provided.

In my case the vault is sealed, as I lost the unseal keys and only have the initial root token and access to vault container volume, where I can see the encrypted data.

Thus wanted to check if there is a possibility to unseal or decrypt using initial root token or encrypted keys from volume data?

UchihaItachiSama avatar Nov 11 '22 02:11 UchihaItachiSama

If you've lost the unseal keys, and you don't have an active running unsealed Vault process, everything has been lost.

There's nothing to do other than wipe it all and start from scratch.

maxb avatar Nov 16 '22 08:11 maxb

Since it's been a while since we've heard from you on this issue, I'm going to go ahead and close it now. Please feel free to open a new issue if you need. Thanks! :)

heatherezell avatar Jan 24 '23 00:01 heatherezell