Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squid: rgw: user accounts implementation #56863

Merged
merged 168 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
207f0df
rgw/iam: zero-pad milliseconds for role and oidc-provider CreateDate
cbodley Feb 11, 2024
f0fb48d
rgw/auth: generalize Identity::get_role_tenant() as get_tenant()
cbodley Dec 7, 2023
25eb728
rgw/auth: Identity::get_aclowner() for resources it creates
cbodley Dec 7, 2023
1074b10
rgw/auth: initialize s->owner in Strategy::apply()
cbodley Dec 7, 2023
22e31c3
rgw/acl: use ACLOwners for create_default()
cbodley Dec 7, 2023
2725622
rgw/sal: pass in ACLOwner for object writes
cbodley Dec 7, 2023
4923abf
common: add gen_rand_numeric()
cbodley Jun 27, 2022
76daba3
rgw: define account ids and names
cbodley Nov 1, 2023
684877c
rgw: add struct RGWAccountInfo
cbodley Nov 1, 2023
c7c68e2
rgw: add account_id to RGWUserInfo
cbodley Nov 1, 2023
049f336
rgw/sal: add account interfaces to Driver
cbodley Nov 1, 2023
85e3a34
rgw: add account admin ops
cbodley Nov 1, 2023
d6a5b3f
radosgw-admin: add account admin commands
cbodley Nov 1, 2023
10ef9b9
rgw: add /admin/account rest apis
cbodley Nov 1, 2023
84a9140
rgw: enable 'user modify --account-id'
cbodley Nov 1, 2023
548d71d
rgw: add rgw_owner variant with json encoding
cbodley Nov 3, 2023
1e6b7a0
rgw/auth: account users also match ACL grants to their account id
cbodley Nov 4, 2023
d0b86de
rgw/auth: Identity::is_owner/admin_of(rgw_owner)
cbodley Nov 3, 2023
327dc3f
rgw/quota: generalize quota to rgw_owners
cbodley Nov 26, 2023
a54a6ca
rgw/rados: add .rgw.meta:accounts pool
cbodley Nov 27, 2023
19128cf
rgw/rados: generalize RGWUID for accounts
cbodley Nov 30, 2023
7db8400
rgw/rados: implement account metadata operations
cbodley Nov 27, 2023
77e722b
rgw/rados: add account metadata handler
cbodley Dec 1, 2023
fbdd11f
rgw/rados: add rgwrados::buckets namespace abstraction for cls_user
cbodley Dec 1, 2023
774b0bf
rgw: use rgw_owner in RGWBucketEntryPoint
cbodley Dec 1, 2023
5777a34
rgw/pubsub: use rgw_owner for topic ownership
cbodley Dec 12, 2023
13747a1
rgw/acl: use rgw_owner for ACLOwner
cbodley Dec 7, 2023
6646e30
rgw: use rgw_owner in RGWBucketInfo
cbodley Nov 10, 2023
6bca3bc
rgw/sal: move list_buckets() to Driver
cbodley Dec 16, 2023
23c1c6a
rgw/sal: add load_aclowner_by_email()
cbodley Dec 16, 2023
1087ed3
rgw/acl: s3 CanonicalUser grants support account ids
cbodley Dec 16, 2023
baa5109
rgw/acl: create_policy_from_headers() can yield
cbodley Dec 16, 2023
c8fff2c
qa/rgw: create accounts for random s3test users
cbodley Dec 17, 2023
d6037d1
rgw: add RGWIdentityType::TYPE_ROOT for account root user
cbodley Dec 17, 2023
ac78ee9
rgw/rados: Bucket::chown() updates owner on bucket instance
cbodley Dec 17, 2023
4e5aabf
rgw: update bucket ownership when adding user to account
cbodley Dec 17, 2023
80256cf
rgw/multisite: RGWBucketMetadataHandler updates linkage on owner change
cbodley Dec 17, 2023
9a95bc0
cmake: move WITH_RADOSGW checks up to test/CMakeLists.txt
cbodley Nov 19, 2023
2d50762
cls/user: add interfaces to index user account resources
cbodley Nov 19, 2023
824a7e3
test/cls: add ceph_test_cls_user
cbodley Nov 19, 2023
cfc5310
rgw/iam: add iam user metadata (path, create_date, tags)
cbodley Dec 17, 2023
dd26fde
rgw/iam: use enum for action values
cbodley Dec 17, 2023
50ba384
rgw/op: separate IAM ops in enum RGWOpType
cbodley Dec 17, 2023
3b98110
rgw/auth: use switch for is_non_s3_op()
cbodley Dec 18, 2023
a5d7c1b
rgw/rados: add rgwrados::users namespace abstraction for cls_user
cbodley Dec 18, 2023
a773e12
rgw/sal: add interfaces for account users
cbodley Dec 18, 2023
f8cc79d
rgw/rados: user metadata links to account index
cbodley Dec 18, 2023
fe0bf0d
rgw/rest: wrap iam/sns/sts Error responses with ErrorResponse
cbodley Jan 11, 2024
12e70af
rgw/iam: add initial IAM User apis
cbodley Dec 18, 2023
9f3d9c6
rgw/user: expose functions to generate access/secret keys
cbodley Dec 20, 2023
7215022
rgw/user: add 'create_date' to RGWAccessKey
cbodley Dec 20, 2023
fe6159c
rgw/iam: add IAM AccessKey apis
cbodley Dec 20, 2023
8c16e1c
radosgw-admin: quota commands can set account quota
cbodley Dec 20, 2023
e94af62
rgw: init_quota() loads owner quota unconditionally
cbodley Dec 20, 2023
54b2318
rgw/rados: add rgwrados::roles namespace abstraction for cls_user
cbodley Dec 31, 2023
018ec46
rgw/sal: add interfaces for account roles
cbodley Dec 31, 2023
0de9fe7
rgw/iam: rename rgw::auth::Principal::Tenant to Account
cbodley Jan 2, 2024
3afb792
rgw/auth: Identity::is_identity() takes one Principal
cbodley Jan 2, 2024
f970c0b
rgw/auth: Identity matches paths in user principals
cbodley Jan 2, 2024
469fc90
rgw/auth: Identity matches account user principals
cbodley Jan 2, 2024
44e1734
rgw/rest: iam user policy api cleanup
cbodley Jan 11, 2024
e137173
rgw/rest: simplify RGWRestUserPolicy hierarchy
cbodley Jan 11, 2024
c40d3e1
rgw/rest: enable iam UserPolicy apis against account users
cbodley Jan 11, 2024
148c39b
rgw: move forward_iam_request_to_master() to rgw_rest_iam.*
cbodley Jan 14, 2024
8827775
rgw/iam: User apis call forward_iam_request_to_master()
cbodley Jan 14, 2024
6eef245
rgw/iam: AccessKey apis call forward_iam_request_to_master()
cbodley Jan 14, 2024
d7302dd
rgw/iam: RGWRestRole::parse_tags() as free function
cbodley Jan 14, 2024
3fd5b73
rgw/iam: RGWUntagRole uses lower/upper bounds for iteration
cbodley Jan 14, 2024
c6f2574
rgw/iam: split RGWRestRole member variables
cbodley Jan 14, 2024
59e7712
rgw/iam: role apis override init_processing/verify_permission
cbodley Jan 15, 2024
f0c355b
rgw/iam: enable Role apis against account users
cbodley Jan 15, 2024
a67d94c
rgw/iam: add pagination to ListRoles
cbodley Jan 15, 2024
2a28358
rgw/role: separate dump_iam_role() for iam api
cbodley Jan 20, 2024
7fbb30f
rgw/role: role APIs support account users
cbodley Jan 23, 2024
ec5b80f
rgw/sal: remove load_account_role_by_name()
cbodley Jan 23, 2024
e290bae
rgw/iam: add s3:Get/PutBucketOwnershipControls
cbodley Jan 26, 2024
520e711
rgw/role: support Description for Create/Get/UpdateRole
cbodley Jan 26, 2024
41fb74c
vstart/rgw: add default config for sts
cbodley Jan 27, 2024
345eb68
rgw: adapt verify_user_permission() for account users
cbodley Jan 27, 2024
a4947ff
rgw: verify_permission logs acl grants
cbodley Jan 27, 2024
e2c0b26
rgw: add generic evaluate_iam_policies()
cbodley Jan 27, 2024
f917e99
rgw: add cross-account policy evaluation
cbodley Jan 27, 2024
f7816c0
rgw/auth: account users match account arns
cbodley Jan 30, 2024
268a487
rgw: evaluate_iam_policies() handles account root user
cbodley Feb 1, 2024
d227628
rgw/iam: Policy() takes string instead of bufferlist
cbodley Feb 1, 2024
870c070
rgw/iam: add lots of actions needed for managed policies
cbodley Feb 1, 2024
5e86656
rgw/iam: add get_managed_policy() factory function
cbodley Feb 1, 2024
345f966
rgw/iam: AttachUserPolicy adds managed user policy
cbodley Feb 1, 2024
0239a0b
rgw/iam: AttachRolePolicy adds managed role policy
cbodley Feb 2, 2024
1ae181d
radosgw-admin: add commands for managed policy
cbodley Feb 5, 2024
9c2da0a
vstart/rgw: add account users for s3-tests
cbodley Jan 30, 2024
5f93515
rgw/iam: refactor OIDC ops
cbodley Feb 5, 2024
038b5aa
rgw/sal: remove virtual class RGWOIDCProvider
cbodley Feb 6, 2024
abe561d
rgw/iam: OpenIDConnectProvider apis support account users
cbodley Feb 6, 2024
49cde2c
rgw: add struct RGWGroupInfo
cbodley Feb 9, 2024
2cfc12d
rgw/sal: add backend interfaces for group metadata
cbodley Feb 11, 2024
030bee1
rgw/iam: ListUserPolicies supports Marker/MaxItems
cbodley Feb 11, 2024
861364f
rgw/iam: add Group/GroupPolicy APIs
cbodley Feb 11, 2024
0b07f50
rgw: rename iam_user_policies to iam_identity_policies
cbodley Feb 11, 2024
224877a
rgw/iam: load and evaluate group policies
cbodley Feb 11, 2024
2d14dfb
doc/radosgw: start on iam/account docs
cbodley Dec 20, 2023
a165b27
doc/radosgw: document iam managed policies
cbodley Feb 2, 2024
a769025
doc/radosgw: add awscli examples
cbodley Feb 7, 2024
92f6931
rgw: bucket list --uid redirects to account buckets
cbodley Feb 15, 2024
9e7fc8b
rgw: 'user stats' redirects to 'account stats'
cbodley Feb 15, 2024
8d95c34
rgw/role: use CreateDate from forwarded CreateRole response
cbodley Feb 15, 2024
1fb0cb7
rgw/iam: use retry_raced_user_write() for User/AccessKey apis
cbodley Feb 17, 2024
1b2df01
rgw/iam: UserPolicy apis use forward_iam_request_to_master()
cbodley Feb 17, 2024
6cf8c52
rgw/iam: use retry_raced_role_write() for Role apis
cbodley Feb 17, 2024
3cfdffd
rgw/iam: only RGWDeleteRole returns ERR_DELETE_CONFLICT
cbodley Feb 17, 2024
c74597d
rgw/iam: RGWRoleMetadataHandler creates with exclusive=false
cbodley Feb 17, 2024
8b1a8bd
rgw: forward_to_master() passes rgw_owner for effective uid header
cbodley Feb 19, 2024
29d1100
test/rgw/multisite: test sync of iam-related metadata
cbodley Feb 16, 2024
fedcaf0
rgw/iam: fix DeleteRolePolicyResponse
cbodley Feb 18, 2024
7d402ba
rgw/auth: AssumeRole uses role account as owner
cbodley Feb 20, 2024
c844e4d
rgw/acl: always fill in DisplayName for account owners/grants
cbodley Feb 21, 2024
4246304
rgw/auth: RoleApplier matches account principals
cbodley Feb 21, 2024
27ff918
rgw/auth: RoleApplier matches paths in role arns
cbodley Feb 21, 2024
cbc6fef
rgw/auth: replace uses of verify_bucket_owner_or_policy()
cbodley Feb 21, 2024
1e3d3ea
rgw/iam: Policy takes optional tenant name
cbodley Feb 22, 2024
fcf65cb
qa/rgw: configure sts for all suites that run s3tests
cbodley Feb 24, 2024
59b5c1c
rgw: deny 'account rm' if not empty
cbodley Feb 24, 2024
7f4391e
rgw: make user email matching case-insensitive
cbodley Feb 25, 2024
b0d530e
rgw/rados: load attrs with RadosUser
cbodley Mar 1, 2024
e3d065b
rgw/auth: auth engines pass optional account info into identities
cbodley Feb 29, 2024
7668bbf
rgw/auth: pass user policies into identities
cbodley Mar 4, 2024
6400847
rgw/auth: WebIdentityApplier doesn't create shadow users for account …
cbodley Feb 29, 2024
b27faec
rgw/auth: add verify_bucket_permission() overload for custom arn
cbodley Mar 1, 2024
897d406
rgw/auth: object ops use new verify_bucket_permission() overload
cbodley Mar 1, 2024
1007add
rgw/auth: add account_id and role_id to ops log
cbodley Feb 29, 2024
fe0b232
rgw: validate account user names
cbodley Mar 4, 2024
dff8efb
rgw/auth: expose Identity::get_account()
cbodley Mar 5, 2024
442ea92
rgw: link account root to account user index
cbodley Mar 5, 2024
0adefb9
rgw/admin: user list accepts --account-id or -name
cbodley Mar 6, 2024
40c3fa5
rgw/admin: 'user modify' won't change existing account id
cbodley Mar 6, 2024
9007098
rgw/auth: log each policy that returns Allow or Deny
cbodley Mar 6, 2024
f831bb7
rgw: reject user tenant that looks like an account id
cbodley Mar 12, 2024
a192581
PendingReleaseNotes: announce the rgw user account feature
cbodley Mar 15, 2024
f7a7484
rgw/pubsub: make v2-specific calls private
cbodley Mar 8, 2024
9e87a75
rgw/pubsub: use existing s->bucket for notification ops
cbodley Mar 12, 2024
6c0c2c4
rgw/pubsub: replace log messages with error response
cbodley Mar 12, 2024
4e5dd9c
rgw/pubsub: do init/validation in init_processing()
cbodley Mar 9, 2024
28f5938
rgw/auth: rgw_common.h exposes evaluate_iam_policies()
cbodley Mar 9, 2024
a9e6255
rgw/pubsub: verify_topic_permission handles cross-account access
cbodley Mar 9, 2024
5648956
rgw/rados: add index for account topics
cbodley Mar 12, 2024
9f836ee
rgw/pubsub: when present, use account id instead of tenant
cbodley Mar 12, 2024
0ce116e
rgw/pubsub: customize permissions for account users
cbodley Mar 12, 2024
7daaef3
rgw/pubsub: notifications can refer to topics in other accounts/tenants
cbodley Mar 12, 2024
1534f8f
rgw/pubsub: return 404 NotFound instead of NoSuchKey
cbodley Mar 12, 2024
e6bf633
rgw/pubsub: add ERR_AUTHORIZATION -> AuthorizationError
cbodley Mar 12, 2024
1054929
rgw/pubsub: avoid allocating hash set of strings for attr search
cbodley Mar 14, 2024
7e5bf3d
rgw/pubsub: CreateTopic requires notification_v2 for accounts
cbodley Mar 14, 2024
9d0f9a7
rgw/pubsub: CreateTopic consults identity policies when topic doesn't…
cbodley Mar 14, 2024
06868b2
rgw/pubsub: fix DeleteTopic permissions
cbodley Mar 14, 2024
815aeaa
rgw/pubsub: CreateTopic consults existing topic policy for overwrite
cbodley Mar 15, 2024
d8046e4
test/rgw/pubsub: topic policy doesn't deny access to owner
cbodley Mar 18, 2024
83a4a45
rgw/pubsub: add/remove_persistent_topic() takes topic queue, not name
cbodley Mar 20, 2024
7137d79
rgw/pubsub: rgw_pubsub_dest stores persistent queue oid
cbodley Mar 20, 2024
4f4e9aa
rgw/pubsub: RGWPubSub::remove_topic() removes persistent queue
cbodley Mar 20, 2024
341009d
rgw/pubsub: use rgw_pubsub_dest::persistent_queue for queue oid
cbodley Mar 20, 2024
8ae3514
doc/rgw: warn about topics under account migration
cbodley Mar 20, 2024
6bc65dd
rgw/notify: publish functions use rgw_pubsub_dest::persistent_queue
cbodley Mar 28, 2024
0069760
rgw/pubsub: forward requests as s->owner instead of s->user
cbodley Mar 28, 2024
088f19a
rgw/notify: support cross-tenant and cross-account notifications
cbodley Apr 3, 2024
be33a5b
test/rgw/pubsub: test persistent notifications with account user
cbodley Apr 3, 2024
91cd085
rgw/notify: populate event userIdentity with account ids
cbodley Apr 4, 2024
f875776
qa/rgw/s3tests: remove 'client.0' from bucket prefix
cbodley Apr 4, 2024
7fa7da2
test/rgw/pubsub: wait_for_queue_to_drain() supports tenant/account to…
cbodley Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
recommend that users with versioned buckets, especially those that existed
on prior releases, use these new tools to check whether their buckets are
affected and to clean them up accordingly.
* rgw: The User Accounts feature unlocks several new AWS-compatible IAM APIs
for the self-service management of users, keys, groups, roles, policy and
more. Existing users can be adopted into new accounts. This process is optional
but irreversible. See https://docs.ceph.com/en/squid/radosgw/account and
https://docs.ceph.com/en/squid/radosgw/iam for details.
* CephFS: Running the command "ceph fs authorize" for an existing entity now
upgrades the entity's capabilities instead of printing an error. It can now
also change read/write permissions in a capability that the entity already
Expand Down
249 changes: 249 additions & 0 deletions doc/radosgw/account.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
===============
User Accounts
===============

