Skip to content

Commit 51012cf

Browse files
authored
Merge pull request #8269 from ovh/lso_add_support_for_whitelist_ips
Object Storage - add support for whitelist ips
2 parents 0239a0a + a90f17a commit 51012cf

File tree

15 files changed

+1989
-195
lines changed

15 files changed

+1989
-195
lines changed

pages/storage_and_backup/object_storage/s3_identity_and_access_management/guide.de-de.md

Lines changed: 135 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Object Storage - Identitäts- und Zugriffsverwaltung (EN)
33
excerpt: The purpose of this guide is to show you how to manage your identities and access your Object Storage resources
4-
updated: 2025-03-21
4+
updated: 2025-09-08
55
---
66

77
## Objective
@@ -23,11 +23,11 @@ Click `Create User`{.action}.
2323

2424
If you already have OpenStack users, you can select one of these:
2525

26-
![Add Object Storage user](images/highperf-identity-and-access-management-20220928085304931.png)
26+
![Add Object Storage user](images/highperf-identity-and-access-management-20220928085304931.png){.thumbnail}
2727

2828
then
2929

30-
![Add Object Storage user](images/highperf-identity-and-access-management-2022092808554688.png)
30+
![Add Object Storage user](images/highperf-identity-and-access-management-2022092808554688.png){.thumbnail}
3131

3232
> [!primary]
3333
>
@@ -36,11 +36,11 @@ then
3636
3737
Otherwise, create a new user:
3838

39-
![Add Object Storage user](images/highperf-identity-and-access-management-20220928085501719.png)
39+
![Add Object Storage user](images/highperf-identity-and-access-management-20220928085501719.png){.thumbnail}
4040

4141
Once your user has been created, you will see the credentials:
4242

43-
![Credentials](images/highperf-identity-and-access-management-20220928085714656.png)
43+
![Credentials](images/highperf-identity-and-access-management-20220928085714656.png){.thumbnail}
4444

4545
> [!primary]
4646
>
@@ -53,46 +53,75 @@ You can define access to your buckets via predefined profiles.
5353

5454
Click on the `...`{.action} at the end of your bucket line, then `Add a user to a container`{.action}.
5555

56-
![Add a user to a container](images/highperf-identity-and-access-management-20220928090844174.png)
56+
![Add a user to a container](images/highperf-identity-and-access-management-20220928090844174.png){.thumbnail}
5757

5858
Select the user to add to your bucket and click `Next`{.action}.
5959

60-
![Add a user to my container](images/highperf-identity-and-access-management-20220928083641625.png)
60+
![Add a user to my container](images/highperf-identity-and-access-management-20220928083641625.png){.thumbnail}
6161

6262
Set access to your bucket for this user and click on `Confirm`{.action}.
6363

64-
![Add a user to my container - Role](images/highperf-identity-and-access-management-20220928083800300.png)
64+
![Add a user to my container - Role](images/highperf-identity-and-access-management-20220928083800300.png){.thumbnail}
6565

6666
### Manage access to an object via a profile
6767

6868
You can also set access to your objects via predefined profiles.
6969

7070
Click on the `...`{.action} at the end of your object line, then `Add user to my object`{.action}.
7171

72-
![object menu](images/highperf-identity-and-access-management-20220928084137918.png)
72+
![object menu](images/highperf-identity-and-access-management-20220928084137918.png){.thumbnail}
7373

7474
Select the user and click `Next`{.action}.
7575

76-
![add user to my object](images/highperf-identity-and-access-management-20220928084222940.png)
76+
![add user to my object](images/highperf-identity-and-access-management-20220928084222940.png){.thumbnail}
7777

7878
Select the access profile for this user and click `Confirm`{.action}.
7979

80-
![add role to my object](images/highperf-identity-and-access-management-20220928084308265.png)
80+
![add role to my object](images/highperf-identity-and-access-management-20220928084308265.png){.thumbnail}
8181

8282
### Advanced resource access management
8383

84+
#### Overview
85+
86+
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.
87+
88+
Access to private resources can be granted via access policies. Access policies can be categorized broadly into 2 types :
89+
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+
> [!primary]
94+
>
95+
> Bucket policies is a feature that is not yet available for Object Storage. This article is about user policies.
96+
>
97+
8498
You can refine your permissions by importing a JSON configuration file. To do this, go to the `Object Storage Policy Users`{.action} tab.
8599

