Skip to content

Commit 697aebe

Browse files
Merge pull request #215900 from tamram/tamram22-1018
SAS expiration policy/stored access policy
2 parents 7dff0c3 + 197ad91 commit 697aebe

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

articles/storage/blobs/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ items:
374374
href: sas-service-create.md
375375
- name: Create an account SAS (.NET)
376376
href: ../common/storage-account-sas-create-dotnet.md?toc=/azure/storage/blobs/toc.json
377-
- name: Define a stored access policy
377+
- name: Create a stored access policy
378378
href: ../common/storage-stored-access-policy-define-dotnet.md?toc=/azure/storage/blobs/toc.json
379-
- name: Create a SAS expiration policy
379+
- name: Configure a SAS expiration policy
380380
href: ../common/sas-expiration-policy.md?toc=/azure/storage/blobs/toc.json
381381
- name: Manage anonymous read access to blob data
382382
items:

articles/storage/blobs/blob-containers-portal.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To create a container in the [Azure portal](https://portal.azure.com), follow th
3232

3333
1. In the portal navigation pane on the left side of the screen, select **Storage accounts** and choose a storage account. If the navigation pane isn't visible, select the menu button to toggle its visibility.
3434

35-
:::image type="content" source="media/blob-containers-portal/menu-expand-sml.png" alt-text="Screenshot of the Azure Portal homepage showing the location of the Menu button in the browser." lightbox="media/blob-containers-portal/menu-expand-lrg.png":::
35+
:::image type="content" source="media/blob-containers-portal/menu-expand-sml.png" alt-text="Screenshot of the Azure portal homepage showing the location of the Menu button in the browser." lightbox="media/blob-containers-portal/menu-expand-lrg.png":::
3636

3737
1. In the navigation pane for the storage account, scroll to the **Data storage** section and select **Containers**.
3838
1. Within the **Containers** pane, select the **+ Container** button to open the **New container** pane.
@@ -107,7 +107,7 @@ To generate an SAS token using the [Azure portal](https://portal.azure.com), fol
107107
1. Select the checkbox next to the name of the container for which you'll generate an SAS token.
108108
1. Select the container's **More** button (**...**), and select **Generate SAS** to display the **Generate SAS** pane.
109109

110-
:::image type="content" source="media/blob-containers-portal/select-container-sas-sml.png" alt-text="Screenshot showing how to access container shared access signature settings within the Azure portal" lightbox="media/blob-containers-portal/select-container-sas-lrg.png":::
110+
:::image type="content" source="media/blob-containers-portal/select-container-sas-sml.png" alt-text="Screenshot showing how to access container shared access signature settings in the Azure portal." lightbox="media/blob-containers-portal/select-container-sas-lrg.png":::
111111

112112
1. Within the **Generate SAS** pane, select the **Account key** value for the **Signing method** field.
113113
1. In the **Signing method** field, select **Account key**. Choosing the account key will result in the creation of a service SAS.
@@ -137,11 +137,11 @@ Configuring a stored access policy is a two-step process: the policy must first
137137
1. Select the checkbox next to the name of the container for which you'll generate an SAS token.
138138
1. Select the container's **More** button (**...**), and select **Access policy** to display the **Access policy** pane.
139139

140-
:::image type="content" source="media/blob-containers-portal/select-container-policy-sml.png" alt-text="Screenshot showing how to access container stored access policy settings within the Azure portal." lightbox="media/blob-containers-portal/select-container-policy-lrg.png":::
140+
:::image type="content" source="media/blob-containers-portal/select-container-policy-sml.png" alt-text="Screenshot showing how to access container stored access policy settings in the Azure portal." lightbox="media/blob-containers-portal/select-container-policy-lrg.png":::
141141

142142
1. Within the **Access policy** pane, select **+ Add policy** in the **Stored access policies** section to display the **Add policy** pane. Any existing policies will be displayed in either the appropriate section.
143143

144-
:::image type="content" source="media/blob-containers-portal/select-add-policy-sml.png" alt-text="Screenshot showing how to add a stored access policy settings within the Azure portal." lightbox="media/blob-containers-portal/select-add-policy-lrg.png":::
144+
:::image type="content" source="media/blob-containers-portal/select-add-policy-sml.png" alt-text="Screenshot showing how to add a stored access policy in the Azure portal." lightbox="media/blob-containers-portal/select-add-policy-lrg.png":::
145145

146146
1. Within the **Add policy** pane, select the **Identifier** box and add a name for your new policy.
147147
1. Select the **Permissions** field, then select the check boxes corresponding to the permissions desired for your new policy.
@@ -151,7 +151,7 @@ Configuring a stored access policy is a two-step process: the policy must first
151151
> [!CAUTION]
152152
> Although your policy is now displayed in the **Stored access policy** table, it is still not applied to the container. If you navigate away from the **Access policy** pane at this point, the policy will *not* be saved or applied and you will lose your work.
153153
154-
:::image type="content" source="media/blob-containers-portal/select-save-policy-sml.png" alt-text="Screenshot showing how to define a stored access policy within the Azure portal." lightbox="media/blob-containers-portal/select-save-policy-lrg.png":::
154+
:::image type="content" source="media/blob-containers-portal/select-save-policy-sml.png" alt-text="Screenshot showing how to create a stored access policy within the Azure portal." lightbox="media/blob-containers-portal/select-save-policy-lrg.png":::
155155

156156
1. In the **Access policy** pane, select **+ Add policy** to define another policy, or select **Save** to apply your new policy to the container. After creating at least one stored access policy, you'll be able to associate other secure access signatures (SAS) with it.
157157

@@ -183,7 +183,7 @@ To acquire a lease using the Azure portal, follow these steps:
183183
1. Select the checkbox next to the name of the container for which you'll acquire a lease.
184184
1. Select the container's **More** button (**...**), and select **Acquire lease** to request a new lease and display the details in the **Lease status** pane.
185185

186-
:::image type="content" source="media/blob-containers-portal/acquire-container-lease-sml.png" alt-text="Screenshot showing how to access container lease settings within the Azure portal." lightbox="media/blob-containers-portal/acquire-container-lease-lrg.png":::
186+
:::image type="content" source="media/blob-containers-portal/acquire-container-lease-sml.png" alt-text="Screenshot showing how to access container lease settings in the Azure portal." lightbox="media/blob-containers-portal/acquire-container-lease-lrg.png":::
187187

188188
1. The **Container** and **Lease ID** property values of the newly requested lease are displayed within the **Lease status** pane. Copy and paste these values in a secure location. They'll only be displayed once and can't be retrieved after the pane is closed.
189189

@@ -247,4 +247,4 @@ You can restore a soft-deleted container and its contents within the retention p
247247
- [Create a storage account](../common/storage-account-create.md?tabs=azure-portal&toc=%2fazure%2fstorage%2fblobs%2ftoc.json)
248248
- [Manage blob containers using PowerShell](blob-containers-powershell.md)
249249

250-
<!--Point-in-time restore: /azure/storage/blobs/point-in-time-restore-manage?tabs=portal-->
250+
<!--Point-in-time restore: /azure/storage/blobs/point-in-time-restore-manage?tabs=portal-->

articles/storage/common/sas-expiration-policy.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Create an expiration policy for shared access signatures
2+
title: Configure an expiration policy for shared access signatures (SAS)
33
titleSuffix: Azure Storage
4-
description: Create a policy on the storage account that defines the length of time that a shared access signature (SAS) should be valid. Learn how to monitor policy violations to remediate security risks.
4+
description: Configure a policy on the storage account that defines the length of time that a shared access signature (SAS) should be valid. Learn how to monitor policy violations to remediate security risks.
55
services: storage
66
author: jimmart-dev
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 04/18/2022
10+
ms.date: 10/25/2022
1111
ms.author: jammart
1212
ms.reviewer: nachakra
1313
ms.subservice: common
1414
---
1515

16-
# Create an expiration policy for shared access signatures
16+
# Configure an expiration policy for shared access signatures
1717

1818
You can use a shared access signature (SAS) to delegate access to resources in your Azure Storage account. A SAS token includes the targeted resource, the permissions granted, and the interval over which access is permitted. Best practices recommend that you limit the interval for a SAS in case it is compromised. By setting a SAS expiration policy for your storage accounts, you can provide a recommended upper expiration limit when a user creates a service SAS or an account SAS.
1919

@@ -31,16 +31,16 @@ A SAS expiration policy does not prevent a user from creating a SAS with an expi
3131

3232
When a SAS expiration policy is in effect for the storage account, the signed start field is required for every SAS. If the signed start field is not included on the SAS, and you have configured a diagnostic setting for logging with Azure Monitor, then Azure Storage writes a message to the **SasExpiryStatus** property in the logs whenever a user creates or uses a SAS without a value for the signed start field.
3333

34-
## Create a SAS expiration policy
34+
## Configure a SAS expiration policy
3535

36-
When you create a SAS expiration policy on a storage account, the policy applies to each type of SAS that is signed with the account key. The types of shared access signatures that are signed with the account key are the service SAS and the account SAS.
36+
When you configure a SAS expiration policy on a storage account, the policy applies to each type of SAS that is signed with the account key. The types of shared access signatures that are signed with the account key are the service SAS and the account SAS.
3737

3838
> [!NOTE]
39-
> Before you can create a SAS expiration policy, you may need to rotate each of your account access keys at least once.
39+
> Before you can configure a SAS expiration policy, you may need to rotate each of your account access keys at least once.
4040
4141
### [Azure portal](#tab/azure-portal)
4242

43-
To create a SAS expiration policy in the Azure portal, follow these steps:
43+
To configure a SAS expiration policy in the Azure portal, follow these steps:
4444

4545
1. Navigate to your storage account in the Azure portal.
4646
1. Under **Settings**, select **Configuration**.
@@ -53,7 +53,7 @@ To create a SAS expiration policy in the Azure portal, follow these steps:
5353

5454
### [PowerShell](#tab/azure-powershell)
5555

56-
To create a SAS expiration policy, use the [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) command, and then set the `-SasExpirationPeriod` parameter to the number of days, hours, minutes, and seconds that a SAS token can be active from the time that a SAS is signed. The string that you provide the `-SasExpirationPeriod` parameter uses the following format: `<days>.<hours>:<minutes>:<seconds>`. For example, if you wanted the SAS to expire 1 day, 12 hours, 5 minutes, and 6 seconds after it is signed, then you would use the string `1.12:05:06`.
56+
To configure a SAS expiration policy, use the [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) command, and then set the `-SasExpirationPeriod` parameter to the number of days, hours, minutes, and seconds that a SAS token can be active from the time that a SAS is signed. The string that you provide the `-SasExpirationPeriod` parameter uses the following format: `<days>.<hours>:<minutes>:<seconds>`. For example, if you wanted the SAS to expire 1 day, 12 hours, 5 minutes, and 6 seconds after it is signed, then you would use the string `1.12:05:06`.
5757

5858
```powershell
5959
$account = Set-AzStorageAccount -ResourceGroupName <resource-group> `
@@ -77,7 +77,7 @@ The SAS expiration period appears in the console output.
7777
7878
### [Azure CLI](#tab/azure-cli)
7979

80-
To create a SAS expiration policy, use the [az storage account update](/cli/azure/storage/account#az-storage-account-update) command, and then set the `--key-exp-days` parameter to the number of days, hours, minutes, and seconds that a SAS token can be active from the time that a SAS is signed. The string that you provide the `--key-exp-days` parameter uses the following format: `<days>.<hours>:<minutes>:<seconds>`. For example, if you wanted the SAS to expire 1 day, 12 hours, 5 minutes, and 6 seconds after it is signed, then you would use the string `1.12:05:06`.
80+
To configure a SAS expiration policy, use the [az storage account update](/cli/azure/storage/account#az-storage-account-update) command, and then set the `--key-exp-days` parameter to the number of days, hours, minutes, and seconds that a SAS token can be active from the time that a SAS is signed. The string that you provide the `--key-exp-days` parameter uses the following format: `<days>.<hours>:<minutes>:<seconds>`. For example, if you wanted the SAS to expire 1 day, 12 hours, 5 minutes, and 6 seconds after it is signed, then you would use the string `1.12:05:06`.
8181

8282
```azurecli-interactive
8383
az storage account update \
@@ -153,7 +153,7 @@ To monitor your storage accounts for compliance with the key expiration policy,
153153

154154
:::image type="content" source="media/sas-expiration-policy/policy-compliance-report-portal-inline.png" alt-text="Screenshot showing how to view the compliance report for the SAS expiration built-in policy" lightbox="media/sas-expiration-policy/policy-compliance-report-portal-expanded.png":::
155155

156-
To bring a storage account into compliance, configure a SAS expiration policy for that account, as described in [Create a SAS expiration policy](#create-a-sas-expiration-policy).
156+
To bring a storage account into compliance, configure a SAS expiration policy for that account, as described in [Configure a SAS expiration policy](#configure-a-sas-expiration-policy).
157157

158158
## See also
159159

articles/storage/common/storage-sas-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ The following recommendations for using shared access signatures can help mitiga
160160

161161
- **Configure a SAS expiration policy for the storage account.** A SAS expiration policy specifies a recommended interval over which the SAS is valid. SAS expiration policies apply to a service SAS or an account SAS. When a user generates service SAS or an account SAS with a validity interval that is larger than the recommended interval, they'll see a warning. If Azure Storage logging with Azure Monitor is enabled, then an entry is written to the Azure Storage logs. To learn more, see [Create an expiration policy for shared access signatures](sas-expiration-policy.md).
162162

163-
- **Define a stored access policy for a service SAS.** Stored access policies give you the option to revoke permissions for a service SAS without having to regenerate the storage account keys. Set the expiration on these very far in the future (or infinite) and make sure it's regularly updated to move it farther into the future. There is a limit of five stored access policies per container.
163+
- **Create a stored access policy for a service SAS.** Stored access policies give you the option to revoke permissions for a service SAS without having to regenerate the storage account keys. Set the expiration on these very far in the future (or infinite) and make sure it's regularly updated to move it farther into the future. There is a limit of five stored access policies per container.
164164

165165
- **Use near-term expiration times on an ad hoc SAS service SAS or account SAS.** In this way, even if a SAS is compromised, it's valid only for a short time. This practice is especially important if you cannot reference a stored access policy. Near-term expiration times also limit the amount of data that can be written to a blob by limiting the time available to upload to it.
166166

articles/storage/common/storage-stored-access-policy-define-dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following Azure Storage resources support stored access policies:
3030
>
3131
> Stored access policies are supported for a service SAS only. Stored access policies are not supported for account SAS or user delegation SAS.
3232
33-
For more information about stored access policies, see [Define a stored access policy](/rest/api/storageservices/define-stored-access-policy).
33+
For more information about stored access policies, see [Create a stored access policy](/rest/api/storageservices/define-stored-access-policy).
3434

3535
## Create a stored access policy
3636

@@ -125,5 +125,5 @@ private static async Task CreateStoredAccessPolicyAsync(CloudBlobContainer conta
125125
## See also
126126

127127
- [Grant limited access to Azure Storage resources using shared access signatures (SAS)](storage-sas-overview.md)
128-
- [Define a stored access policy](/rest/api/storageservices/define-stored-access-policy)
128+
- [Create a stored access policy](/rest/api/storageservices/define-stored-access-policy)
129129
- [Configure Azure Storage connection strings](storage-configure-connection-string.md)

0 commit comments

Comments
 (0)