Renew SasKey for BlobContainerClient
See original GitHub issueLibrary name
Azure.Storage.Blobs
Please describe the feature.
Hi,
We receive 1 hour write sas key and were wondering how to renew it once the BlobContainerClient is created.
For example:
var containerclient = new BlobContainerClient(new Uri("https://storageaccount.blob.core.windows.net/containername?sig=something")
// Start upload
// 1 hour later, the sas key is expired and the upload fails.
How can we deal with this case? Is there a way to give a callback for new signature? Should I implement a custom TokenCredential
or implement a custom HttpClientTransport
and modify the Uri on the fly with a renewed signature? Or others method?
Please advise.
Issue Analytics
- State:
- Created 2 months ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Renew SasKey for BlobContainerClient
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer...
Read more >Create a service SAS for a blob with .NET - Azure Storage
This article shows how to use the storage account key to create a service SAS for a blob with the Azure Blob Storage...
Read more >Create a user delegation SAS for a blob with .NET
The user delegation key is independent of the OAuth 2.0 token used to acquire it, so the token doesn't need to be renewed...
Read more >Uploading Files to Azure Blob Storage with Shared Access ...
Shared Access Signature (SAS) provides a secure way to upload and download files from Azure Blob Storage without sharing the connection string.
Read more >'Server failed to authenticate the request' when attempting ...
Updated Solution: I have tested Azure.Storage.Blobs package version 12.11.0, and gives the exact issue OP described in the question.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, you can use the
AzureSasCredential
instead when instantiating your client.So it would something like
Then when your SAS expires you could do something like
Thanks for the answer, exactly what I was looking for.