liveBook · Manning

Shared access signature

As explained in Microsoft Azure in Action

A shared access signature (SAS) is a signed Azure credential that grants delegated, time-limited permissions to specified resources.

Suppose you need to upload a static website to Azure Storage. AzCopy can move the files, but it needs permission to do so. A shared access signature (SAS) token provides temporary, limited access to specified Azure resources without using a username and password. section 9.2.1 section 9.2.2

A SAS token is a string appended to a resource URI. It carries permissions and start and end times. When someone uses the resulting URI, Azure checks the token and grants or denies the request. Think of it as a pass for particular resources and actions—not a general invitation into the storage account. section 9.2.2

Figure 9.3 The SAS URI consists of the resource URI and then the SAS token as a query parameter.

The figure shows where the SAS token sits: after the resource URI, as a query parameter. section 9.2.2

In the Azure Portal, open the storage account’s Shared Access Signature menu and choose the scope of the pass:

  • Allowed services: Blob, File, Queue, or Table. section 9.2.2
  • Allowed resource types: the account, containers, or individual objects. section 9.2.2
  • Allowed permissions and start and end times: grant what the task needs, for only as long as it needs it. Permissions that do not apply to a selected resource type are ignored. section 9.2.2

Upload a static website

Generate a SAS token for the storage account, then use its SAS URI to authenticate AzCopy commands that create the $web container and recursively copy the website files into it. Entra ID is another authentication option; the SAS token is useful when you want this particular job to have bounded access. Check the permissions and expiry before running the upload: too much access is risky, while too little can prevent the task. section 9.2.1 section 9.2.2

How Microsoft Azure in Action covers it

How deep it goes
Defines the token, explains URI-based verification, and walks through portal settings and AzCopy usage; does not examine signing internals.
Examples
Shows a SAS URI and AzCopy commands for creating a $web container and recursively uploading static-website files.
What it assumes
Assumes access to an Azure Storage account and a command shell, while defining the token before configuring it.
What you can do after
Apply it via AzCopy to authenticate container creation and static-website uploads using a portal-generated SAS token.
How it connects
Connects SAS tokens to Azure Storage, AzCopy, resource URIs, access permissions, and Entra ID authentication.

Also explained in

Compare how 2 books explain shared access signature →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.