Skip to content

Commit cf3badc

Browse files
fix(iam): retours
1 parent 921b6e6 commit cf3badc

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

pages/iam/concepts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The Common Expression Language (CEL) is used to define expressions in [condition
3838

3939
## Conditions
4040

41-
A condition is an additional layer of restrictions for your rule. You can allow access to specific user agents or IP addresses, or restrict to certain dates and times. Conditions are defined through [CEL](#common-expression-language-cel) expressions, and can be set up and configured in the Scaleway console. Refer to the [Understanding policy conditions](/iam/reference-content/understanding-policy-conditions) documentation page to learn how they are set up and how you can define them.
41+
A condition is an additional layer of restrictions for your rule. You can allow access to specific user agents or IP addresses, and allow actions to be performed only at certain dates and times. Conditions are defined through [CEL](#common-expression-language-cel) expressions, and can be set up and configured in the Scaleway console. Refer to the [Understanding policy conditions](/iam/reference-content/understanding-policy-conditions) documentation page to learn how they are set up and how you can define them.
4242

4343
## Group
4444

pages/iam/how-to/create-policy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ An IAM [policy](/iam/reference-content/policy/) is used to define the permission
5050
7. Click **Validate** to continue.
5151
8. Choose the **permission sets** for the rule by selecting the required boxes. You can select as many permission sets as you like. The principal will have the rights defined in these permission sets within the scope you set in **step 6**. See our dedicated documentation for [more help with permission sets](/iam/reference-content/permission-sets/).
5252
9. Click **Validate**.
53-
10. (Optional) Click **+ Add new** to add one or more conditions. You can allow access to specific user agents or IP addresses, or restrict to certain dates and times.
53+
10. (Optional) Click **+ Add new** to add one or more conditions. You can allow access to specific user agents or IP addresses, and allow actions to be performed only at certain dates and times.
5454
<Message type="tip">
5555
Refer to the [Understanding policy conditions](/iam/reference-content/understanding-policy-conditions) documentation page for more details about how to write condition expressions, as well as examples of conditions.
5656
</Message>

pages/iam/quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Users you have invited to your Organization, and applications you have created,
7878
7. Click **Validate** to continue.
7979
8. Choose the **permission sets** for the rule by selecting the required boxes. You can select as many permission sets as you like. The principal will have the rights defined in these permission sets within the scope you set in **step 6**. See our dedicated documentation for [more help with permission sets](/iam/reference-content/permission-sets/).
8080
9. Click **Validate**.
81-
10. (Optional) Click **+ Add new** to add one or more conditions. You can allow access to specific user agents or IP addresses, or restrict to certain dates and times.
81+
10. (Optional) Click **+ Add new** to add one or more conditions. You can allow access to specific user agents or IP addresses, and allow actions to be performed only at certain dates and times.
8282
<Message type="tip">
8383
Refer to the [Understanding policy conditions](/iam/reference-content/understanding-policy-conditions) documentation page for more details about how to write condition expressions, as well as examples of conditions.
8484
</Message>

pages/iam/reference-content/policy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ A permission set consists of one or multiple permissions to perform actions on r
5656

5757
### Conditions
5858

59-
A condition is an additional layer of restrictions for your rule. You can allow access to specific user agents or IP addresses, or restrict to certain dates and times. Conditions are defined through [CEL](#common-expression-language-cel) expressions. In general, a condition expression consists of one or more statements that are joined by logical operators (`&&`, `||`, or `!`).
59+
A condition is an additional layer of restrictions for your rule. You can allow access to specific user agents or IP addresses, and allow actions to be performed only at certain dates and times. Conditions are defined through [CEL](#common-expression-language-cel) expressions. In general, a condition expression consists of one or more statements that are joined by logical operators (`&&`, `||`, or `!`).
6060

6161
Conditions can be set up and configured in the Scaleway console.
6262

pages/iam/reference-content/understanding-policy-conditions.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ At Scaleway, IAM conditions are defined using Common Expression Language (CEL) e
2525

2626
An expression can be compared to a conditional statement in programming. It is a logical statement that evaluates to either true or false. The result determines whether the permission set defined in the rule is applied or not.
2727

28-
Condition expressions are composed of one or several statements that declare a rule based on attributes. Attributes are like characteristics or properties of a resource or a user. For example, an attribute might be a given date or time, or an IP address.
28+
Condition expressions are composed of one or several statements that declare a rule based on attributes. Attributes are like characteristics or properties of a request, resource or a user. For example, an attribute might be a given date or time, or an IP address.
29+
30+
<Message type="note">
31+
Currently only request-based conditions are available with Scaleway IAM.
32+
</Message>
2933

3034
Expressions at Scaleway are defined in CEL, which provides a human-readable and flexible method of creating conditions.
3135

@@ -79,6 +83,8 @@ Conditions support three logical operators that can be used to build complex log
7983

8084
A function is a compound operator for data types, that supports more complex operations. In condition expressions, predefined functions can be used with a given data type.
8185

86+
All standard CEL functions are supported, as well as the following custom Scaleway IAM function(s):
87+
8288
| Function | Description | Parameters |
8389
| ------------ | ------------------- | ------ |
8490
| `inIpRange(IP: string, Subnet: string)` | Checks if the IP address is included in the IP subnet. | **IP**: (String) The IP address to check. |
@@ -121,14 +127,14 @@ request.user_agent.contains("terraform/")
121127

122128
### Time conditions
123129

124-
To check if a request was performed within a specific timeslot you can use the following expression. In this example, use weekdays from 9am to 5pm as a timestamp.
130+
To only allow actions within a specific timeslot you can use the following expression. In this example, use weekdays from 9am to 5pm as a timestamp.
125131
```
126132
request.time.getDayOfWeek() != 0 && request.time.getDayOfWeek() != 6
127133
&& request.time.getHours("Europe/Paris") < 17
128134
&& request.time.getHours("Europe/Paris") > 8
129135
```
130136

131-
To check if the request was performed over the weekend, you can use the expression below:
137+
To only allow requests that were performed over the weekend, you can use the expression below:
132138
```
133139
request.time.getDayOfWeek() != 0 && request.time.getDayOfWeek() != 6
134140
```

0 commit comments

Comments
 (0)