.. versionadded:: Squid

The Ceph Object Gateway supports *user accounts* as an optional feature to
enable the self-service management of :ref:`Users <radosgw-user-management>`,
Groups and `Roles`_ similar to those in `AWS Identity and Access Management`_
(IAM).

.. _radosgw-account-root-user:

Account Root User
=================

Each account is managed by an *account root user*. Like normal users and roles,
accounts and account root users must be created by an administrator using
``radosgw-admin`` or the `Admin Ops API`_.

The account root user has default permissions on all resources owned by
the account. The root user's credentials (access and secret keys) can be
used with the `Ceph Object Gateway IAM API`_ to create additional IAM users
and roles for use with the `Ceph Object Gateway S3 API`_, as well as to
manage their associated access keys and policies.

Account owners are encouraged to use this account root user for management
only, and create users and roles with fine-grained permissions for specific
applications.

.. warning:: While the account root user does not require IAM policy to
access resources within the account, it is possible to add policy that
denies their access explicitly. Use Deny statements with caution.

Resource Ownership
==================

When a normal (non-account) user creates buckets and uploads objects, those
resources are owned by the user. The associated S3 ACLs name that user as
both the owner and grantee, and those buckets are only visible to the owning
user in a ``s3:ListBuckets`` request.

In contrast, when users or roles belong to an account, the resources they
create are instead owned by the account itself. The associated S3 ACLs name
the account id as the owner and grantee, and those buckets are visible to
``s3:ListBuckets`` requests sent by any user or role in that account.

