Skip to content

Commit 5ecdced

Browse files
Merge pull request ceph#63426 from bluikko/doc-account-formatting-radosgw
doc/radosgw: Cosmetic improvements and ref links in account.rst
2 parents 97b8f42 + e109039 commit 5ecdced

File tree

1 file changed

+80
-82
lines changed

1 file changed

+80
-82
lines changed

doc/radosgw/account.rst

Lines changed: 80 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Account Root User
1818

1919
Each account is managed by an *account root user*. Like normal users and roles,
2020
accounts and account root users must be created by an administrator using
21-
``radosgw-admin`` or the `Admin Ops API`_.
21+
``radosgw-admin`` or the :ref:`Admin Ops API <radosgw admin ops>`.
2222

2323
The account root user has default permissions on all resources owned by
2424
the account. The root user's credentials (access and secret keys) can be
2525
used with the `Ceph Object Gateway IAM API`_ to create additional IAM users
26-
and roles for use with the `Ceph Object Gateway S3 API`_, as well as to
27-
manage their associated access keys and policies.
26+
and roles for use with the :ref:`Ceph Object Gateway S3 API <radosgw s3>`, as
27+
well as to manage their associated access keys and policies.
2828

2929
Account owners are encouraged to use this account root user for management
3030
only, and create users and roles with fine-grained permissions for specific
@@ -130,45 +130,45 @@ Create an Account
130130

131131
To create an account::
132132

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

135135
Create an Account Root User
136136
---------------------------
137137

138138
To create an account root user::
139139

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

142142
Delete an Account
143143
-----------------
144144

145145
To delete an account::
146146

147-
radosgw-admin account rm --account-id={accountid}
147+
radosgw-admin account rm --account-id={accountid}
148148

149149
Account Stats/Quota
150150
-------------------
151151

152152
To view account stats::
153153

154-
radosgw-admin account stats --account-id={accountid} --sync-stats
154+
radosgw-admin account stats --account-id={accountid} --sync-stats
155155

156156
To enable an account quota::
157157

158-
radosgw-admin quota set --quota-scope=account --account-id={accountid} --max-size=10G
159-
radosgw-admin quota enable --quota-scope=account --account-id={accountid}
158+
radosgw-admin quota set --quota-scope=account --account-id={accountid} --max-size=10G
159+
radosgw-admin quota enable --quota-scope=account --account-id={accountid}
160160

161161
To enable a bucket quota for the account::
162162

163-
radosgw-admin quota set --quota-scope=bucket --account-id={accountid} --max-objects=1000000
164-
radosgw-admin quota enable --quota-scope=bucket --account-id={accountid}
163+
radosgw-admin quota set --quota-scope=bucket --account-id={accountid} --max-objects=1000000
164+
radosgw-admin quota enable --quota-scope=bucket --account-id={accountid}
165165

166-
Migrate an existing User into an Account
166+
Migrate an Existing User into an Account
167167
----------------------------------------
168168

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

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

173173
.. note:: Ownership of all of the user's buckets will be transferred to
174174
the account.
@@ -200,99 +200,97 @@ Migrating Notification Topics
200200
Account topics are supported only when the ``notification_v2`` feature is enabled,
201201
as described in `Bucket Notifications`_ and `Supported Zone Features`_.
202202

203-
1. ``Migration Impact``: When a non-account user is migrated to an account, the
204-
the existing notification topics remain accessible through the RadosGW admin API,
205-
but the user loses access to them via the SNS Topic API. Despite this, the topics
206-
remain functional, and bucket notifications will continue to be delivered as expected.
203+
#. **Migration Impact:** When a non-account user is migrated to an account, the
204+
the existing notification topics remain accessible through the RADOS Gateway admin API,
205+
but the user loses access to them via the SNS Topic API. Despite this, the topics
206+
remain functional, and bucket notifications will continue to be delivered as expected.
207207

208-
2. ``Re-creation of Topics``: The account user should re-create the topics using
209-
the same names. The old topics (now inaccessible) and the new account-owned topics
210-
will coexist without interference.
208+
#. **Re-creation of Topics:** The account user should re-create the topics using
209+
the same names. The old topics (now inaccessible) and the new account-owned topics
210+
will coexist without interference.
211211

212-
3. ``Updating Bucket Notification Configurations``: Buckets that are subscribed to
213-
the old user-owned topics should be updated to use the new account-owned topics.
214-
To prevent duplicate notifications, maintain the same notification IDs.
215-
For example, if a bucket's existing notification configuration is:
212+
#. **Updating Bucket Notification Configurations:** Buckets that are subscribed to
213+
the old user-owned topics should be updated to use the new account-owned topics.
214+
To prevent duplicate notifications, maintain the same notification IDs.
215+
For example, if a bucket's existing notification configuration is:
216216

217-
.. code-block:: json
217+
.. code-block:: json
218218
219219
{"TopicConfigurations": [{ "Id": "ID1", "TopicArn": "arn:aws:sns:default::topic1", "Events": ["s3:ObjectCreated:*"]}]}
220220
221-
The updated configuration would be:
221+
The updated configuration would be:
222222

