您好,登錄后才能下訂單哦!
本篇文章為大家展示了如何更換S3用戶access-key和secret-key,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
部分場景下需要變更用戶的AK和SK,特別是發生泄漏或者人員變更的情況,可以用兩條命令解決這個問題。
root@user:/home/demo# radosgw-admin key create --uid=s3user --gen-access-key #新建一組key { "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 #刪除舊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": [] }
更新業務層面的數據庫相關記錄(如果有的話)
上述內容就是如何更換S3用戶access-key和secret-key,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。