Because the resources are owned by the account rather than its users, all
usage statistics and quota enforcement apply to the account as a whole rather
than its individual users.

Account IDs
===========

Account identifiers can be used in several places that otherwise accept
User IDs or tenant names, so Account IDs use a special format to avoid
ambiguity: the string ``RGW`` followed by 17 numeric digits like
``RGW33567154695143645``. An Account ID in that format is randomly generated
upon account creation if one is not specified.

Account IDs are commonly found in the `Amazon Resource Names`_ (ARNs) of IAM
policy documents. For example, ``arn:aws:iam::RGW33567154695143645:user/A``
refers to an IAM user named A in that account. The Ceph Object Gateway also
supports tenant names in that position.

Accounts IDs can also be used in ACLs for a ``Grantee`` of type ``CanonicalUser``.
User IDs are also supported here.

IAM Policy
==========

While non-account users are allowed to create buckets and upload objects by
default, account users start with no permissions at all.

Before an IAM user can perform API operations, some policy must be added to
allow it. The account root user can add identity policies to its users in
several ways.

* Add policy directly to the user with the ``iam:PutUserPolicy`` and
``iam:AttachUserPoliicy`` actions.

* Create an IAM group and add group policy with the ``iam:PutGroupPolicy`` and
``iam:AttachGroupPoliicy`` actions. Users added to that group with the
``iam:AddUserToGroup`` action will inherit all of the group's policy.