86-
![Object Storage users](images/highperf-identity-and-access-management-20220928084435242.png)
100+
![Object Storage users](images/highperf-identity-and-access-management-20220928084435242.png){.thumbnail}
87101

88102
Click on the `...`{.action} at the end of your user's line, then `Import JSON file`{.action}.
89103

90104
> [!primary]
91105
>
92106
> 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}.
107+
>
108+
109+
#### Understanding the user policy evaluation process
110+
111+
At the moment, user permissions are evaluated as follows:
112+
113+
1. if exists, evaluate user policy else fallback to ACLs
114+
1. check for an explicit deny: if there is an explicit deny, then deny permission, else, check for an explicit allow
115+
2. check for an explicit allow: if there is an explicit allow, then allow permission
116+
3. if there is no explicit deny nor explicit allow, then fallback to ACLs
117+
2. fallback to ACLs
118+
119+
> [!primary]
120+
>
121+
> This evaluation process will be subject to change with the upcoming implementation of bucket policies.
93122
>
94123
95-
Some examples of JSON configuration files:
124+
#### Some examples of JSON configuration files:
96125

97126
**Read/write access to a bucket and its objects**
98127

@@ -120,6 +149,24 @@ Some examples of JSON configuration files:
120149
}
121150
```
122151

152+
**Deny listing of all buckets owned by the parent account**
153+
154+
> [!primary]
155+
>
156+
> The (`s3:ListAllMyBuckets`) action is allowed by default for a given user. Add the `deny`{.action} effect if you want to explictly refuse the use of the `ListBuckets`{.action} API operation.
157+
>
158+
159+
```json
160+
{
161+
"Statement":[{
162+
"Sid": "DenyListBucket",
163+
"Effect": "Deny",
164+
"Action":["s3:ListAllMyBuckets"],
165+
"Resource":["*"]
166+
}]
167+
}
168+
```
169+
123170
**Allow all operations on all project resources**
124171

125172
```json
@@ -146,6 +193,80 @@ Some examples of JSON configuration files:
146193
}
147194
```
148195

196+
**Allow all operations to specific IPs by whitelisting authorized IPs**
197+
198+
```json
199+
{
200+
"Statement": {
201+
"Sid": "ExampleStatement01",
202+
"Effect": "Deny",
203+
"Action": "s3:*",
204+
"Resource": [
205+
"arn:aws:s3:::companybucket",
206+
"arn:aws:s3:::companybucket/*"
207+
],
208+
"Condition": {
209+
"NotIpAddress": {
210+
"aws:SourceIp": "10.0.0.5/16"
211+
}
212+
}
213+
}
214+
}
215+
```
216+
217+
> [!primary]
218+
>
219+
> 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.
220+
>
221+
222+
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.
223+
224+
```json
225+
{
226+
"Statement": {
227+
"Sid": "ExampleStatement01",
228+
"Effect": "Allow",
229+
"Action": [
230+
"s3:GetObject",
231+
"s3:ListBucket",
232+
"s3:ListBucketVersions"
233+
],
234+
"Resource": [
235+
"arn:aws:s3:::companybucket/*"
236+
],
237+
"Condition": {
238+
"IpAddress": {
239+
"aws:SourceIp": "10.0.0.5/16"
240+
}
241+
}
242+
}
243+
}
244+
```
245+
246+
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.
247+
248+
```json
249+
{
250+
"Statement": {
251+
"Sid": "ExampleStatement01",
252+
"Effect": "Allow",
253+
"Action": [
254+
"s3:GetObject",
255+
"s3:ListBucket",
256+
"s3:ListBucketVersions"
257+
],
258+
"Resource": [
259+
"arn:aws:s3:::companybucket/*"
260+
],
261+
"Condition": {
262+
"NotIpAddress": {
263+
"aws:SourceIp": "10.0.0.5/16"
264+
}
265+
}
266+
}
267+
}
268+
```
269+
149270
### List of supported actions
150271

151272
| Action | Scope |
@@ -176,6 +297,7 @@ Some examples of JSON configuration files:
176297
| s3:GetObjectRetention | Object |
177298
| s3:GetObjectTagging | Object |
178299
| s3:GetReplicationConfiguration | Bucket |
300+
| s3:ListAllMyBuckets | Bucket |
179301
| s3:ListBucket | Bucket |
180302
| s3:ListBucketMultipartUploads | Bucket |
181303
| s3:ListMultipartUploadParts | Object |

0 commit comments

Comments
 (0)