CephXLVI · RGW Users and CredentialsRGW Users and Credentials
Creating and managing RGW users
What you'll learn
- Create users with appropriate attributes
- Inspect and modify a user record
- Suspend and remove users safely
- Handle tenanted users correctly
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
The user record carries credentials, quotas, placement, and capabilities. Creating one is a single command; creating it with the attributes you will want later saves a series of follow-up modifications and, in the case of tenancy, an impossible migration.
Creating
radosgw-admin user create \
--uid=analytics \
--display-name="Analytics Team" \
--email=analytics@example.com \
--max-buckets=50
{
"user_id": "analytics",
"display_name": "Analytics Team",
"keys": [{"user": "analytics", "access_key": "8FQ...", "secret_key": "kR2..."}],
"max_buckets": 50,
"bucket_quota": {"enabled": false},
"user_quota": {"enabled": false}
}
The access and secret keys are generated and shown once in this output. Capture them at creation.
Tenanted users
radosgw-admin user create --tenant=acme --uid=alice --display-name="Alice"
radosgw-admin user info --tenant=acme --uid=alice
Decide on tenancy before the first user exists — a non-tenanted user cannot be moved into a tenant without recreating it and copying every object.
Inspecting and modifying
radosgw-admin user info --uid=analytics
radosgw-admin user list
radosgw-admin user stats --uid=analytics --sync-stats
radosgw-admin user modify --uid=analytics --max-buckets=100
radosgw-admin user modify --uid=analytics --display-name="Analytics Platform"
Suspend rather than remove
radosgw-admin user suspend --uid=analytics
radosgw-admin user enable --uid=analytics
Suspension blocks all access while preserving the user, their buckets, and their data. It is the right response to a compromised credential, a non-paying customer, or a user under investigation — and it is reversible.
Removal
radosgw-admin user rm --uid=analytics
radosgw-admin user rm --uid=analytics --purge-data
Without --purge-data, removal fails if the user owns buckets. With it,
every bucket and object the user owns is deleted — irreversibly.
Bucket ownership
radosgw-admin bucket list --uid=analytics
radosgw-admin bucket link --bucket=data --uid=newowner
radosgw-admin bucket unlink --bucket=data --uid=analytics
Buckets belong to users, so transferring a bucket before removing a user is how you retire an account without losing its data.
Quiz
Knowledge check · 4 questions
Q1. What is the correct response to a compromised RGW user credential when the account must keep its data?
Q2. A non-tenanted RGW user can be moved into a tenant with a modify command.
Q3. Retire a user account without losing its data.
A team has disbanded and their RGW user owns eight buckets, three of which hold data another team needs to retain. The account must be closed.
Q4. Why does capacity not free immediately when a user is removed with --purge-data?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Make suspension rather than removal the default response to credential compromise, non-payment, or investigation — it is immediate, complete, and reversible. Decide on tenancy before the first user is created, since it is the one user attribute that cannot be changed afterwards.
Cross-course references
- Kubernetes: disabling a ServiceAccount rather than deleting it preserves the same reversibility
- Linux: locking an account rather than deleting it follows the identical practice