* Create an IAM role and add role policy with the ``iam:PutRolePolicy`` and
``iam:AttachRolePoliicy`` actions. Users that assume this role with the
``sts:AssumeRole`` and ``sts:AssumeRoleWithWebIdentity`` actions will inherit
all of the role's policy.

These identity policies are evaluated according to the rules in
`Evaluating policies within a single account`_ and
`Cross-account policy evaluation logic`_.

Principals
----------

The "Principal" ARNs in policy documents refer to users differently when they
belong to an account.

Outside of an account, user principals are named by user id such as
``arn:aws:iam:::user/uid`` or ``arn:aws:iam::tenantname:user/uid``, where
``uid`` corresponds to the ``--uid`` argument from ``radosgw-admin``.

Within an account, user principals instead use the user name, such as
``arn:aws:iam::RGW33567154695143645:user/name`` where ``name`` corresponds
to the ``--display-name`` argument from ``radosgw-admin``. Account users
continue to match the tenant form so that existing policy continues to work
when users are migrated into accounts.

Tenant Isolation
================

Like users, accounts can optionally belong to a tenant for namespace isolation
of buckets. For example, one account named "acct" can exist under a tenant "a",
and a different account named "acct" can exist under tenant "b". Refer to
:ref:`Multitenancy <rgw-multitenancy>` for details.

