74.3k views
3 votes
Show details of a Shared Access Signature (SAS) definition for a storage account with the Azure CLI.

User Xorifelse
by
8.3k points

1 Answer

6 votes

Final answer:

To create a Shared Access Signature (SAS) for an Azure storage account, one must define permissions, set a validity period, and generate the SAS token using Azure CLI commands while logged into the Azure account.

Step-by-step explanation:

A Shared Access Signature (SAS) is a URI that grants restricted access rights to Azure Storage resources. To create a SAS for a storage account using the Azure Command-Line Interface (CLI), you would typically perform the following steps:

  • First, you need to have the Azure CLI installed and be logged in to your Azure account.
  • Then, specify the permissions that the SAS will grant. These can include reading, writing, deleting, etc., for blob, file, queue, and table services.
  • Next, you determine the start and expiry times for the SAS token's validity.
  • After setting the permissions and validity period, you would use an Azure CLI command to generate the SAS token. The command would look something like this: az storage account generate-sas, with additional parameters for permissions, start time, expiry time, and optionally the IP range and HTTPs protocol.
  • Finally, you would receive a SAS token that can be appended to the base URI of the storage resource to access it with the specified permissions.

It's important to carefully handle the SAS because it allows anyone with the token to access your storage account within the given constraints.

User Eldo
by
8.0k points

Related questions