Skip to content

Commit 3eded53

Browse files
Merge pull request #198784 from rolyon/rolyon-abac-attributes-iscurrentversion
[Azure ABAC] isCurrentVersion attribute
2 parents 38bf76e + 672fd51 commit 3eded53

File tree

4 files changed

+117
-37
lines changed

4 files changed

+117
-37
lines changed

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

Lines changed: 3 additions & 2 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: overview
1010
ms.workload: identity
11-
ms.date: 05/16/2022
11+
ms.date: 05/24/2022
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.
@@ -65,6 +65,7 @@ Here are some of the [blob storage attributes](../storage/common/storage-auth-ab
6565
- Blob prefix
6666
- Container name
6767
- Encryption scope name
68+
- Is Current Version
6869
- Is hierarchical namespace enabled
6970
- Snapshot
7071
- Version ID
@@ -107,7 +108,7 @@ Here's a list of the primary features of conditions:
107108

108109
| Feature | Status | Date |
109110
| --- | --- | --- |
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 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 Current Version, Is hierarchical namespace enabled, Snapshot, Version ID | Preview | May 2022 |
111112
| Use [custom security attributes on a principal in a condition](conditions-format.md#principal-attributes) | Preview | November 2021 |
112113
| Add conditions to blob storage data role assignments | Preview | May 2021 |
113114
| Use attributes on a resource in a condition | Preview | May 2021 |
29.8 KB
Loading

articles/storage/common/storage-auth-abac-attributes.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: santoshc
77

88
ms.service: storage
99
ms.topic: conceptual
10-
ms.date: 05/16/2022
10+
ms.date: 05/24/2022
1111
ms.author: santoshc
1212
ms.reviewer: jiacfan
1313
ms.subservice: common
@@ -75,7 +75,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
7575
> | **Description** | All blob read operations excluding list. |
7676
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read` |
7777
> | **Suboperation** | NOT `Blob.List` |
78-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Encryption scope name](#encryption-scope-name) |
78+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Encryption scope name](#encryption-scope-name) |
7979
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
8080
> | **Principal attributes support** | True |
8181
> | **Examples** | `!(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'} AND NOT SubOperationMatches{'Blob.List'})`<br/>[Example: Read blobs in named containers with a path](storage-auth-abac-examples.md#example-read-blobs-in-named-containers-with-a-path) |
@@ -89,7 +89,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
8989
> | **Description** | Read blobs with tags. |
9090
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read` |
9191
> | **Suboperation** | `Blob.Read.WithTagConditions` |
92-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys)<br/>[Encryption scope name](#encryption-scope-name) |
92+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys)<br/>[Encryption scope name](#encryption-scope-name) |
9393
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
9494
> | **Principal attributes support** | True |
9595
> | **Examples** | `!(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'} AND SubOperationMatches{'Blob.Read.WithTagConditions'})`<br/>[Example: Read blobs with a blob index tag](storage-auth-abac-examples.md#example-read-blobs-with-a-blob-index-tag) |
@@ -104,7 +104,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
104104
> | **Description** | DataAction for reading blob index tags. |
105105
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/read` |
106106
> | **Suboperation** | |
107-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys) |
107+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys) |
108108
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
109109
> | **Principal attributes support** | True |
110110
> | **Learn more** | [Manage and find Azure Blob data with blob index tags](../blobs/storage-manage-find-blobs.md) |
@@ -145,7 +145,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
145145
> | **Description** | DataAction for writing to blobs. |
146146
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write` |
147147
> | **Suboperation** | `Blob.Write.Tier` |
148-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Encryption scope name](#encryption-scope-name) |
148+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Encryption scope name](#encryption-scope-name) |
149149
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
150150
> | **Principal attributes support** | True |
151151
> | **Examples** | `!(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'} AND SubOperationMatches{'Blob.Write.Tier'})` |
@@ -188,7 +188,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
188188
> | **Description** | DataAction for writing blob index tags. |
189189
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write` |
190190
> | **Suboperation** | |
191-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys) |
191+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path)<br/>[Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys) |
192192
> | **Request attributes** | [Blob index tags [Values in key]](#blob-index-tags-values-in-key)<br/>[Blob index tags [Keys]](#blob-index-tags-keys)<br/>[Version ID](#version-id)<br/>[Snapshot](#snapshot) |
193193
> | **Principal attributes support** | True |
194194
> | **Examples** | `!(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write'})`<br/>[Example: Existing blobs must have blob index tag keys](storage-auth-abac-examples.md#example-existing-blobs-must-have-blob-index-tag-keys) |
@@ -216,7 +216,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
216216
> | **Description** | DataAction for deleting blobs. |
217217
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete` |
218218
> | **Suboperation** | |
219-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
219+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
220220
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
221221
> | **Principal attributes support** | True |
222222
> | **Examples** | `!(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete'})`<br/>[Example: Read, write, or delete blobs in named containers](storage-auth-abac-examples.md#example-read-write-or-delete-blobs-in-named-containers) |
@@ -244,7 +244,7 @@ This section lists the supported Azure Blob storage actions and suboperations yo
244244
> | **Description** | DataAction for permanently deleting a blob overriding soft-delete. |
245245
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/permanentDelete/action` |
246246
> | **Suboperation** | |
247-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
247+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
248248
> | **Request attributes** | [Version ID](#version-id)<br/>[Snapshot](#snapshot) |
249249
> | **Principal attributes support** | True |
250250
@@ -296,10 +296,10 @@ This section lists the supported Azure Blob storage actions and suboperations yo
296296
> | **Description** | DataAction for all data operations on storage accounts with hierarchical namespace enabled.<br/>If your role definition includes the `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action` action, you should target this action in your condition. Targeting this action ensures the condition will still work as expected if hierarchical namespace is enabled for a storage account. |
297297
> | **DataAction** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action` |
298298
> | **Suboperation** | |
299-
> | **Resource attributes** | [Account name](#account-name)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
299+
> | **Resource attributes** | [Account name](#account-name)<br/>[Is Current Version](#is-current-version)<br/>[Is hierarchical namespace enabled](#is-hierarchical-namespace-enabled)<br/>[Container name](#container-name)<br/>[Blob path](#blob-path) |
300300
> | **Request attributes** | |
301301
> | **Principal attributes support** | True |
302-
> | **Examples** | [Example: Read only storage accounts with hierarchical namespace enabled](storage-auth-abac-examples.md#example-read-only-storage-accounts-with-hierarchical-namespace-enabled)<br/>[Example: Read, write, or delete blobs in named containers](storage-auth-abac-examples.md#example-read-write-or-delete-blobs-in-named-containers)<br/>[Example: Read blobs in named containers with a path](storage-auth-abac-examples.md#example-read-blobs-in-named-containers-with-a-path)<br/>[Example: Read or list blobs in named containers with a path](storage-auth-abac-examples.md#example-read-or-list-blobs-in-named-containers-with-a-path)<br/>[Example: Write blobs in named containers with a path](storage-auth-abac-examples.md#example-write-blobs-in-named-containers-with-a-path) |
302+
> | **Examples** | [Example: Read, write, or delete blobs in named containers](storage-auth-abac-examples.md#example-read-write-or-delete-blobs-in-named-containers)<br/>[Example: Read blobs in named containers with a path](storage-auth-abac-examples.md#example-read-blobs-in-named-containers-with-a-path)<br/>[Example: Read or list blobs in named containers with a path](storage-auth-abac-examples.md#example-read-or-list-blobs-in-named-containers-with-a-path)<br/>[Example: Write blobs in named containers with a path](storage-auth-abac-examples.md#example-write-blobs-in-named-containers-with-a-path)<br/>[Example: Read only current blob versions](storage-auth-abac-examples.md#example-read-only-current-blob-versions)<br/>[Example: Read current blob versions and any blob snapshots](storage-auth-abac-examples.md#example-read-current-blob-versions-and-any-blob-snapshots)<br/>[Example: Read only storage accounts with hierarchical namespace enabled](storage-auth-abac-examples.md#example-read-only-storage-accounts-with-hierarchical-namespace-enabled) |
303303
> | **Learn more** | [Azure Data Lake Storage Gen2 hierarchical namespace](../blobs/data-lake-storage-namespace.md) |
304304
305305
## Azure Queue storage actions
@@ -471,6 +471,18 @@ This section lists the Azure Blob storage attributes you can use in your conditi
471471
> | **Examples** | `@Resource[Microsoft.Storage/storageAccounts/encryptionScopes:name] ForAnyOfAnyValues:StringEquals {'validScope1', 'validScope2'}`<br/>[Example: Read blobs with specific encryption scopes](storage-auth-abac-examples.md#example-read-blobs-with-specific-encryption-scopes) |
472472
> | **Learn more** | [Create and manage encryption scopes](../blobs/encryption-scope-manage.md) |
473473
474+
### Is Current Version
475+
476+
> [!div class="mx-tdCol2BreakAll"]
477+
> | Property | Value |
478+
> | --- | --- |
479+
> | **Display name** | Is Current Version |
480+
> | **Description** | Identifies if the resource is the current version of the blob, in contrast of a snapshot or a specific blob version. |
481+
> | **Attribute** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs:isCurrentVersion` |
482+
> | **Attribute source** | Resource |
483+
> | **Attribute type** | Boolean |
484+
> | **Examples** | `@Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:isCurrentVersion] BoolEquals true`<br/>[Example: Read only current blob versions](storage-auth-abac-examples.md#example-read-only-current-blob-versions)<br/>[Example: Read current blob versions and a specific blob version](storage-auth-abac-examples.md#example-read-current-blob-versions-and-a-specific-blob-version) |
485+
474486
### Is hierarchical namespace enabled
475487

476488
> [!div class="mx-tdCol2BreakAll"]
@@ -490,14 +502,14 @@ This section lists the Azure Blob storage attributes you can use in your conditi
490502
> | Property | Value |
491503
> | --- | --- |
492504
> | **Display name** | Snapshot |
493-
> | **Description** | The Snapshot identifier for the Blob snapshot. |
505+
> | **Description** | The Snapshot identifier for the Blob snapshot.<br/>Available for storage accounts where hierarchical namespace is not enabled and currently in preview for storage accounts where hierarchical namespace is enabled. |
494506
> | **Attribute** | `Microsoft.Storage/storageAccounts/blobServices/containers/blobs:snapshot` |
495507
> | **Attribute source** | Request |
496508
> | **Attribute type** | DateTime |
497509
> | **Exists support** | True |
498510
> | **Hierarchical namespace support** | False |
499511
> | **Examples** | `Exists @Request[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:snapshot]`<br/>[Example: Read current blob versions and any blob snapshots](storage-auth-abac-examples.md#example-read-current-blob-versions-and-any-blob-snapshots) |
500-
> | **Learn more** | [Azure Data Lake Storage Gen2 hierarchical namespace](../blobs/data-lake-storage-namespace.md) |
512+
> | **Learn more** | [Blob snapshots](../blobs/snapshots-overview.md)<br/>[Azure Data Lake Storage Gen2 hierarchical namespace](../blobs/data-lake-storage-namespace.md) |
501513
502514
### Version ID
503515

@@ -511,7 +523,7 @@ This section lists the Azure Blob storage attributes you can use in your conditi
511523
> | **Attribute type** | DateTime |
512524
> | **Exists support** | True |
513525
> | **Hierarchical namespace support** | False |
514-
> | **Examples** | `@Request[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:versionId] DateTimeEquals '2022-06-01T23:38:32.8883645Z'`<br/>[Example: Read current blob versions and a specific blob version](storage-auth-abac-examples.md#example-read-current-blob-versions-and-a-specific-blob-version) |
526+
> | **Examples** | `@Request[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:versionId] DateTimeEquals '2022-06-01T23:38:32.8883645Z'`<br/>[Example: Read current blob versions and a specific blob version](storage-auth-abac-examples.md#example-read-current-blob-versions-and-a-specific-blob-version)<br/>[Example: Read current blob versions and any blob snapshots](storage-auth-abac-examples.md#example-read-current-blob-versions-and-any-blob-snapshots) |
515527
> | **Learn more** | [Azure Data Lake Storage Gen2 hierarchical namespace](../blobs/data-lake-storage-namespace.md) |
516528
517529
## Azure Queue storage attributes

0 commit comments

Comments
 (0)