A tenanted account can only contain users with the same tenant name.

Regardless of tenant, account IDs and email addresses must be globally unique.

Account Management
==================

Create an Account
-----------------

To create an account::

radosgw-admin account create [--account-name={name}] [--account-id={id}] [--email={email}]

Create an Account Root User
---------------------------

To create an account root user::

radosgw-admin user create --uid={userid} --display-name={name} --account-id={accountid} --account-root --gen-secret --gen-access-key

Delete an Account
-----------------

To delete an account::

radosgw-admin account rm --account-id={accountid}

Account Stats/Quota
-------------------

To view account stats::

radosgw-admin account stats --account-id={accountid} --sync-stats

To enable an account quota::

radosgw-admin quota set --account-id={accountid} --max-size=10G
radosgw-admin quota enable --account-id={accountid}

Migrate an existing User into an Account
----------------------------------------

An existing user can be adopted into an account with ``user modify``::

radosgw-admin user modify --uid={userid} --account-id={accountid}

.. note:: Ownership of all of the user's buckets will be transferred to
the account.

.. note:: Account membership is permanent. Once added, users cannot be
removed from their account.

.. warning:: Ownership of the user's notification topics will not be
transferred to the account. Notifications will continue to work, but
the topics will no longer be visible to SNS Topic APIs. Topics and
their associated bucket notifications should be removed before migration
and recreated within the account.

