CephXXXIII · EncryptionEncryption
Protecting monitor state at rest
What you'll learn
- Enumerate the sensitive contents of the monitor store
- Apply host-level encryption to monitor data directories
- Protect monitor store backups appropriately
- Assess the consequences of monitor store compromise
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
The monitor store is the most security-sensitive data in a Ceph cluster, and it is routinely left unprotected on hosts that receive less hardening than the OSD nodes. It holds every cephx key and, on encrypted clusters, the dm-crypt passphrases for every OSD.
What is in it
/var/lib/ceph/mon/ceph-<id>/store.db — a RocksDB database containing:
| Contents | Sensitivity |
|---|---|
| cephx auth database — every entity’s secret key | critical |
| config-key store — including dm-crypt keys on encrypted clusters | critical |
| OSD map history | topology disclosure |
| monmap | topology disclosure |
| Cluster configuration | moderate |
| Dashboard credentials | high |
Anyone with a copy of the monitor store has every key in the cluster and
can authenticate as any entity, including client.admin.
Protecting it at rest
Ceph does not encrypt the monitor store itself. The supported approach is host-level encryption of the filesystem holding it:
# encrypt the volume that holds /var/lib/ceph before deploying monitors
cryptsetup luksFormat /dev/sdb1
cryptsetup luksOpen /dev/sdb1 mon-data
mkfs.xfs /dev/mapper/mon-data
mount /dev/mapper/mon-data /var/lib/ceph
The same caveat applies as for OSDs: this protects a device that leaves your control and nothing about a running host. Its main value is decommissioning and RMA handling for monitor hardware.
Combine it with the ordinary host controls that matter more here than anywhere else in the cluster:
ls -ld /var/lib/ceph/mon/ceph-$(hostname -s)
# should be 0750, owned ceph:ceph
- Restrict who can log in to monitor hosts
- Keep
client.adminkeyrings off general-purpose machines - Apply the same patching discipline you apply to any credential store
Backups are the exposure
A monitor store backup is a complete copy of every key in the cluster:
# with the monitor stopped
tar czf mon-backup.tar.gz /var/lib/ceph/mon/ceph-$(hostname -s)
# config-key contents, which include dm-crypt keys
ceph config-key dump > config-key-dump.json
Both files are as sensitive as the cluster’s entire dataset. They must be encrypted at rest wherever they are stored, access-controlled to the smallest possible group, and — critically — kept outside the cluster they protect. A monitor backup on the cluster’s own CephFS is unavailable in precisely the disaster it exists for.
If the monitor store is compromised
Assume every key in the cluster is compromised:
- Rotate every cephx entity, using the parallel-entity procedure
- Rotate dashboard credentials
- On encrypted clusters, treat the dm-crypt keys as exposed — which means any drive that has left the facility is now readable
- Review the monitor audit log for actions taken with stolen credentials
Quiz
Knowledge check · 4 questions
Q1. What is the most security-critical content of the monitor store?
Q2. Ceph encrypts the monitor store contents by default, so host-level encryption is unnecessary.
Q3. Assess and improve monitor host security.
Monitor daemons run on three general-purpose management servers that several teams can log into, alongside other services. Monitor store backups go to a network share. The cluster uses encrypted OSDs.
Q4. Why can Ceph not simply encrypt its own auth database?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Treat monitor hosts as credential stores in your hardening standards, with the access restrictions that implies. Store monitor store and config-key backups encrypted, outside the cluster, with access limited to the smallest group that can perform a restore — and test that restore, because on an encrypted cluster it is the difference between an outage and total loss.
Cross-course references
- Kubernetes: etcd holds every Secret and warrants exactly this treatment
- Linux: a Kerberos KDC database or a password store carries the same concentration of trust