Feature Request: Support Managed Service Identity for Storage connections
See original GitHub issuePlease provide a succinct description of the issue.
Repro steps
Currently Azure Storage supports Managed Service Identity. But azure webjob sdk only spports connection string for storage account. It would be great that webjob sdk support MSI.
Known workarounds
I’ve found some workarounds by inject storage account on registering. First I need to generate the CloudStorageAccount by MSI in advance. Then, there are two services I need to inject:
var blobClient = storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference("webjob-lock");
var builder = new HostBuilder()
.ConfigureWebJobs(b =>
{
b.Services.AddSingleton(new DistributedLockManagerContainerProvider
{
InternalContainer = container
});
b.Services.AddSingleton<StorageAccountProvider>(new ManagedIdentityStorageAccountProvider(storageAccount));
b.AddAzureStorageCoreServices();
b.AddAzureStorage();
b.AddTimers();
})
public class ManagedIdentityStorageAccountProvider : StorageAccountProvider
{
private readonly CloudStorageAccount storageAccount;
public ManagedIdentityStorageAccountProvider(CloudStorageAccount storageAccount) : base(null)
{
this.storageAccount = storageAccount;
}
public override StorageAccount Get(string name)
{
return StorageAccount.New(this.storageAccount);
}
}
I’m still looking for official MSI support.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Managed identities for Azure resources - Microsoft Entra
In this article. Managed identity types; How can I use managed identities for Azure resources? What Azure services support the feature? Which ...
Read more >Managed Identities with Azure AD (Active Directory) Tutorial
Azure AD Managed Identities are one of the best features when it comes to authentication across multiple Azure services.
Read more >Managed Identity in Azure DevOps Service Connections
In this blog post I'm going to explain how to use Managed Identity Authentication for the Azure DevOps Connection Service. Managed Identity.
Read more >Managed Identity connection to storage I have no direct ...
If your unable to do this from your side then do it from your client side by requesting for Either Storage account access...
Read more >Issue tracking system and product feature requests
To view issue trackers, see Search for or create issues and feature requests, by product. To report an issue with the Google Cloud...
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, my team is still looking for official MSI support in the SDK. Has there been any update on this issue?
Found it in the azure functions docs: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob#common-properties-for-identity-based-connections