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 Identity auth for AzureWebJobsDashboard and AzureWebJobsStorage

See original GitHub issue

Currently we setup connection strings for AzureWebJobsStorage, AzureWebJobsDashboard and WEBSITE_CONTENTAZUREFILECONNECTIONSTRING. It would be great if we could give the managed identity for the function or web app permissions to the appropriate storage account and just provide storage account names here.

While there is security benefits around the managed identity, it’s also a nice thing around the configuration of say an azure function app where in ARM I currently have the same key retrieval three times as:

"AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountResourceId'),'2015-05-01-preview').key1)]",
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountResourceId'),'2015-05-01-preview').key1)]",
"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountResourceId'),'2015-05-01-preview').key1)]",

For migration, maybe a check for a new configuration variable say ManagedAzureWebJobsStorageAccountName or similar and fallback to storage connection string config and maybe make them mutually exclusive. When this is set, use the managed identity auth and appropriate storage account name from this string config value.

It seems the first place might be in StorageAccountOptions.cs and go from there.

I’d be happy to contribute towards making this happen but open to discussion around it’s downsides, implementation guidance etc etc.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:5

github_iconTop GitHub Comments

17reactions
MisinformedDNAcommented, Feb 15, 2021

I vote to reopen.

3reactions
ross-p-smithcommented, Dec 7, 2019

I put in a PR a while back - I will dust it off and update it again. This works for my scenario where I am running a Function inside K8s using aad-pod-identity - https://github.com/Azure/azure-webjobs-sdk/pull/2344

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use managed identity instead of AzureWebJobsStorage to ...
This blog shows you how to configure a function app using Azure Active Directory identities instead of secrets or connection strings, where ...
Read more >
Using Managed Identity between Azure Functions and ...
This sample shows how to deploy your Azure Resources using Terraform, including system-assigned identities and RBAC assignments, as well as the ...
Read more >
AzureWebJobsStorage, the secret you don't need in your ...
You can notice that we enabled the System Managed Identity on the Function App by setting the Identity property. And as expected we...
Read more >
How to secure Azure Functions with Azure AD, Key Vault ...
Secure Azure Functions with Azure AD, Key Vault and VNETs. Then connect to Azure SQL using firewall rules and Managed Identity of Function....
Read more >
Azure Function Secretless Extensions - First Experience
I'm going to start by describing how I was able to get a very simple Azure Storage queue-triggered function to use an identity-based...
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