223-
.. code-block:: json
223+
.. code-block:: json
224224
225225
{"TopicConfigurations": [{ "Id": "ID1", "TopicArn": "arn:aws:sns:default:RGW00000000000000001:topic1", "Events": ["s3:ObjectCreated:*"]}]}
226226
227-
In this example, `RGW00000000000000001` is the account ID, `topic1` is the
228-
topic name and `ID1` is the notification ID.
227+
In this example, ``RGW00000000000000001`` is the account ID, ``topic1`` is the
228+
topic name and ``ID1`` is the notification ID.
229229

230-
4. ``Removing Old Topics``: Once no buckets are subscribed to the old user-owned topics,
231-
they can be removed by an admin::
230+
#. **Removing Old Topics:** Once no buckets are subscribed to the old user-owned topics,
231+
they can be removed by an admin::
232232

233-
$ radosgw-admin topic rm --topic topic1
233+
$ radosgw-admin topic rm --topic topic1
234234

235-
Account Root example
235+
Account Root Example
236236
--------------------
237237

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

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

242-
1. Create a profile for the account root user::
243-
244-
$ aws --profile rgwroot configure set endpoint_url http://localhost:8000
245-
$ aws --profile rgwroot configure
246-
AWS Access Key ID [None]: {root access key}
247-
AWS Secret Access Key [None]: {root secret key}
248-
Default region name [None]: default
249-
Default output format [None]:
250-
251-
2. Create an IAM user, add credentials, and attach a policy for S3 access::
252-
253-
$ aws --profile rgwroot iam create-user --user-name Alice
254-
{
255-
"User": {
256-
"Path": "/",
257-
"UserName": "Alice",
258-
"UserId": "b580aa8e-14c7-4b6a-9dac-a30c640244b6",
259-
"Arn": "arn:aws:iam::RGW63136524507535818:user/Alice",
260-
"CreateDate": "2024-02-07T00:15:45.162786+00:00"
261-
}
262-
}
263-
$ aws --profile rgwroot iam create-access-key --user-name Alice
264-
{
265-
"AccessKey": {
266-
"UserName": "Alice",
267-
"AccessKeyId": "JBNLYD5BDNRVV64J02E8",
268-
"Status": "Active",
269-
"SecretAccessKey": "SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr",
270-
"CreateDate": "2024-02-07T00:16:34.679316+00:00"
271-
}
272-
}
273-
$ aws --profile rgwroot iam attach-user-policy --user-name Alice \
274-
--policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess
275-
276-
3. Create a profile for the S3 user::
277-
278-
$ aws --profile rgws3 configure set endpoint_url http://localhost:8000
279-
$ aws --profile rgws3 configure
280-
AWS Access Key ID [None]: JBNLYD5BDNRVV64J02E8
281-
AWS Secret Access Key [None]: SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr
282-
Default region name [None]: default
283-
Default output format [None]:
284-
285-
4. Use the S3 user profile to create a bucket::
286-
287-
$ aws --profile rgws3 s3 mb s3://testbucket
288-
make_bucket: testbucket
242+
#. Create a profile for the account root user::
243+
244+
$ aws --profile rgwroot configure set endpoint_url http://localhost:8000
245+
$ aws --profile rgwroot configure
246+
AWS Access Key ID [None]: {root access key}
247+
AWS Secret Access Key [None]: {root secret key}
248+
Default region name [None]: default
249+
Default output format [None]:
250+
251+
#. Create an IAM user, add credentials, and attach a policy for S3 access::
252+
253+
$ aws --profile rgwroot iam create-user --user-name Alice
254+
{
255+
"User": {
256+
"Path": "/",
257+
"UserName": "Alice",
258+
"UserId": "b580aa8e-14c7-4b6a-9dac-a30c640244b6",
259+
"Arn": "arn:aws:iam::RGW63136524507535818:user/Alice",
260+
"CreateDate": "2024-02-07T00:15:45.162786+00:00"
261+
}
262+
}
263+
$ aws --profile rgwroot iam create-access-key --user-name Alice
264+
{
265+
"AccessKey": {
266+
"UserName": "Alice",
267+
"AccessKeyId": "JBNLYD5BDNRVV64J02E8",
268+
"Status": "Active",
269+
"SecretAccessKey": "SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr",
270+
"CreateDate": "2024-02-07T00:16:34.679316+00:00"
271+
}
272+
}
273+
$ aws --profile rgwroot iam attach-user-policy --user-name Alice \
274+
--policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess
275+
276+
#. Create a profile for the S3 user::
277+
278+
$ aws --profile rgws3 configure set endpoint_url http://localhost:8000
279+
$ aws --profile rgws3 configure
280+
AWS Access Key ID [None]: JBNLYD5BDNRVV64J02E8
281+
AWS Secret Access Key [None]: SnHoE700kdNuT22K8Bhy2iL3DwZU0sUSDI1gUXHr
282+
Default region name [None]: default
283+
Default output format [None]:
284+
285+
#. Use the S3 user profile to create a bucket::
286+
287+
$ aws --profile rgws3 s3 mb s3://testbucket
288+
make_bucket: testbucket
289289

290290

291291
.. _Roles: ../role/
292292
.. _AWS Identity and Access Management: https://aws.amazon.com/iam/
293293
.. _Ceph Object Gateway IAM API: ../iam/
294-
.. _Admin Ops API: ../adminops/
295-
.. _Ceph Object Gateway S3 API: ../s3/
296294
.. _Amazon Resource Names: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
297295
.. _Evaluating policies within a single account: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics
298296
.. _Cross-account policy evaluation logic: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html

0 commit comments

Comments
 (0)