Because account users have no permissions by default, some identity policy must
be added to restore the user's original permissions.

Alternatively, you may want to create a new account for each existing user. In
that case, you may want to add the ``--account-root`` option to make each user
the root user of their account.

Account Root example
--------------------

The account root user's credentials unlock the `Ceph Object Gateway IAM API`_.

This example uses `awscli`_ to create an IAM user for S3 operations.

1. Create a profile for the account root user::

$ aws --profile rgwroot configure set endpoint_url http://localhost:8000
$ aws --profile rgwroot configure
AWS Access Key ID [None]: {root access key}
AWS Secret Access Key [None]: {root secret key}
Default region name [None]: default
Default output format [None]:

2. Create an IAM user, add credentials, and attach a policy for S3 access::

$ aws --profile rgwroot iam create-user --user-name Alice
{
"User": {
"Path": "/",
"UserName": "Alice",
"UserId": "b580aa8e-14c7-4b6a-9dac-a30c640244b6",
"Arn": "arn:aws:iam::RGW63136524507535818:user/Alice",
"CreateDate": "2024-02-07T00:15:45.162786+00:00"
}
}
$ aws --profile rgwroot iam create-access-key --user-name Alice
{
"AccessKey": {
"UserName": "Alice",
"AccessKeyId": "JBNLYD5BDNRVV64J02E8",
"Status": "Active",
"SecretAccessKey": "SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr",
"CreateDate": "2024-02-07T00:16:34.679316+00:00"
}
}
$ aws --profile rgwroot iam attach-user-policy --user-name Alice \
--policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess

