Least-privilege cephx users and capabilities

Ceph clients authenticate with cephx users whose capabilities decide which pools and operations they can reach. This page explains how to give each application only what it needs and how to audit keys that already exist.

On this page

Why cephx capabilities decide what a compromised client can reach

A cephx user's capabilities decide how much damage a stolen or misused key can do. Least privilege in cephx means each client gets its own user, granted only the monitor, OSD and metadata access its job requires, and nothing more. Teams need this when many applications share a handful of broad keys, typically client.admin or one wide user copied into several configuration files. In that setup, compromising one web server, backup job or virtual machine host gives an attacker the same reach across the cluster as the most privileged administrator, and rotating the key breaks every consumer at once.

Each cephx user carries capability strings for three services. The mon cap controls what the user can ask the monitors to do, such as reading cluster maps or issuing commands. The osd cap controls which pools and objects the user can read and write, and it is where most of the blast radius is set. The mds cap governs CephFS metadata access. Pool-scoped grants restrict osd access to named pools, and namespace-scoped grants narrow that further to a RADOS namespace inside a pool, which matters when several tenants share one pool. Capability profiles, such as the RBD and RGW profiles described in the Ceph documentation, bundle common permissions so you do not hand-write long grant lists, but a profile can still be wider than one application needs, so read what it expands to on your release. Confirm exact cap syntax, supported profile names and namespace behavior against the documentation for the release you run before writing any grant, because these details have changed between releases. Start with the Ceph cephx authentication documentation to map each application to the narrowest set of caps it can work under.

Which capability pattern fits each client type

This table compares the cephx capability patterns most clusters use, from broad admin keys to read-only monitoring users. Read each row for the client type it fits, what the key can reach, and what it costs you in operations and automation.

PatternWhen it fitsWhat it allowsMain trade-off
Broad admin key (client.admin)Break-glass administration and initial cluster bootstrap by a small set of named operatorsFull read and write across monitors, OSDs, pools and the auth databaseAny leaked copy grants full cluster control, so keep it off application and automation hosts
Per-application user with pool-scoped OSD capsApplication or service that writes to one or a few named pools, such as a backup job or an analytics loaderRead and write on the named pools only, with monitor access to fetch the cluster mapEach new pool or namespace needs a matching user or cap update, which adds upkeep as the estate grows
RBD profile users (profile rbd)Hypervisors, Kubernetes CSI drivers or other clients that create and map block images in a poolImage operations in the bound pool, using built-in profiles rather than hand-written capsProfiles are broad within their pool, so a compromised client can still touch every image there; scope by pool or namespace
CephFS users with path or filesystem capsClients that mount one filesystem or a subtree, such as a team share or a build cacheMount and access limited to the named filesystem and, where configured, a specific pathPath restrictions need careful testing across client versions, and mistakes can expose or block data unexpectedly
Read-only monitoring userDashboards, exporters and health checks that only need cluster status and metricsRead access to cluster state and status commands, without write or admin rightsSome tools expect more rights than they need, so confirm the exact caps each exporter requires before granting them

How to create and verify a scoped cephx user

