Skip to content

Commit 574d3f8

Browse files
committed
doc/rgw/account: Handling notification topics when migrating an existing user into an account
Add a subsection under "Migrate an existing User into an Account" to describe how a client can seamlessly migrate the notification topics after account migration. Fixes https://tracker.ceph.com/issues/67656 Signed-off-by: Oguzhan Ozmen <[email protected]>
1 parent 64f5bff commit 574d3f8

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

doc/radosgw/account.rst

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ An existing user can be adopted into an account with ``user modify``::
177177
.. warning:: Ownership of the user's notification topics will not be
178178
transferred to the account. Notifications will continue to work, but
179179
the topics will no longer be visible to SNS Topic APIs. Topics and
180-
their associated bucket notifications should be removed before migration
181-
and recreated within the account.
180+
their associated bucket notifications can be migrated as described below
181+
in `Migrating Notification Topics`_.
182182

183183
Because account users have no permissions by default, some identity policy must
184184
be added to restore the user's original permissions.
@@ -187,6 +187,44 @@ Alternatively, you may want to create a new account for each existing user. In
187187
that case, you may want to add the ``--account-root`` option to make each user
188188
the root user of their account.
189189

190+
Migrating Notification Topics
191+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192+
193+
Account topics are supported only when the ``notification_v2`` feature is enabled,
194+
as described in `Bucket Notifications`_ and `Supported Zone Features`_.
195+
196+
1. ``Migration Impact``: When a non-account user is migrated to an account, the
197+
the existing notification topics remain accessible through the RadosGW admin API,
198+
but the user loses access to them via the SNS Topic API. Despite this, the topics
199+
remain functional, and bucket notifications will continue to be delivered as expected.
200+
201+
2. ``Re-creation of Topics``: The account user should re-create the topics using
202+
the same names. The old topics (now inaccessible) and the new account-owned topics
203+
will coexist without interference.
204+
205+
3. ``Updating Bucket Notification Configurations``: Buckets that are subscribed to
206+
the old user-owned topics should be updated to use the new account-owned topics.
207+
To prevent duplicate notifications, maintain the same notification IDs.
208+
For example, if a bucket's existing notification configuration is:
209+
210+
.. code-block:: json
211+
212+
{"TopicConfigurations": [{ "Id": "ID1", "TopicArn": "arn:aws:sns:default::topic1", "Events": ["s3:ObjectCreated:*"]}]}
213+
214+
The updated configuration would be:
215+
216+
.. code-block:: json
217+
218+
{"TopicConfigurations": [{ "Id": "ID1", "TopicArn": "arn:aws:sns:default:RGW00000000000000001:topic1", "Events": ["s3:ObjectCreated:*"]}]}
219+
220+
In this example, `RGW00000000000000001` is the account ID, `topic1` is the
221+
topic name and `ID1` is the notification ID.
222+
223+
4. ``Removing Old Topics``: Once no buckets are subscribed to the old user-owned topics,
224+
they can be removed by an admin::
225+
226+
$ radosgw-admin topic rm --topic topic1
227+
190228
Account Root example
191229
--------------------
192230

@@ -252,3 +290,5 @@ This example uses `awscli`_ to create an IAM user for S3 operations.
252290
.. _Evaluating policies within a single account: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics
253291
.. _Cross-account policy evaluation logic: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html
254292
.. _awscli: https://docs.aws.amazon.com/cli/latest/
293+
.. _Bucket Notifications: ../notifications/
294+
.. _Supported Zone Features: ../zone-features/#supported-features

0 commit comments

Comments
 (0)