3. Create a profile for the S3 user::

$ aws --profile rgws3 configure set endpoint_url http://localhost:8000
$ aws --profile rgws3 configure
AWS Access Key ID [None]: JBNLYD5BDNRVV64J02E8
AWS Secret Access Key [None]: SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr
Default region name [None]: default
Default output format [None]:

4. Use the S3 user profile to create a bucket::

$ aws --profile rgws3 s3 mb s3://testbucket
make_bucket: testbucket


.. _Roles: ../role/
.. _AWS Identity and Access Management: https://aws.amazon.com/iam/
.. _Ceph Object Gateway IAM API: ../iam/
.. _Admin Ops API: ../adminops/
.. _Ceph Object Gateway S3 API: ../s3/
.. _Amazon Resource Names: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
.. _Evaluating policies within a single account: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics
.. _Cross-account policy evaluation logic: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html
.. _awscli: https://docs.aws.amazon.com/cli/latest/
18 changes: 13 additions & 5 deletions doc/radosgw/admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
After the Ceph Object Storage service is up and running, it can be administered
with user management, access controls, quotas, and usage tracking.

.. _radosgw-user-management:

User Management
===============

Ceph Object Storage user management refers only to users of the Ceph Object
Storage service and not to the Ceph Object Gateway as a user of the Ceph
Storage Cluster. Create a user, access key, and secret key to enable end users
to interact with Ceph Object Gateway services.
to interact with Ceph Object Gateway services. Optionally, the users can belong
to `Accounts`_ for ease of management.

There are two types of user:

Expand All @@ -22,12 +25,16 @@ There are two types of user:

.. ditaa::
+---------+
| User |
| Account |
+----+----+
|
| +-----------+
+-----+ Subuser |
+-----------+
| +---------+
+-----+ User |
+----+----+
|
| +-----------+
+-----+ Subuser |
+-----------+

Users and subusers can be created, modified, viewed, suspended and removed.
you may add a Display names and an email addresses can be added to user
Expand Down Expand Up @@ -892,3 +899,4 @@ example commands:
.. _radosgw-admin: ../../man/8/radosgw-admin/
.. _Pool Configuration: ../../rados/configuration/pool-pg-config-ref/
.. _Ceph Object Gateway Config Reference: ../config-ref/
.. _Accounts: ../account/