Mount Azure File Storage using SAS token for authentication

3.1k views Asked by At

The documentation shows how to connect using Storage Account Key:

https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows

That does work. However, I'd like to mount file storage using read-only SAS token.

Is this possible?

2

There are 2 answers

0
Tom Sun On

is this possible?

Unfortunately, no. We must set the storage account key when mounting Azure File shares, everyone who has storage account and account key will have full permissions to manage and operate file shares. From the feedback we could know that Microsoft has no plan to do that.

At the moment, Microsoft does not have plans to support SAS tokens with SMB access. Instead, we are looking into supporting AD integration for mounted file shares.

0
Ricky V. On

It's possible on different approach and secure. You still use the mount cifs (net use windows) but you stored the credentials in the key vault. You should mount this on the bootup (with systemctl) using the technique of curl to get the credentials. You need to allow key vault access policy on the vm, now this is tricky too to automate but it's possible.