CephCI · Security HardeningSecurity Hardening
Verifying encryption is actually in effect
What you'll learn
- Distinguish configured from negotiated
- Verify the mode in effect for each path
- Identify paths that fell back
- Remove the msgr1 fallback
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
A cluster can be configured for secure mode and still be carrying unencrypted traffic, because negotiation falls back rather than failing.
Configured versus negotiated
ceph config get global ms_cluster_mode
ceph config get global ms_service_mode
ceph config get global ms_client_mode
ceph config get global ms_mon_cluster_mode
ceph config get global ms_mon_service_mode
ceph config get global ms_mon_client_mode
These express a preference list, commonly "secure crc". A peer that
cannot do secure negotiates crc, and the connection succeeds.
| Setting value | Behaviour |
|---|---|
secure crc | prefer secure, accept crc |
secure | secure only; a peer that cannot do it fails to connect |
crc secure | prefer crc |
crc | no encryption |
# the strict form, once every peer is known to support it
ceph config set global ms_cluster_mode secure
ceph config set global ms_service_mode secure
ceph config set global ms_client_mode secure
Setting the strict form is what turns a preference into a guarantee, and
it is also what will disconnect a client that cannot comply.
Verifying per path
# monitors: are they advertising v2 at all?
ceph mon dump | grep -E 'v2:|v1:'
0: [v2:10.20.0.11:3300/0,v1:10.20.0.11:6789/0] mon.mon-01
A v1 address in the monmap means msgr1 is still available, and any
client preferring it will use it — unencrypted, regardless of the mode
settings.
# what an OSD actually bound
ceph osd metadata 0 --format json | python3 -c '
import sys,json
d = json.load(sys.stdin)
for k in ("front_addr", "back_addr", "hb_front_addr", "hb_back_addr"):
print("%-14s %s" % (k, d.get(k)))'
# and whether msgr1 ports are still listening
ss -ltn | awk '$4 ~ /:6789$/ {print "msgr1 listening: " $4}'
Removing the msgr1 fallback
ceph config get global ms_bind_msgr1
ceph config set global ms_bind_msgr1 false
This is the change that makes encryption verifiable: with msgr1 gone,
the only path is msgr2, and the mode setting governs it.
# but confirm no client needs msgr1 first
ceph features
| Client release | msgr2 |
|---|---|
| Nautilus and later | supported |
| Older | msgr1 only |
# after the change, verify
ceph mon dump | grep -c 'v1:'
ceph -s
A restart of the monitors is required for the monmap to drop the v1
addresses, and cephadm handles that as a normal daemon redeploy.
Quiz
Knowledge check · 4 questions
Q1. Why can a cluster configured for secure mode still carry unencrypted traffic?
Q2. A client can connect to a cluster set to `ms_client_mode secure` and still send its traffic in the clear.
Q3. Make encryption verifiable on a cluster.
A cluster is configured with `ms_cluster_mode = secure crc` and the team wants to state that traffic is encrypted.
Q4. What makes the difference between "configured for secure" and "running secure"?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Set ms_bind_msgr1 false and confirm the monmap carries only v2:
addresses before claiming encryption — msgr1 has no secure mode, so a
v1 address means unencrypted connections remain possible whatever the
ms_*_mode settings say. Check ceph features before the strict form.
Cross-course references
- Kubernetes: TLS configured with fallback is not TLS enforced
- Linux: protocol negotiation that falls back makes configuration and effect different statements