0

I need to write to an azure blob store using my app that is running on a customer's network. I would like to use a network username and password to secure the blob location. I have been reading MANY articles but I cannot see how to use a username and password to connect to the azure blob store.

It is a WPF app, so I do not want to store my key (or any secrets) in a config file or hard code it as it will be too easy to get with a decompiler. I would prefer to issue the user with a network username and password. That way I can change the password or disable the username when needed.

Can anyone point me in the right direction here please, I just keep looping back to the same documentation over and over

1 Answer 1

3

There are three ways to get connected to Azure Storage:

  1. Using account name/key
  2. Using Azure Active Directory (Azure AD) authentication
  3. Using Shared Access Signature

1st option is automatically ruled out as you don't want to store the secrets in the application (wise decision BTW).

You can use Azure AD authentication to connect to Blob Storage. Your users would need to be present in Azure AD for this though. Whenever a user launches your application, you will redirect them to Azure AD for authentication and once they are authenticated, they will be able to use the application. You can read more about it here: https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad

3rd option is to use Shared Access Signature (SAS) which basically is a URL that has a time-bound/permission driven access to your storage. The way this would work is that your application will authenticate the users by asking them to provide their network username/password. Once they are authenticated, they will get access to the application. In the application, you can make a call to an API that will return a SAS URL using which a user will be able to upload data into blob storage. You can read more about it here: https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview?toc=%2fazure%2fstorage%2fblobs%2ftoc.json

1
  • Thanks for the info. The first link certainly looks like what I am after. Any idea where I can get some c# samples instead of powershell? Sep 17, 2019 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.