This sequence replaces broad or shared Ceph keys with one cephx user per application, each limited to the pools and operations it needs. Every step ends with a check so you can confirm the new user works and that the old access is gone.

  1. Inventory clients and the pools they use

    Start by listing every client that talks to the cluster: hypervisors, backup agents, application servers, gateways and administrators' workstations. For each one, record the protocol it uses (RBD, CephFS, RGW or raw RADOS), the pools or filesystems it touches, and whether it reads, writes or both. Pull the current key inventory with ceph auth ls so you can see which users already exist and which clients appear to share a key. The step is done when every client maps to a pool list and every existing key has an owner. Ask your team to confirm the list against the hosts that actually connect, because configuration files often hold keys that nothing uses anymore.

  2. Decide one user per application

    Assign a dedicated cephx entity to each application or workload, such as client.app-billing-rbd or client.backup-vm, rather than sharing client.admin or one broad key across several services. Record the pool, namespace and capability set for each user in your configuration management or change record. Naming should make the owner and purpose obvious when you read ceph auth ls later. The step is complete when each user has a written purpose, a single owning team and a list of pools. Confirm with the application owners that no workload depends on a key outside this list.

  3. Create the user with minimal capabilities

    Create each user with ceph auth get-or-create and grant only the capabilities that match the protocol. For RBD clients, use the rbd profile scoped to the specific pool, and add a namespace restriction where your design uses namespaces. For RGW or CephFS clients, grant the narrowest mon, osd and mds caps the documentation for that service describes. Avoid allow * and avoid granting mon or mgr access to application users that only need data pools. Save the returned keyring to a file with restrictive permissions. The step is done when the command returns a keyring for each user. Check the caps with ceph auth get client.<name> and confirm the output lists only the pools and profiles you recorded in the previous step.

  4. Distribute keyrings to client hosts

    Copy each keyring only to the host or service that needs it, placing it under /etc/ceph/ with the ceph.conf file and setting ownership so only the service account can read it. Do not copy keyrings into shared configuration repositories or into images that many workloads can pull. Where a secret store is used, store the key there and inject it at runtime. The step is done when each keyring exists on exactly the intended hosts. Verify with a directory listing and stat on each host, and confirm no other service account can read the file.

  5. Test read and write access from the client host

    From the client host, run a read and a write using only the new keyring. For RBD, pass --id and --keyring to rbd ls and create, write to and remove a test image in the permitted pool. For RADOS, use rados -p <pool> put and get with a test object. The step is done when the permitted read and write both succeed and return the expected data. If an operation fails, compare the caps shown by ceph auth get against the operation, because a missing r or w on the pool is the most common cause. Keep the test objects out of production data and remove them afterward.

  6. Confirm denied operations fail

    Using the same keyring, attempt operations outside the granted scope: a write to a pool the user should not touch, a read from another application's image, or a command that needs admin rights such as ceph osd pool ls or ceph auth ls. Each of these should return a permission error. The step is done when every out-of-scope attempt is refused and the refusal is logged. A command that succeeds means the caps are broader than the design, so return to the create step and tighten them. Record the test results with the change ticket so an auditor can see the boundary was tested, not assumed.

  7. Remove or rotate broad keys

    Once the scoped user passes both tests in production, switch the application to the new keyring and remove the old broad key with ceph auth del, or rotate it if other systems still depend on it. Schedule the change with the owning team, because removing a key that a hidden job still uses will stop that job. Rotate keys that were shared across hosts, and revoke any key that was stored in configuration files outside the secret store. The step is done when ceph auth ls no longer lists the retired entity and the application still works. Check the cluster audit log and the application logs for authentication failures over the following days.

  8. Document and review the user list

    Record each user's purpose, owner, pools, caps and keyring locations in your inventory, and set a review date with the owning teams. Export ceph auth ls on a schedule and compare it with the inventory to catch new keys created outside the process. The step is done when the inventory matches the cluster and each user has a named owner. Ask your provider or internal team to confirm how often reviews happen and who approves new keys, since that process matters more over time than the initial setup.

How to audit keys that already exist in your cluster

Start by listing every cephx entity in the cluster with ceph auth ls, then compare that list against what is actually running. Each entity in the output shows its key and its capabilities, and the most useful first pass is to flag entities whose mon, osd or mgr caps grant broad access, such as allow *, or access to pools the named application never uses. Admin-level caps granted to an application key are the highest-priority finding, because a leaked application key with those caps exposes the whole cluster. Also look for entities that were created for a one-off task, a retired host or a test pool and never removed. Record each finding in a register with the entity name, its caps, and the date it was last used, if your monitoring can show that.

Shared keys are the next thing to find. Map each entity to the hosts or services that authenticate with it, using the client configuration, the keyring files and your deployment inventory. A single key used by several hosts cannot be revoked for one host without affecting the others, and it makes audit logs ambiguous about which workload made a request. Every key should have a named owner and a workload it serves. Entities with no owner or no identifiable workload are candidates for review, not immediate deletion. Keyring files on clients must be checked too, because the monitor's list does not show where a key has been copied. Search the hosts that run your applications for ceph.client.*.keyring files and compare their contents with the entities you have recorded. Then confirm with each owner which clients still use a key before you remove or rotate it, since a key may still be in use by a backup job, a scheduled task or a host that is powered off. Plan rotation in stages: create the replacement entity with narrower caps, move one workload at a time, watch for authentication errors in the logs, and only then remove the old entity. Keep the old key working until the last client has moved.

Security and operational risks of over-broad cephx keys

Most cephx exposure comes from keys that were convenient to create and never revisited. The cards below cover the common ways a client key ends up with more reach than its application needs, and the control and check for each. Work through them against your current key inventory, not just the design you intended.

Admin keys on application hosts

A client.admin keyring on an application server gives that host full control of the cluster, including every pool, the monitor configuration and user management. Replace it with a per-application user that holds only the capabilities the workload needs. Check each application host's /etc/ceph directory for a ceph.client.admin.keyring file and confirm which client identity its workloads actually use.

Shared keys across tenants

When several teams or customers authenticate with the same cephx user, one compromised client exposes every pool that key can reach, and audit logs cannot separate their activity. Issue one user per application or tenant, scoped to that tenant's pools or RBD namespaces. Check the key list for users referenced by more than one unrelated workload.

