You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/storage_and_backup/object_storage/s3_identity_and_access_management/guide.en-gb.md
+58-18Lines changed: 58 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,23 @@ Select the access profile for this user and click `Confirm`{.action}.
81
81
82
82
### Advanced resource access management
83
83
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
+
84
101
You can refine your permissions by importing a JSON configuration file. To do this, go to the `Object Storage Policy Users`{.action} tab.
@@ -91,8 +108,25 @@ Click on the `...`{.action} at the end of your user's line, then `Import JSON fi
91
108
>
92
109
> 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}.
93
110
>
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
94
121
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:
96
130
97
131
**Read/write access to a bucket and its objects**
98
132
@@ -164,53 +198,59 @@ Some examples of JSON configuration files:
164
198
}
165
199
```
166
200
167
-
168
-
**Allow read access to objects only to specific IPs**
201
+
**Allow all operations to specific IPs by whitelisting authorized IPs**
169
202
170
203
```json
171
204
{
172
205
"Statement": {
173
206
"Sid": "ExampleStatement01",
174
-
"Effect": "Allow",
175
-
"Action": [
176
-
"s3:GetObject",
177
-
"s3:ListBucket",
178
-
"s3:ListBucketVersions"
179
-
],
207
+
"Effect": "Deny",
208
+
"Action": "s3:*",
180
209
"Resource": [
210
+
"arn:aws:s3:::companybucket",
181
211
"arn:aws:s3:::companybucket/*"
182
212
],
183
213
"Condition": {
184
-
"IpAddress": {
214
+
"NotIpAddress": {
185
215
"aws:SourceIp": "10.0.0.5/16"
186
216
}
187
217
}
188
218
}
189
-
}
219
+
}
190
220
```
191
221
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.
193
230
194
231
```json
195
232
{
196
233
"Statement": {
197
234
"Sid": "ExampleStatement01",
198
-
"Effect": "Deny",
199
-
"Action": "s3:*",
235
+
"Effect": "Allow",
236
+
"Action": [
237
+
"s3:GetObject",
238
+
"s3:ListBucket",
239
+
"s3:ListBucketVersions"
240
+
],
200
241
"Resource": [
201
-
"arn:aws:s3:::companybucket",
202
242
"arn:aws:s3:::companybucket/*"
203
243
],
204
244
"Condition": {
205
-
"NotIpAddress": {
245
+
"IpAddress": {
206
246
"aws:SourceIp": "10.0.0.5/16"
207
247
}
208
248
}
209
249
}
210
-
}
250
+
}
211
251
```
212
252
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.
0 commit comments