CephCIII · Secrets and Key ManagementSecrets and Key Management
Recovering from a key change that broke clients
What you'll learn
- Recognise an authentication failure
- Identify which consumers are affected
- Restore service quickly
- Complete the rotation afterwards
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
Authentication failures present as generic connection errors, which sends investigations toward the network before the credential.
Recognising it
Client-side symptoms:
"Operation not permitted" on a mount or map
"authentication error" in a client log
RBD map failing with EACCES or EPERM
a CephFS mount hanging then failing
an application reporting a storage connection error with no detail
# from the affected host
ceph -n client.app-a --keyring /etc/ceph/ceph.client.app-a.keyring -s
2026-08-18 ... auth: unable to find a keyring on /etc/ceph/...
2026-08-18 ... AuthRegistry(0x...) no keyring found at ..., disabling cephx
[errno 13] RADOS permission denied
# does the entity still exist, and with what capabilities?
ceph auth get client.app-a
# does the key on the client match the cluster's?
ceph auth print-key client.app-a
grep -A1 'client.app-a' /etc/ceph/ceph.client.app-a.keyring
Comparing those two values answers the question directly. A mismatch is
the diagnosis; matching keys point elsewhere.
Identifying affected consumers
# monitor log entries for failed authentication
ceph log last 200 cluster | grep -i -E 'auth|denied|EACCES' | tail -20
# which entities are currently connected — those that are not are suspect
ceph tell mds.0 client ls 2>/dev/null | python3 -c '
import sys,json
for c in json.load(sys.stdin):
print(c.get("client_metadata", {}).get("entity_id"))' | sort -u
| Signal | Indicates |
|---|---|
| One consumer failing | its copy of the key is stale |
| Every consumer of an entity failing | the entity changed or was removed |
| Consumers of several entities failing | a broader change, or a monitor problem |
| Failures beginning at a known change time | the change is implicated |
Restoring service
# if the entity was removed, restore it from the export
ceph auth import -i /secure/entities/client.app-a.export
# if capabilities were narrowed, restore them
ceph auth caps client.app-a \
mon 'profile rbd' osd 'profile rbd pool=app-a' mgr 'profile rbd pool=app-a'
# if the key changed and consumers hold the old one, restore the old key
ceph auth import -i /secure/entities/client.app-a.export
Restoring the entity to its prior state is faster than redistributing a
new key, because consumers need no change at all.
# verify recovery
IMAGE=vm-disk-01
ceph -n client.app-a --keyring /etc/ceph/ceph.client.app-a.keyring -s
rbd status app-a/${IMAGE} | grep -i watcher
Completing the rotation afterwards
The rotation still needs doing. What changed is the method:
create a successor entity rather than modifying the original
distribute to the consumers now known to exist
verify each before removing the original
ceph auth get-or-create client.app-a-2 \
mon 'profile rbd' osd 'profile rbd pool=app-a' mgr 'profile rbd pool=app-a'
The incident produced the consumer inventory that was missing. Record it
rather than discovering it again.
Quiz
Knowledge check · 4 questions
Q1. Why do authentication failures often present as network failures?
Q2. Importing the exported entity restores service during an authentication outage without touching a single client.
Q3. Recover from a broken key rotation.
After a key change, several applications report storage connection errors. The network team has found nothing.
Q4. Which single comparison diagnoses a key mismatch?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Compare ceph auth print-key against the client’s keyring first when
storage errors follow a key change — auth failures surface as connection
errors, which sends investigation toward the network. Restore the prior
key to end the outage, then redo the rotation deliberately.
Cross-course references
- Kubernetes: a rotated Secret produces mount errors that read as node problems
- Linux: credential failures surface at the layer above as generic connection errors