Skip to main content
RunBook Academy

CephXLVI · RGW Users and CredentialsRGW Users and Credentials

RGW admin capabilities

Advanced⏱ ~17 minradosgw-admincurl

What you'll learn

  • Grant and revoke RGW admin capabilities
  • Enumerate the capability types and their scope
  • Use the admin REST API with a capable user
  • Scope capabilities for automation safely

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

The admin REST API is how self-service portals and automation manage RGW users and buckets without shell access to a Ceph node. Capabilities are what scope that access, and granting them broadly hands over the whole deployment.

Granting

radosgw-admin caps add --uid=portal --caps="users=read,write"
radosgw-admin caps add --uid=portal --caps="buckets=read"
radosgw-admin caps add --uid=auditor --caps="usage=read;metadata=read"

radosgw-admin user info --uid=portal | jq '.caps'
radosgw-admin caps rm --uid=portal --caps="users=write"

The capability types

CapabilityGrants access to
userscreate, modify, delete, and read users
bucketslist, inspect, link, unlink, and delete buckets
metadataread and write raw metadata objects
usageusage statistics
zonezone configuration
infocluster information
amz-cachecache operations

Each takes read, write, or read,write.

metadata=write is the dangerous one: it permits direct manipulation of the metadata objects underlying users and buckets, bypassing the consistency the higher-level operations maintain.

Using the admin API

# list users
curl -s -X GET "https://rgw.example.com/admin/user?format=json" \
     --aws-sigv4 "aws:amz:default:s3" \
     --user "$ACCESS_KEY:$SECRET_KEY"

# create a user
curl -s -X PUT "https://rgw.example.com/admin/user?uid=newuser&display-name=New%20User" \
     --aws-sigv4 "aws:amz:default:s3" \
     --user "$ACCESS_KEY:$SECRET_KEY"

# bucket statistics
curl -s -X GET "https://rgw.example.com/admin/bucket?stats=true&format=json" \
     --aws-sigv4 "aws:amz:default:s3" \
     --user "$ACCESS_KEY:$SECRET_KEY"

Requests are signed with the capable user’s S3 credentials, so the admin API needs no separate authentication mechanism.

Scoping for automation

AutomationCapabilities
Self-service user provisioningusers=read,write
Billing and usage reportingusage=read
Monitoring dashboardusage=read;buckets=read
Bucket lifecycle managementbuckets=read,write
Read-only auditusers=read;buckets=read;usage=read

Grant only what the automation calls. A provisioning service does not need buckets=write, and a reporting service does not need users=write.

Auditing

for u in $(radosgw-admin user list | jq -r '.[]'); do
  caps=$(radosgw-admin user info --uid="$u" | jq -c '.caps')
  [ "$caps" != "[]" ] && printf '%-24s %s\n' "$u" "$caps"
done

Any user with capabilities is an administrative identity and belongs in the same review as cephx entities with elevated privileges.

Quiz

Knowledge check · 4 questions

  1. Q1. Which RGW capability should not be granted to routine provisioning automation?

  2. Q2. The RGW admin API uses a separate authentication mechanism from the S3 data API.

  3. Q3. Scope credentials for a self-service portal.

    A self-service portal will let teams create their own RGW users and view their usage. A developer has proposed giving the portal a user with `users=*;buckets=*;metadata=*;usage=*` so that nothing is blocked.

  4. Q4. Why does an uncapable user calling the admin API receive a 403 rather than an authentication error?

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

Production discipline

Treat any RGW user holding capabilities as an administrative identity and include it in the same access review as elevated cephx entities. Grant capabilities from the functions the automation actually performs and add only what demonstrably fails, rather than granting broadly to avoid a second conversation.

Cross-course references

  • Kubernetes: a controller ServiceAccount scoped to the verbs it calls follows the same discipline
  • Linux: sudo rules listing specific commands rather than ALL is the identical practice