bank-vaults / vault-operator

Kubernetes operator for Hashicorp Vault
https://bank-vaults.dev/docs/operator/
Apache License 2.0
63 stars 23 forks source link

vault-configurer options and customization #280

Open johnny990 opened 11 months ago

johnny990 commented 11 months ago

Preflight Checklist

Problem Description

Hello, I've already posted similar questions in old repository, but it seems during migration issues were no moved, so I'd like to add it one more time with more details. We have quite strict security requirement in our deployment topology, so it is required to remove root token from vault deployment and in the same time we'd like to have automated init and configuration management. I understand that there is something like chicken-egg problem (we can't init and configure vault instance without root token), so I'm thinking about following options.

Proposed Solution

  1. Have an option for vault-configurer to be kind of init job. In this case, vault-configurer will init vault, handle root token the same way it does now, but finishes its job after init (further configuration management will not be possible)
  2. Option to disable vault-configurer completely, so vault init and its configuration management will be done manually.
  3. Option to separate vault-configurer from vault pod. In this case it would be great to have an option to deploy vault-configurer on separate k8s cluster (for example, we could create roles, access credentials for vault-configurer to manage vault instance inside separate cluster)
  4. Option to allow vault-operator manage vault instances on external clusters (something like ArgoCD manages applications on multiple clusters)
  5. Option to call vault-configurer on demand (via api?) by providing with root token and asking do its job to configure vault.

Alternatives Considered

Additional Information

There's a little bit confusing statement in documentation: https://bank-vaults.dev/docs/concepts/unseal-keys/: HashiCorp [recommends revoking the root tokens](https://developer.hashicorp.com/vault/docs/concepts/tokens#root-tokens) after the initial set up of Vault has been completed. Note: The vault-root token is not needed to unseal Vault, and can be removed from the storage if it was put there via the --init call to bank-vaults.

If I remove root token, vault-configurer will stop working and will spam logs. So, it would be great to have some option to manage it.

akijakya commented 11 months ago

Hi @johnny990, thanks for your interest in Bank-Vaults and the well-thought propositions! Although the development of the operator is currently on hold until we know more about the implications of Hashicorp's license change, this issue definitely has a place on our roadmap.