MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
bin/radosgw-admin user create --display-name "Hello World" --tenant world --uid hello --access_key hello --secret_key world
bin/radosgw-admin user create --display-name "Ka Boom" --tenant boom --uid ka --access_key ka --secret_key boom
- create the same http topic in both tenants:
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \
--attributes='{"push-endpoint": "http://localhost:10900"}'
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \
--attributes='{"push-endpoint": "http://localhost:10900"}'
- topic access cross tenant:
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 sns get-topic-attributes \
--topic-arn arn:aws:sns:default:boom:fishtopic
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 sns get-topic-attributes \
--topic-arn arn:aws:sns:default:world:fishtopic
- create a topic that exists only for one of the tenants:
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 sns create-topic --name=dogtopic \
--attributes='{"push-endpoint": "http://localhost:10900"}'
- try to access it from the other tenent:
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 sns get-topic-attributes \
--debug --topic-arn arn:aws:sns:default:world:dogtopic
- create a bucket for 2nd tenant:
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 s3 mb s3://cat
- 2nd tenant create a notification on the bucket using the 1st tenant's topic:
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration \
--bucket cat --notification-configuration='{"TopicConfigurations": [{"Id": "notif1", "TopicArn": "arn:aws:sns:default:world:dogtopic", "Events": []}]}'
- 1st tenant create a notification on the 2nd tenet's bucket: