Skip to content

Commit e96ef2e

Browse files
authored
Merge pull request #206261 from jimmart-dev/jammart-abac-environ-attr
add refs to environ attributes where appropriate
2 parents 9951859 + 542a0f9 commit e96ef2e

25 files changed

+1107
-189
lines changed

articles/role-based-access-control/conditions-faq.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: role-based-access-control
88
ms.subservice: conditions
99
ms.topic: conceptual
1010
ms.workload: identity
11-
ms.date: 10/24/2022
11+
ms.date: 05/09/2023
1212
ms.author: rolyon
1313

1414
#Customer intent:
@@ -18,10 +18,14 @@ ms.author: rolyon
1818

1919
## Frequently asked questions
2020

21-
**Can you pick the storage container names or blob path in the condition builder in the Azure portal?**
21+
**Can you pick the storage container names or blob path in the visual ABAC condition builder in the Azure portal?**
2222

2323
You must write the storage container name, blob path, tag name, or values in the condition. There is no picking experience for the attribute values.
2424

25+
**Can you check for the existence of an attribute from a condition?**
26+
27+
You can use the `Exists` operator with any ABAC attribute, but it is only supported in the visual ABAC condition builder for a few of them. You can add the `Exists` operator to any attribute using other tools, such as [PowerShell](conditions-role-assignments-powershell.md), the [Azure CLI](conditions-role-assignments-cli.md), the [REST API](conditions-role-assignments-rest.md), and the condition code editor in the Azure portal. For a list of attributes for which it is supported in the visual condition builder, see [the *Exists* function operator](conditions-format.md#exists). To add the exists operator to an attribute when building an expression in a condition, select the supported source and attribute, then select the box next to **Exists** under it. See [Build expressions in the portal](conditions-role-assignments-portal.md#step-5-build-expressions) for more details.
28+
2529
**Can you group expressions?**
2630

2731
If you add three or more expressions for a targeted action, you must define the logical grouping of those expressions in the code editor, Azure PowerShell, or Azure CLI. A logical grouping of `a AND b OR c` can be either `(a AND b) OR c` or `a AND (b OR c )`.
@@ -59,7 +63,7 @@ A condition is only applied to the specific targeted actions.
5963

6064
**What are the limits for a condition?**
6165

62-
A condition can be up to to 8 KB long.
66+
A condition can be up to 8 KB long.
6367

6468
**What are the limits for a description?**
6569

articles/role-based-access-control/conditions-format.md

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: role-based-access-control
88
ms.subservice: conditions
99
ms.topic: conceptual
1010
ms.workload: identity
11-
ms.date: 10/24/2022
11+
ms.date: 05/09/2023
1212
ms.author: rolyon
1313

1414
#Customer intent: As a dev, devops, or it admin, I want to learn about the conditions so that I write more complex conditions.
@@ -238,28 +238,53 @@ Currently, conditions can be added to built-in or custom role assignments that h
238238
- [Storage Queue Data Message Sender](built-in-roles.md#storage-queue-data-message-sender)
239239
- [Storage Queue Data Reader](built-in-roles.md#storage-queue-data-reader)
240240

241-
For a list of the storage actions you can use in conditions, see [Actions and attributes for Azure role assignment conditions for Azure Blob Storage](../storage/blobs/storage-auth-abac-attributes.md) and [Actions and attributes for Azure role assignment conditions for Azure queues](../storage/queues/queues-auth-abac-attributes.md).
241+
For a list of the storage actions you can use in conditions, see:
242+
243+
- [Actions and attributes for Azure role assignment conditions for Azure Blob Storage](../storage/blobs/storage-auth-abac-attributes.md)
244+
- [Actions and attributes for Azure role assignment conditions for Azure Queue Storage](../storage/queues/queues-auth-abac-attributes.md).
242245

243246
## Attributes
244247

245-
Depending on the selected actions, the attribute might be found in different places. If you select multiple actions for a single condition, there might be fewer attributes to choose from for your condition because the attributes must be available across the selected actions. To specify an attribute, you must include the source as a prefix.
248+
Depending on the selected actions, the attribute might be found in different places. If you select multiple actions for a single condition, there might be fewer attributes to choose from for your condition because the attributes must be available across all of the selected actions. To specify an attribute, you must include the source as a prefix.
246249

247250
> [!div class="mx-tableFixed"]
248251
> | Attribute source | Description | Code |
249252
> | --- | --- | --- |
250-
> | Resource | Indicates that the attribute is on the resource, such as a container name. | `@Resource` |
251-
> | Request | Indicates that the attribute is part of the action request, such as setting the blob index tag. | `@Request` |
252-
> | Principal | Indicates that the attribute is an Azure AD custom security attribute on the principal, such as a user, enterprise application (service principal), or managed identity. Principal attributes are currently in preview. | `@Principal` |
253+
> | [Environment](#environment-attributes) | Indicates that the attribute is associated with the environment of the request, such as the network origin of the request or the current date and time.</br>***(Environment attributes are currently in preview.)*** | `@Environment` |
254+
> | [Principal](#principal-attributes) | Indicates that the attribute is an Azure AD custom security attribute on the principal, such as a user, enterprise application (service principal), or managed identity.</br>***(Principal attributes are currently in preview.)*** | `@Principal` |
255+
> | [Request](#request-attributes) | Indicates that the attribute is part of the action request, such as setting the blob index tag. | `@Request` |
256+
> | [Resource](#resource-attributes) | Indicates that the attribute is a property of the resource, such as a container name. | `@Resource` |
253257
254-
#### Resource and request attributes
258+
For a complete list of the storage attributes you can use in conditions, see:
255259

256-
For a list of the blob storage or queue storage attributes you can use in conditions, see:
260+
- [Azure Blob Storage attributes](../storage/blobs/storage-auth-abac-attributes.md#azure-blob-storage-attributes)
261+
- [Azure Queue Storage attributes](../storage/queues/queues-auth-abac-attributes.md#azure-queues-storage-attributes)
257262

258-
- [Actions and attributes for Azure role assignment conditions for Azure Blob Storage](../storage/blobs/storage-auth-abac-attributes.md)
259-
- [Actions and attributes for Azure role assignment conditions for Azure queues](../storage/queues/queues-auth-abac-attributes.md)
263+
#### Environment attributes
264+
265+
Environment attributes are associated with the circumstances under which the access request is made, such as the date and time of day or the network environment. The network environment might be whether access is over a specific private endpoint or a virtual network subnet, or perhaps over any private link.
266+
267+
> [!IMPORTANT]
268+
> Environment attributes are currently in PREVIEW.
269+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
270+
271+
The following table lists the supported environment attributes for conditions.
272+
273+
| Display name | Description | Attribute | Type |
274+
| --- | --- | --- | --- |
275+
| Subnet<sup>1</sup> | Use this attribute in conditions to restrict access from a specific subnet. | `Microsoft.Network/virtualNetworks/subnets` | [String](#string-comparison-operators) |
276+
| Private endpoint<sup>2</sup> | Use this attribute in conditions to restrict access over a specific private endpoint. | `Microsoft.Network/privateEndpoints` | [String](#string-comparison-operators) |
277+
| Is private link | Use this attribute in conditions to require access over any private link. | `isPrivateLink` | [Boolean](#boolean-comparison-operators) |
278+
| UTC now | Use this attribute in conditions to restrict access to objects during specific time periods. | `UtcNow` | [DateTime](#datetime-comparison-operators) |
279+
280+
<sup>1</sup> You can only use the **Subnet** attribute if you currently have at least one virtual network subnet configured in your subscription.
281+
282+
<sup>2</sup> You can only use the **Private endpoint** attribute if you currently have at least one private endpoint configured in your subscription.
260283

261284
#### Principal attributes
262285

286+
Principal attributes are Azure AD custom security attributes associated with the principal requesting access to a resource. The security principal can be a user, an enterprise application (a service principal), or a managed identity.
287+
263288
> [!IMPORTANT]
264289
> Principal attributes are currently in PREVIEW.
265290
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
@@ -276,6 +301,14 @@ For more information about custom security attributes, see:
276301
- [Principal does not appear in Attribute source (Preview)](conditions-troubleshoot.md#symptom---principal-does-not-appear-in-attribute-source)
277302
- [Add or deactivate custom security attributes in Azure AD (Preview)](../active-directory/fundamentals/custom-security-attributes-add.md)
278303

304+
#### Request attributes
305+
306+
Request attributes are associated with the criteria specified in an access request, such as the specified prefix of blobs to be listed.
307+
308+
#### Resource attributes
309+
310+
Resource attributes are associated with the object to which access is being requested, such as the storage account name, container name, or whether hierarchical namespace is enabled for the storage account.
311+
279312
## Function operators
280313

281314
This section lists the function operators that are available to construct conditions.
@@ -306,7 +339,9 @@ This section lists the function operators that are available to construct condit
306339
> | **Operator** | `Exists` |
307340
> | **Description** | Checks if the specified attribute exists. |
308341
> | **Examples** | `Exists @Request[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:snapshot]` |
309-
> | **Attributes support** | [Encryption scope name](../storage/blobs/storage-auth-abac-attributes.md#encryption-scope-name)<br/>[Snapshot](../storage/blobs/storage-auth-abac-attributes.md#snapshot)<br/>[Version ID](../storage/blobs/storage-auth-abac-attributes.md#version-id) |
342+
> | **Attributes support** <sup>1</sup>| [Encryption scope name](../storage/blobs/storage-auth-abac-attributes.md#encryption-scope-name)<br/>[Snapshot](../storage/blobs/storage-auth-abac-attributes.md#snapshot)<br/>[Version ID](../storage/blobs/storage-auth-abac-attributes.md#version-id) |
343+
344+
<sup>1</sup> The `Exists` operator is supported for only these attributes in the visual ABAC condition builder in the Azure portal. You can add the `Exists` operator to any attribute using other tools, such as [PowerShell](conditions-role-assignments-powershell.md), the [Azure CLI](conditions-role-assignments-cli.md), the [REST API](conditions-role-assignments-rest.md), and the condition code editor in the Azure portal.
310345

311346
## Logical operators
312347

@@ -422,7 +457,7 @@ This section lists the date/time comparison operators that are available to cons
422457
> | Property | Value |
423458
> | --- | --- |
424459
> | **Operators** | `DateTimeEquals`<br/>`DateTimeNotEquals`<br/>`DateTimeGreaterThan`<br/>`DateTimeGreaterThanEquals`<br/>`DateTimeLessThan`<br/>`DateTimeLessThanEquals` |
425-
> | **Description** |Full-precision check with the format: `yyyy-mm-ddThh:mm:ss.mmmmmmmZ`. Used for blob version ID and blob snapshot. |
460+
> | **Description** | Full-precision check with the format: `yyyy-mm-ddThh:mm:ss.mmmmmmmZ`. Used for blob version ID, blob snapshot, and UTC now. |
426461
> | **Examples** | `@Request[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:versionId] DateTimeEquals '2022-06-01T00:00:00.0Z'` |
427462
428463
## Cross product comparison operators

articles/role-based-access-control/conditions-overview.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ ms.service: role-based-access-control
88
ms.subservice: conditions
99
ms.topic: overview
1010
ms.workload: identity
11-
ms.date: 01/19/2023
11+
ms.date: 04/11/2023
1212
ms.author: rolyon
1313

1414
#Customer intent: As a dev, devops, or it admin, I want to learn how to constrain access within a role assignment by using conditions.
1515
---
1616

1717
# What is Azure attribute-based access control (Azure ABAC)?
1818

19-
Attribute-based access control (ABAC) is an authorization system that defines access based on attributes associated with security principals, resources, and environment. With ABAC, you can grant a security principal access to a resource based on attributes. Azure ABAC refers to the implementation of ABAC for Azure.
19+
Attribute-based access control (ABAC) is an authorization system that defines access based on attributes associated with security principals, resources, and the environment of an access request. With ABAC, you can grant a security principal access to a resource based on attributes. Azure ABAC refers to the implementation of ABAC for Azure.
2020

2121
## What are role assignment conditions?
2222

@@ -45,6 +45,8 @@ There are several scenarios where you might want to add a condition to your role
4545
- Write access to blobs in containers named Contosocorp with a path of uploads/contoso
4646
- Read access to blobs with the tag Program=Alpine and a path of logs
4747
- Read access to blobs with the tag Project=Baker and the user has a matching attribute Project=Baker
48+
- Read access to blobs during a specific date/time range.
49+
- Write access to blobs only over a private link or from a specific subnet.
4850

4951
For more information about how to create these examples, see [Example Azure role assignment conditions for Blob Storage](../storage/blobs/storage-auth-abac-examples.md).
5052

@@ -62,7 +64,9 @@ Here are some of the [blob storage attributes](../storage/blobs/storage-auth-aba
6264
- Encryption scope name
6365
- Is Current Version
6466
- Is hierarchical namespace enabled
67+
- Is private link
6568
- Snapshot
69+
- UTC now (the current date and time in Coordinated Universal Time)
6670
- Version ID
6771

6872
## What does a condition look like?
@@ -103,10 +107,11 @@ Some features of conditions are still in preview. The following table lists the
103107

104108
| Feature | Status | Date |
105109
| --- | --- | --- |
110+
| Use [environment attributes](conditions-format.md#environment-attributes) in a condition | Preview | April 2023 |
106111
| Add conditions using the [condition editor in the Azure portal](conditions-role-assignments-portal.md) | GA | October 2022 |
107112
| Add conditions using [Azure PowerShell](conditions-role-assignments-powershell.md), [Azure CLI](conditions-role-assignments-cli.md), or [REST API](conditions-role-assignments-rest.md) | GA | October 2022 |
108-
| Use [resource and request attributes](conditions-format.md#attributes) for specific combinations of Azure storage resources, access attribute types, and storage account performance tiers. For more information, see [Status of condition features in Azure Storage](../storage/common/authorize-data-access.md#status-of-condition-features-in-azure-storage). | GA | October 2022 |
109-
| Use [custom security attributes on a principal in a condition](conditions-format.md#principal-attributes) | Preview | November 2021 |
113+
| Use [resource and request attributes](conditions-format.md#attributes) for specific combinations of Azure storage resources, access attribute types, and storage account performance tiers. For more information, see [Status of condition features in Azure Storage](../storage/blobs/storage-auth-abac.md#status-of-condition-features-in-azure-storage). | GA | October 2022 |
114+
| Use [custom security attributes on a principal](conditions-format.md#principal-attributes) in a condition | Preview | November 2021 |
110115

111116
## Conditions and Azure AD PIM
112117

0 commit comments

Comments
 (0)