Skip to content

Introduce integration with external Hashicorp Vault KMS#1031

Merged
boddumanohar merged 7 commits into
mainfrom
kms
May 19, 2026
Merged

Introduce integration with external Hashicorp Vault KMS#1031
boddumanohar merged 7 commits into
mainfrom
kms

Conversation

@mxsrc
Copy link
Copy Markdown
Contributor

@mxsrc mxsrc commented May 10, 2026

This introduces an integration to an external KMS (Hashicorp Vault/openbao) for storing decryption keys.
The configuration is cluster-specific, an attribute hashicorpVaultSettings is introduced that at the moment only stores the base_url the KMS is reachable with. The communication is done via TLS, and authentication is done using client certificates. For this reason, mTLS needs to be used when using the external KMS.

On the vault, a cert logins need to be enabled, a policy for the API container placed, and linked to the certificates the API presents.

To keep the implementation clean, the access to keys is managed through a common interface, that, depending on the presence of the KMS configuration either stores the secrets in the FDB, as is the status-quo, or offloads them to the KMS.

Comment thread simplyblock_cli/cli.py Dismissed
Comment thread simplyblock_cli/cli.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
Comment thread simplyblock_core/kms/_base.py Dismissed
@mxsrc mxsrc force-pushed the kms branch 13 times, most recently from b0c1bc8 to e9906cc Compare May 12, 2026 23:36
…olume

Two bugs in the local KMS path:
  1. lvol_controller called kms.create_data_encryption_keys() before
     lvol.write_to_db(), so LocalKMS could not find the LVol in FDB.
     Fixed by moving the KMS call to after write_to_db(), with cleanup
     (lvol.remove()) on failure.
  2. LocalKMS.import_data_encryption_keys() set crypto_key1/key2 on the
     in-memory LVol object but never persisted them. Fixed by calling
     write_to_db() after updating the keys.
the policy fix: the webappapi-policy was missing
transit/encrypt/*, which is needed by import_data_encryption_keys
it is used when cloning a volume (copying source keys to the clone's
KV entry) and when a user provides explicit keys at volume creation.
@boddumanohar boddumanohar merged commit 926ea6a into main May 19, 2026
7 of 9 checks passed
@boddumanohar boddumanohar deleted the kms branch May 19, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants