question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Support Managed Service Identity for Storage connections

See original GitHub issue

Please 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:open
  • Created 5 years ago
  • Reactions:18
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
cn894commented, Dec 8, 2020

Hi, my team is still looking for official MSI support in the SDK. Has there been any update on this issue?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found