Loose keyring file permissions

Keyring files are readable secrets, and a world-readable keyring lets any local user on a host act as that client. Keep keyrings owned by the service account that uses them, with restrictive mode bits, and avoid leaving copies in home directories or shared temporary paths. Check file modes and owners across hosts with a scripted audit rather than sampling a few machines.

Keys copied into config management and CI

Keys pasted into Ansible variables, Terraform state, or CI/CD variables spread to every system that can read those stores, and their history often outlives the key itself. Store the keyring in a dedicated secrets system with access logging, and let pipelines fetch it at deploy time. Check whether any repository, pipeline log, or variable group contains a base64 key string or a keyring block.

No owner for key rotation

A key that nobody owns is never rotated, and a departed engineer may still know where it is copied. Assign each cephx user a named owner, a consuming system, and a rotation process that includes adding the new key, updating clients, and removing the old one. Ask for the owner field in your key inventory and flag any user without one.

Capabilities reaching more pools than intended

A capability string that names a broad pool pattern, or omits a pool restriction, can let a client read or write data it was never meant to touch. Scope osd capabilities to named pools or RBD namespaces, and keep mon capabilities to the minimum the client needs. Check each user with ceph auth get and compare the pool list against the application's documented data flows.

How keyrings reach clients under cephadm and outside it

On a cephadm-managed cluster, the orchestrator holds the cluster's administrative credentials and distributes configuration and keyrings to hosts it manages. The admin keyring is the most sensitive file in the cluster because it grants full control, so the question is which hosts are allowed to hold it at all. Cephadm can place the admin keyring on hosts labeled for that purpose, and the rest of your fleet should receive only the keys its daemons and clients need. Treat every host that holds the admin keyring as part of your cluster's trust boundary.

  • Where the key lives: The admin keyring sits on the bootstrap host and on any host given the _admin label, typically under /etc/ceph. Confirm which hosts carry that label and which users can log in to them.
  • Who can read it: Root on those hosts can read the file, and so can anyone with sudo to root. Confirm your SSH and sudo policy for these hosts is tighter than for application servers.
  • How it rotates: Rotating the admin key is a deliberate operation, not a routine. Plan it with your change process and confirm every _admin host receives the new keyring.
  • Where clients get keys: Application users should be created with ceph auth and their keyrings exported to the application host, not copied from an admin host.
  • What to confirm: Your own inventory of _admin hosts, the users with root on them, and whether the admin keyring appears in backups or configuration management repositories.

Check the list of _admin hosts against your current host inventory before any audit.

Limits to confirm in your environment

The cephx model is simple to describe but its exact behavior depends on your release, your clients and how you change keys. The cards below list the points to test on a non-production cluster before you rewrite any user's capabilities in production.

Cap syntax and profile availability

Capability strings and profiles such as profile rbd and profile rbd-read-only are documented per release, and the exact set you can use depends on whether you run Squid (19.2.x) or Tentacle (20.2.x). Check the capability reference for your release and run ceph auth get-or-create in a lab with the exact strings you plan to use. Do not copy examples from older blog posts or from a different major release.

Client and driver support for capabilities

A narrow capability only helps if the client library, kernel driver or hypervisor integration actually uses the operations you restricted. Some tools need broader access to create images, read configuration or list pools than you expect. Test each consumer (librbd, the kernel RBD client, CephFS mounts, RGW) against its restricted key and record every operation it fails on.

Behavior of existing sessions after a key change

Changing a key or its capabilities does not necessarily end sessions that already authenticated with the old values. Confirm, in your release, when a revoked or narrowed capability takes effect for an open connection, and whether a client must reconnect or remount. Plan the rotation window so that a capability reduction does not leave an older session with broader access longer than you intend.

Gaps for specific tools

Backup products, monitoring exporters, provisioning automation and storage orchestrators often assume a shared administrative key. Inventory every tool that touches the cluster and identify which ones need mon or mgr access beyond their own pools. Where a tool cannot run with a restricted user, decide whether to isolate it on a dedicated host with its own keyring or to accept the broader grant in writing.

Keyring distribution and auditing

Restricted users only reduce risk if keyrings stay on the hosts that need them. Confirm where each keyring is copied, who can read it, and how you would detect an unexpected client.* user. Ask your team to show how existing keys are listed and reviewed, and to confirm which of those listings your operators can run without the admin keyring.

Effect of your upgrade path

Your upgrade path can change how capabilities are interpreted or what profiles are available. Read the release notes for every major release between your current version and your target before you rewrite grants. Schedule a capability review as a step in the upgrade plan, and rerun the client tests after each upgrade stop.

Questions teams ask before scoping cephx access

How much effort does a per-application cephx key model take?

