Azure - Shared Access Signature (SAS) - Account key vs User Delegation
#cloud #azure
Hi All!
I would say Azure storage account is a long last service. Whatever the services overcome one another, azure storage stays active. For example, we can take a .NET web application which can be hosted in IIS of a Azure VM, App service with or without Docker, Function app for event based. Here based on requirements App service sometimes overcome VM and function app overcomes rest of others and so on.
When we use any of the cloud service, security is one of the main pillar need to consider. Here we are going to talk about Blob storage account access granting to customer or somebody else who requires it.
Consider a scenario that customer application place a file, it would be csv or JSON or XML what ever it may be but a single type. Let's take JSON here.
We need to allow some people to access that file. Here we have two questions as below
- Who are those some people whether Azure AD user or Non-Azure AD user?
- What permission we need to grant? so only granting Read permission is sufficient or should we grant some additional access as well?
For #2, If they want to only access / download, we can grant only Read and List permission is SAS. No need to grant Write, Delete, Create etc.,
The main purpose of this post is to discuss the question no.1
we have 2 types of signing method
- User Delegation
- Account Key
If the team or specific users who are part of Azure AD needs to access blob(s), we can go for user delegation.
If the team or specific users who are not part of Azure AD needs to access blob(s), we can go for Account Key.
The vital part of Account key SAS is, If any body rotate the key (Access Key), SAS may become invalid. We need to recreate the SAS to share with the people who already has previous one.
Account Key based SAS can be generated based on Key1 or Key2 as you can see in the below image,If you rotate key1, only key1 gets afftected.
Comments
Post a Comment