AZ-104 Microsoft Azure Administrator Exam
You're a great admin... on-prem. Now, become a great admin in the cloud and prove it by passing the Microsoft Certified: Azure Administrator Associate exam!
Practice Test

Practice Test

Create and use shared access signaturetokens
Generate and Configure Shared Access Signature Tokens
Shared Access Signature (SAS) tokens provide a secure way to grant limited access to Azure storage resources. These tokens are used to delegate access to blobs, files, queues, and tables in a storage account via a signed URL. The URL specifies the permissions granted and the time interval over which the signature is valid. SAS tokens help balance security with ease of access, ensuring that users can perform necessary operations without compromising the overall security of Azure resources.
Types of SAS Tokens
There are three types of SAS tokens:
- Service SAS: This type is signed with the account key and grants access to specific resources within a storage account.
- Account SAS: Also signed with the account key, this type provides access to multiple services within the storage account.
- User Delegation SAS: Signed with Microsoft Entra credentials, this type applies only to blob storage and offers enhanced security by using identity-based authentication.
Each type of SAS token serves different purposes and offers various levels of control and security depending on the specific needs of your Azure environment.
Creating SAS Tokens
To create a SAS token, you need to specify the following parameters:
- Permissions: Define what actions can be performed, such as read, write, delete, or list actions.
- Expiration Time: Set a time limit for how long the token is valid. This helps manage access within a limited timeframe.
- IP Address Restrictions: Limit access to specific IP addresses to enhance security. This ensures that only authorized machines can use the token.
Creating a SAS token involves careful consideration of these parameters to ensure that access is both secure and functional.
Best Practices
When generating SAS tokens, follow these best practices:
- Use HTTPS: Ensure that SAS tokens are limited to HTTPS connections to minimize the risk of eavesdropping. Secure connections are crucial in protecting data in transit.
- Set Appropriate Permissions: Grant only the necessary permissions to avoid over-privileged access that might lead to security vulnerabilities.
- Define Expiration Times: Set short expiration times to reduce the risk of token misuse or accidental leaks becoming a long-term risk.
- Restrict IP Addresses: Use IP address restrictions to control access from specific authorized locations, further securing the environment.
These best practices help maintain a secure and controlled environment when utilizing SAS tokens.
Revoking SAS Tokens
If a SAS token needs to be invalidated, you can revoke the associated user delegation keys. This action will invalidate all SAS tokens generated with those keys. Note that there may be a delay between the revocation process and the actual invalidation of the tokens due to caching. Revocation is an important process in managing security and ensuring that compromised or outdated tokens do not present risks.
Conclusion
Understanding and utilizing SAS tokens effectively is crucial for managing secure access to Azure storage resources. By following best practices and configuring tokens with appropriate permissions, expiration times, and IP restrictions, you can ensure granular and secure access to your storage resources. Proper management of SAS tokens enhances security while maintaining efficient access to critical Azure services.