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
#Customer intent: As a dev, devops, or it admin, I want to learn how to constrain access within a role assignment by using conditions.
@@ -55,23 +55,19 @@ For more information about how to create these examples, see [Examples of Azure
55
55
56
56
## Where can conditions be added?
57
57
58
-
Currently, conditions can be added to built-in or custom role assignments that have [storage blob data actions](conditions-format.md#actions). These include the following built-in roles:
58
+
Currently, conditions can be added to built-in or custom role assignments that have [blob storage or queue storage data actions](conditions-format.md#actions). Conditions are added at the same scope as the role assignment. Just like role assignments, you must have `Microsoft.Authorization/roleAssignments/write` permissions to add a condition.
59
59
60
-
-[Storage Blob Data Contributor](built-in-roles.md#storage-blob-data-contributor)
61
-
-[Storage Blob Data Owner](built-in-roles.md#storage-blob-data-owner)
62
-
-[Storage Blob Data Reader](built-in-roles.md#storage-blob-data-reader)
60
+
Here are some of the [blob storage attributes](../storage/common/storage-auth-abac-attributes.md#azure-blob-storage-attributes) you can use in your conditions.
63
61
64
-
Conditions are added at the same scope as the role assignment. Just like role assignments, you must have `Microsoft.Authorization/roleAssignments/write` permissions to add a condition.
65
-
66
-
Here are the storage attributes you can use in your conditions.
67
-
68
-
- Container name
69
-
- Blob path
70
-
- Blob index tags keys
62
+
- Account name
71
63
- Blob index tags
72
-
73
-
> [!TIP]
74
-
> Blobs also support the ability to store arbitrary user-defined key-value metadata. Although metadata is similar to blob index tags, you must use blob index tags with conditions. For more information, see [Manage and find Azure Blob data with blob index tags (preview)](../storage/blobs/storage-manage-find-blobs.md).
64
+
- Blob path
65
+
- Blob prefix
66
+
- Container name
67
+
- Encryption scope name
68
+
- Is hierarchical namespace enabled
69
+
- Snapshot
70
+
- Version ID
75
71
76
72
## What does a condition look like?
77
73
@@ -85,7 +81,7 @@ If Chandra tries to read a blob without the Project=Cascade tag, access will not
85
81
86
82
Here is what the condition looks like in the Azure portal:
87
83
88
-

84
+
:::image type="content" source="./media/shared/condition-expressions.png" alt-text="Screenshot of condition editor in Azure portal showing build expression section with values for blob index tags." lightbox="./media/shared/condition-expressions.png":::
89
85
90
86
Here is what the condition looks like in code:
91
87
@@ -107,14 +103,15 @@ For more information about the format of conditions, see [Azure role assignment
107
103
108
104
## Features of conditions
109
105
110
-
Here's a list of the some of the primary features of conditions:
106
+
Here's a list of the primary features of conditions:
111
107
112
108
| Feature | Status | Date |
113
109
| --- | --- | --- |
114
-
| Add conditions to Storage Blob Data role assignments | Preview | May 2021 |
110
+
| Use the following [attributes](../storage/common/storage-auth-abac-attributes.md#azure-blob-storage-attributes) in a condition: Account name, Blob prefix, Encryption scope name, Is hierarchical namespace enabled, Snapshot, Version ID | Preview | May 2022 |
111
+
| Use [custom security attributes on a principal in a condition](conditions-format.md#principal-attributes)| Preview | November 2021 |
112
+
| Add conditions to blob storage data role assignments | Preview | May 2021 |
115
113
| Use attributes on a resource in a condition | Preview | May 2021 |
116
114
| Use attributes that are part of the action request in a condition | Preview | May 2021 |
117
-
| Use custom security attributes on a principal in a condition | Preview | November 2021 |
118
115
119
116
## Conditions and Privileged Identity Management (PIM)
120
117
@@ -132,6 +129,13 @@ To better understand Azure RBAC and Azure ABAC, you can refer back to the follow
132
129
| attribute | In this context, a key-value pair such as Project=Blue, where Project is the attribute key and Blue is the attribute value. Attributes and tags are synonymous for access control purposes. |
133
130
| expression | A statement in a condition that evaluates to true or false. An expression has the format of <attribute><operator><value>. |
134
131
132
+
## Limits
133
+
134
+
Here are some of the limits for conditions.
135
+
136
+
| Resource | Limit | Notes |
137
+
| --- | --- | --- |
138
+
| Number of expressions per condition using the visual editor | 5 | You can add more than five expressions using the code editor |
@@ -187,12 +187,36 @@ Fix any [condition format or syntax](conditions-format.md) issues. Alternatively
187
187
188
188
**Cause**
189
189
190
-
If you copy a condition from a document, it might include special characters and cause errors. Some editors (such as Microsoft Word) add control characters when formatting text that does not appear.
190
+
If you use PowerShell and copy a condition from a document, it might include special characters that cause the following error. Some editors (such as Microsoft Word) add control characters when formatting text that does not appear.
191
+
192
+
`The given role assignment condition is invalid.`
191
193
192
194
**Solution**
193
195
194
196
If you copied a condition from a rich text editor and you are certain the condition is correct, delete all spaces and returns and then add back the relevant spaces. Alternatively, use a plain text editor or a code editor, such as Visual Studio Code.
195
197
198
+
## Symptom - Attribute does not apply error in visual editor for previously saved condition
199
+
200
+
When you open a previously saved condition in the visual editor, you get the following message:
201
+
202
+
`Attribute does not apply for the selected actions. Select a different set of actions.`
203
+
204
+
**Cause**
205
+
206
+
In May 2022, the Read a blob action was changed from the following format:
0 commit comments