The effort depends mostly on how many clients exist, how many pools they touch, and how much of key creation and distribution is automated. A cluster with a handful of clients sharing one pool is a small inventory exercise. A cluster where every application, virtual machine host and backup job needs its own user with pool-scoped capabilities involves mapping each workload to its real access, creating users, testing each one, and removing old shared keys. Each additional client adds an inventory entry, a capability review and a test. Ask for the client count, pool layout and existing automation before estimating anything.

Can our own team scope cephx access without a partner?

Often yes, if the team already runs the cluster and has someone who understands Ceph capabilities, pools and namespaces. The work is well bounded: audit existing keys with the cluster's own tools, define one user per workload, grant the narrowest capability that works, and verify each client. The usual gap is time and review discipline rather than knowledge. Teams that lack hands for testing across every application, or that need an independent review of the resulting access model, often bring in a partner for a fixed scope while keeping day-to-day ownership in-house.

What do application owners need to provide during a cephx review?

Application owners need to confirm what their workload actually does with the cluster. That means which pools or RBD images it reads and writes, whether it needs to create or delete objects, whether it uses snapshots or namespaces, and which hosts or service accounts run it. Without this, teams tend to copy broad capabilities from old keys and never narrow them. Owners should also name who approves credential changes and who is contacted when a client breaks after a change.

How long does a key rotation window take, and what sets it?

The window depends on how many clients must be switched, how many keyrings each client reads, and how easily each application reloads credentials without a restart. Clients with a single keyring file and a documented reload step move quickly. Clients embedded in images, hypervisor configuration or third-party tools need coordinated changes and may need a maintenance window. Plan a parallel period where old and new keys both work, confirm each client authenticates with its new user, and only then remove the old key. Ask the team to inventory clients before setting any date.

Do narrower cephx capabilities affect performance?

Capability checks happen when a client authenticates and when it performs operations, and a correctly scoped capability normally does not change the I/O path for allowed operations. The practical performance risks come from the work around the change: restarting clients, reloading keyrings, or retrying failed operations while a client still holds a stale key. Overly restrictive profiles can also cause failures that look like slowdowns. Benchmark representative workloads before and after the change to confirm this in your environment, since results depend on your hardware and network.

What should we request in a fixed-scope quote for cephx work?

Ask for a written scope that names the cluster release and deployment method, the number of clients and pools in scope, the expected user and capability model, and the keyring distribution method. Request the audit method, the list of application owners who must take part, the testing approach for each client, and the rotation plan with rollback steps. Confirm what is one-time work, such as the audit and initial model, and what recurs, such as reviews after new applications are onboarded. Also ask which deliverables are documentation and which are changes to your cluster.

Which cephx capabilities should we avoid granting by default?

Broad administrative capabilities on the monitors and admin-level access should be treated as exceptions, not defaults. Requests for full access across all pools usually signal that the application has not been mapped to its real needs. Confirm each capability against the Ceph authentication and capability documentation for your release, and test that the client still works with the narrower grant before rolling it out. Treat any key that can change cluster configuration as a high-risk item to review separately.

How DeployOpen scopes and delivers cephx hardening

DeployOpen performs cephx hardening inside your own infrastructure, on your clusters, under a written scope agreed before work starts. The scope names the clients to review (applications, hypervisors, Kubernetes consumers, backup tools and administrators), the pools and namespaces they touch, and the existing keys in scope, including any client.admin copies held on workstations or in automation. Most engagements are fixed-scope, so the scope document also states what is excluded, such as network-level controls or the dashboard, which are covered in sibling sections. Ask for the scope to be written against your current ceph auth ls output so that the starting point is recorded, not assumed.

The delivered work follows a set sequence. First comes an inventory of every key with its current capabilities, last-used evidence where your logs allow it, and an owner for each client. Next comes a capability model that maps each application to a named user, a pool-scoped or namespace-scoped grant, and a profile where a built-in profile fits the workload. The model is then applied in a change window, with a rotation runbook covering keyring distribution to hosts, how keys are replaced without a service outage, and how revoked keys are removed. Verification evidence records the before and after capability listings, failed-access tests against pools a client should not reach, and the audit trail of changes. Confirm with DeployOpen which of these artifacts you receive in your own repository and format.

After the initial delivery, DeployOpen offers retainers for ongoing review. A retainer typically covers periodic key audits, new client onboarding against the capability model, rotation support and re-testing after Ceph upgrades, because capability syntax and profiles can change between releases. DeployOpen does not issue audit reports or attestations. If an assessor will test access control, the evidence package prepares your team for that review, and the independent assessor makes the determination. Ask for the retainer scope, response expectations and what happens to the capability model when your Ceph release changes, and confirm these in writing alongside the fixed-scope quote.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.