Skip to content

Commit fa0d1b2

Browse files
authored
Update guide.en-gb.md
overhaul user policy doc to explain that implicit deny is not supported
1 parent 07920e7 commit fa0d1b2

File tree

1 file changed

+58
-18
lines changed
  • pages/storage_and_backup/object_storage/s3_identity_and_access_management

1 file changed

+58
-18
lines changed

pages/storage_and_backup/object_storage/s3_identity_and_access_management/guide.en-gb.md

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ Select the access profile for this user and click `Confirm`{.action}.
8181

8282
### Advanced resource access management
8383

84+
#### Overview
85+
By default, all resources (buckets, objects) and sub-resources (lifecycle configuration, webite configuration, ...etc) are private in Object Storage. Only the resource owner, i.e the user account that creates it, has full control.
86+
87+
Access to private resources can be granted via access policies.
88+
89+
Access policies can be categorized broadly into 2 types :
90+
- user based: access policies attached to a specific user are called user policies. A user policy is evaluated using Object Storage IAM permissions and applies only to the specific user it is attached to.
91+
- resource based : bucket policies and ACLs are policies that are attached directly to specific resources
92+
93+
Access policies attached to a specific user are called user policies. A user policy is evaluated using Object Storage IAM permissions and applies only to the specific user it is attached to.
94+
95+
> [!primary]
96+
>
97+
> Bucket policies is a feature that is not yet available for Object Storage. This article is about user policies.
98+
>
99+
>
100+
84101
You can refine your permissions by importing a JSON configuration file. To do this, go to the `Object Storage Policy Users`{.action} tab.
85102

86103
![Object Storage users](images/highperf-identity-and-access-management-20220928084435242.png)
@@ -91,8 +108,25 @@ Click on the `...`{.action} at the end of your user's line, then `Import JSON fi
91108
>
92109
> If you want to change a user's rights, you may need to download the JSON configuration file in advance by selecting `Download JSON File`{.action}.
93110
>
111+
>
112+
113+
114+
#### Understanding the user policy evaluation process
115+
At the moment, user permissions are evaluated as follows:
116+
1. if exists, evaluate user policy<br>
117+
1.1 check for an explicit deny: if there is an explicit deny, then deny permission, else, check for an explicit allow<br>
118+
1.2 check for an explicit allow: if there is an explicit allow, then allow permission<br>
119+
1.3 if there is no explicit deny nor explicit allow, then fallback to ACLs<br>
120+
2. fallback to ACLs
94121

95-
Some examples of JSON configuration files:
122+
> [!primary]
123+
>
124+
> This evaluation process will be subject to change with the upcoming implementation of bucket policies.
125+
>
126+
>
127+
128+
129+
#### Some examples of JSON configuration files:
96130

97131
**Read/write access to a bucket and its objects**
98132

@@ -164,53 +198,59 @@ Some examples of JSON configuration files:
164198
}
165199
```
166200

167-
168-
**Allow read access to objects only to specific IPs**
201+
**Allow all operations to specific IPs by whitelisting authorized IPs**
169202

170203
```json
171204
{
172205
"Statement": {
173206
"Sid": "ExampleStatement01",
174-
"Effect": "Allow",
175-
"Action": [
176-
"s3:GetObject",
177-
"s3:ListBucket",
178-
"s3:ListBucketVersions"
179-
],
207+
"Effect": "Deny",
208+
"Action": "s3:*",
180209
"Resource": [
210+
"arn:aws:s3:::companybucket",
181211
"arn:aws:s3:::companybucket/*"
182212
],
183213
"Condition": {
184-
"IpAddress": {
214+
"NotIpAddress": {
185215
"aws:SourceIp": "10.0.0.5/16"
186216
}
187217
}
188218
}
189-
}
219+
}
190220
```
191221

192-
**Allow all operations to specific IPs by whitelisting authorized IPs**
222+
223+
224+
> [!primary]
225+
>
226+
> As a consequence of the current authorization process, **implicit** deny is **not** supported by OVHcloud Object Storage if the user is the bucket owner i.e since ACLs are evaluated by default and since the bucket owner has FULL_CONTROL ACL, if the user is the bucket owner and even if there is no explicit allow in the policy file, he will be authorized.
227+
>
228+
229+
The following policy to attempt to allow read access to objects only to specific IPs will **not** work under current conditions if attached to the bucket owner i.e even if the bucket owner makes his requests from IPs that are not in the specified range, he will be authorized.
193230

194231
```json
195232
{
196233
"Statement": {
197234
"Sid": "ExampleStatement01",
198-
"Effect": "Deny",
199-
"Action": "s3:*",
235+
"Effect": "Allow",
236+
"Action": [
237+
"s3:GetObject",
238+
"s3:ListBucket",
239+
"s3:ListBucketVersions"
240+
],
200241
"Resource": [
201-
"arn:aws:s3:::companybucket",
202242
"arn:aws:s3:::companybucket/*"
203243
],
204244
"Condition": {
205-
"NotIpAddress": {
245+
"IpAddress": {
206246
"aws:SourceIp": "10.0.0.5/16"
207247
}
208248
}
209249
}
210-
}
250+
}
211251
```
212252

213-
**Deny read access to objects to specific IPs by blacklisting unauthorized IPs**
253+
The following policy to attempt to deny read access to objects to specific IPs by blacklisting unauthorized IPs will **not** work under current conditions if attached to the bucket owner because there is no explicit deny and requests from the specified IPs will not match the allow, therefore, we fallback to the ACLs.
214254

215255
```json
216256
{

0 commit comments

Comments
 (0)