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/iam/concepts.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ The Common Expression Language (CEL) is used to define expressions in [condition
38
38
39
39
## Conditions
40
40
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.
Copy file name to clipboardExpand all lines: pages/iam/how-to/create-policy.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ An IAM [policy](/iam/reference-content/policy/) is used to define the permission
50
50
7. Click **Validate** to continue.
51
51
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/).
52
52
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.
54
54
<Messagetype="tip">
55
55
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.
Copy file name to clipboardExpand all lines: pages/iam/quickstart.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Users you have invited to your Organization, and applications you have created,
78
78
7. Click **Validate** to continue.
79
79
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/).
80
80
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.
82
82
<Messagetype="tip">
83
83
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.
Copy file name to clipboardExpand all lines: pages/iam/reference-content/policy.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ A permission set consists of one or multiple permissions to perform actions on r
56
56
57
57
### Conditions
58
58
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 `!`).
60
60
61
61
Conditions can be set up and configured in the Scaleway console.
Copy file name to clipboardExpand all lines: pages/iam/reference-content/understanding-policy-conditions.mdx
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,11 @@ At Scaleway, IAM conditions are defined using Common Expression Language (CEL) e
25
25
26
26
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.
27
27
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
+
<Messagetype="note">
31
+
Currently only request-based conditions are available with Scaleway IAM.
32
+
</Message>
29
33
30
34
Expressions at Scaleway are defined in CEL, which provides a human-readable and flexible method of creating conditions.
31
35
@@ -79,6 +83,8 @@ Conditions support three logical operators that can be used to build complex log
79
83
80
84
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.
81
85
86
+
All standard CEL functions are supported, as well as the following custom Scaleway IAM function(s):
87
+
82
88
| Function | Description | Parameters |
83
89
| ------------ | ------------------- | ------ |
84
90
|`inIpRange(IP: string, Subnet: string)`| Checks if the IP address is included in the IP subnet. |**IP**: (String) The IP address to check. |
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.
0 commit comments