Skip to content

Commit cbc5899

Browse files
committed
add comment about FS permission
Signed-off-by: shirady <[email protected]>
1 parent 06b18b2 commit cbc5899

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/NooBaaNonContainerized/S3Ops.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ The following lists describe the bucket and object operations available in NooBa
4545
- Bucket policies are an access policy option available to grant permission to buckets and objects (see [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-policies.html) in AWS documentation). You can use bucket policies to add or deny permissions for the objects in a bucket. Bucket policies can allow or deny requests based on the elements in the policy.
4646
- Bucket policies use JSON-based policy language (for more information see [basic elements in bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html) in AWS documentation)
4747
- Bucket policy can be added to a bucket using the S3 API or the noobaa-cli.
48+
- Bucket policy is an additional layer of permission to the FS permission (UID and GID), which mean that if two accounts do not have the same permissions (UID, GID) just setting bucket policy on the bucket is not enough.
4849

4950
**Prerequisites**
50-
An account and an bucket, for bucket policy management using the S3 API you would use the NooBaa service.
51+
2 accounts and an bucket owned by one of the accounts.
52+
For bucket policy management using the S3 API you would use the NooBaa service.
5153

5254
#### Bucket Policy in NooBaa CLI
5355
1. Adding a bucket policy:
@@ -60,7 +62,8 @@ In both cases the argument for the bucket policy is a string
6062
bucket_policy as a string example:
6163
`'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["<account-name>"]},"Action":["s3:*"],"Resource":["arn:aws:s3:::<bucket-name>/*","arn:aws:s3:::<bucket-name>"]}]}'`
6264

63-
Replace `<account-name>` with account name and `<bucket-name>` with a bucket name
65+
Replace `<account-name>` with account name and `<bucket-name>` with a bucket name.
66+
Note: `arn:aws:s3:::<bucket-name>` for S3 bucket operations and `arn:aws:s3:::<bucket-name>/*` for S3 object operations.
6467
Warning: this policy allows `<account-name>` to run all S3 operations.
6568

6669
#### Bucket Policy in S3 API (using AWS CLI)
@@ -82,7 +85,8 @@ policy.json example:
8285
]
8386
}
8487
```
85-
Replace `<account-name>` with account name and `<bucket-name>` with a bucket name
88+
Replace `<account-name>` with account name and `<bucket-name>` with a bucket name.
89+
Note: `arn:aws:s3:::<bucket-name>` for S3 bucket operations and `arn:aws:s3:::<bucket-name>/*` for S3 object operations.
8690
Warning: this policy allows `<account-name>` to run all S3 operations.
8791

8892
##### Principal Field:

0 commit comments

Comments
 (0)