How to replace access-key and secret-key for S3 users
This article shows you how to change S3 user access-key and secret-key, concise and easy to understand, definitely make your eyes shine, through the detailed introduction of this article I hope you can gain something.
In some scenarios, AK and SK of users need to be changed, especially in the case of leakage or personnel change. This problem can be solved by two commands.
1
Update key using radosgw-admin command
root@user:/home/demo# radosgw-admin key create --uid=s3user --gen-access-key #Create a new set of keys { "user_id": "s3user", "display_name": "s3user", "email": "", "suspended": 0, "max_buckets": 1000, "auid": 0, "subusers": [], "keys": [ { "user": "s3user", "access_key": "old-access-key", "secret_key": "old-secret-key" }, { "user": "s3user", "access_key": "new-access-key", "secret_key": "new-secret-key" } ], "swift_keys": [], "caps": [], "op_mask": "read, write, delete", "default_placement": "", "placement_tags": [], "bucket_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "user_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "temp_url_keys": []}root@user:/home/demo# radosgw-admin key rm --uid=s3user --access-key=old-access-key #Delete old key{ "user_id": "s3user", "display_name": "s3user", "email": "", "suspended": 0, "max_buckets": 1000, "auid": 0, "subusers": [], "keys": [ { "user": "s3user", "access_key": "new-access-key", "secret_key": "new-secret-key" } ], "swift_keys": [], "caps": [], "op_mask": "read, write, delete", "default_placement": "", "placement_tags": [], "bucket_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "user_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "temp_url_keys": []}2
Update the corresponding user records in the database
Update business-level database related records, if any
The above content is how to change S3 user access-key and secret-key. Have you learned knowledge or skills? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.