Skip to main content
RunBook Academy

CephXXXI · Ceph Authentication (cephx)Ceph Authentication (cephx)

The cephx authentication protocol

Intermediate⏱ ~17 minceph

What you'll learn

  • Describe the cephx authentication exchange
  • Explain what cephx does and does not protect
  • Verify that cephx is enabled cluster-wide
  • Diagnose common authentication failures

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

Not yet marked complete on this device.

Why this matters in production

cephx is on by default and mostly invisible, which means most operators first encounter it when something breaks. Understanding the exchange makes those failures readable, and understanding its boundaries prevents you from assuming protections it does not provide.

The exchange

sequenceDiagram
    participant C as Client
    participant M as Monitor
    participant O as OSD
    C->>M: I am client.rbd-prod
    M->>M: look up shared secret
    M-->>C: session key, encrypted with the shared secret
    C->>C: decrypt (proves it holds the secret)
    C->>M: request a ticket for OSDs
    M-->>C: ticket, signed and time-limited
    C->>O: request + ticket
    O->>O: verify the ticket signature
    O-->>C: response

The properties that matter:

  • Mutual. The client proves it holds the secret; the monitor proves it too, because only a holder could have encrypted a usable session key.
  • The secret never crosses the wire. Only material encrypted with it.
  • Tickets are time-limited, so a captured ticket has bounded value.
  • Every message is signed, so tampering is detected.

What cephx does not do

This is the part that gets assumed wrongly:

Protectioncephx
Authentication of clients and daemonsyes
Authorisation via capabilitiesyes
Tamper detection on messagesyes
Encryption of data in transitno — that is msgr2 secure mode
Encryption of data at restno — that is dm-crypt or SED
Protection from a stolen keyring fileno

cephx authenticates. It does not, by itself, make the wire confidential. A network observer with cephx alone can read object data in flight. Wire encryption is a separate setting.

Verifying it is on

ceph config get mon auth_cluster_required
ceph config get mon auth_service_required
ceph config get mon auth_client_required
# all three should be: cephx

auth_cluster_required covers daemon-to-daemon, auth_service_required covers daemons serving clients, auth_client_required covers what clients must present. Setting any to none disables authentication for that direction and should never appear in production.

Common failures

ceph auth get client.rbd-prod
ceph -n client.rbd-prod --keyring /etc/ceph/ceph.client.rbd-prod.keyring -s
ErrorCause
EACCES: access deniedkey mismatch or entity does not exist
authentication error (1) Operation not permittedwrong or missing keyring
monclient: authenticate NOTE: no keyring foundkeyring file not at any searched path
Works then fails after some hoursclock skew — tickets are time-based

Quiz

Knowledge check · 4 questions

  1. Q1. Does enabling cephx encrypt Ceph data in transit?

  2. Q2. A client's secret key is transmitted to the monitor during authentication.

  3. Q3. Diagnose authentication that worked yesterday.

    A monitoring client that has worked for months begins failing with authentication errors a few hours after its host was rebooted following a power event. The keyring file is unchanged, the entity exists, and other clients on other hosts work fine.

  4. Q4. Why do monitors issue tickets rather than having OSDs authenticate clients directly?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Verify all three auth_*_required settings are cephx as part of cluster commissioning and after any upgrade, and alert on clock skew as an authentication risk rather than only a monitor concern. Keep the search paths for keyring files consistent across hosts so a missing-keyring error means what it says.

Cross-course references

  • Kubernetes: ServiceAccount tokens are the same ticket pattern with the same expiry considerations
  • Linux: Kerberos ticket-granting is the direct ancestor of this design