Canonical published details on November 23, 2026, outlining how its Charmed MongoDB Operator automates data encryption at rest to secure database storage on disk using a two-level key hierarchy.
Two-Level Key Hierarchy
Canonical stated that its Charmed MongoDB Operator supports data encryption at rest using a local, two-level key hierarchy. For each database instance, a master key is created to encrypt a special key database containing one encryption key per database.
Rotating the master key re-encrypts only the key database without requiring the re-encryption of every individual entry in the dataset.
HashiCorp Vault and Key Management
To store the master key securely, the implementation supports HashiCorp Vault, OpenBao, or KMIP servers. Canonical noted that the Charmed MongoDB Operator uses a Terraform module to deploy the stack with Vault Operator or Vault K8S Operator as a backend.
A Vault Agent is utilized to manage short-lived AppRole tokens and maintain an up-to-date token file for MongoDB to handle unexpected restarts.
What to do
- Deploy Charmed MongoDB with encryption enabled using the command: juju deploy mongodb –channel 8/stable –config enable-encryption-at-rest=true -n 3
- Integrate Vault using the command: juju integrate mongodb:vault-kv vault:vault-kv
- Rotate the encryption master key on a specific unit using: juju run mongodb/<n> rotate-encryption-master-key
Key facts and where they come from
- Charmed MongoDB uses a local two-level key hierarchy consisting of a master key and individual database keys.
Canonical’s Charmed MongoDB Operator supports data encryption at rest of the data using a two-level key hierarchy, and is local to each instance.
- Encryption at rest in Charmed MongoDB must be configured during initial deployment and cannot be changed on an existing deployment at runtime.
In Charmed MongoDB, encryption at rest must be configured during the initial deployment, before the database starts for the first time.
The catch
- The announcement does not provide production-ready open-source KMIP implementations, leading Canonical to rely on HashiCorp Vault and OpenBao instead.
- Master key rotation for a node can only be done offline, requiring operators to perform the process one member at a time in a replica set.
The open question: Can automated Vault Agent token renewal completely eliminate downtime risks during unexpected database restarts?
Tell us what you think · Discuss it in the Threat Intel room
Reader poll: Should database encryption at rest be immutable after initial deployment?
A show of hands from readers, not a scientific poll. Say why in the comments.
