From 7ce6a6e92722669d9f61ebaab152c9ef6d973075 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 22 Feb 2020 21:46:01 -0800 Subject: [PATCH] Updated Amazon S3 API (markdown) --- Amazon-S3-API.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/Amazon-S3-API.md b/Amazon-S3-API.md index bcb5a12..e339036 100644 --- a/Amazon-S3-API.md +++ b/Amazon-S3-API.md @@ -45,10 +45,10 @@ You just need to create a user with all "Admin", "Read", "Write" actions. You can create as many users as needed. Each user can have multiple credentials. * The "Admin" action is needed to list, create, and delete buckets. -* The "Write" action allows uploading files within a bucket. // TODO limit Write operations to a specific bucket. -* The "Read" action allows reading and listing files within a bucket.// TODO limit Read operations to a specific bucket. - - +* The "Write" action allows uploading files to all buckets. +* The "Read" action allows reading and listing files from all buckets. +* The "Write:" action allows uploading files within a bucket, e.g., "Write:bucket1". +* The "Read:" action allows reading and listing files within a bucket, e.g., "Read:bucket2". ``` { @@ -58,7 +58,7 @@ You can create as many users as needed. Each user can have multiple credentials. "credentials": [ { "accessKey": "some_access_key1", - "secretKey": "some_secret_key2" + "secretKey": "some_secret_key1" } ], "actions": [ @@ -71,8 +71,8 @@ You can create as many users as needed. Each user can have multiple credentials. "name": "some_read_only_user", "credentials": [ { - "accessKey": "some_access_key1", - "secretKey": "some_secret_key1" + "accessKey": "some_access_key2", + "secretKey": "some_secret_key2" } ], "actions": [ @@ -83,14 +83,28 @@ You can create as many users as needed. Each user can have multiple credentials. "name": "some_normal_user", "credentials": [ { - "accessKey": "some_access_key2", - "secretKey": "some_secret_key2" + "accessKey": "some_access_key3", + "secretKey": "some_secret_key3" } ], "actions": [ "Read", "Write" ] + }, + { + "name": "user_limited_by_bucket", + "credentials": [ + { + "accessKey": "some_access_key4", + "secretKey": "some_secret_key4" + } + ], + "actions": [ + "Read:bucket1", + "Read:bucket2", + "Write:bucket1" + ] } ] }