Ability to express user-assigned managed identity in IConfiguration #19090
Labels
Client
This issue points to a problem in the data-plane of the library.
Extensions
ASP.NET Core extensions
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Library or service name.
Microsoft.Extensions.Azure
Is your feature request related to a problem? Please describe.
When using a configuration source to drive a connection, I would like to be able to reference a user-assigned identity. The model today accounts for system-assigned only. That's the default case, and a client ID option exists in conjunction with a secret to form a client credential. Just adding a solo client ID could create some confusion there, so it needs to be explicit. That's especially true considering deployment environments.
Proposal (CC @pakrym) : Add an explicit
credential
property (possibly useable in other areas), which can be set to "managedidentity" and indicates theManagedIdentityCredential
type should be used. AclientId
property is optional and if set indicates the used-assigned identity as per theManagedIdentityCredential
constructor. In absence ofclientId
, the system-assigned identity should be used. In practice, setting credential on its own is unlikely since omitting it entirely would provide the same result + local options perDefaultAzureCredential
underneath.Using a Blob as an example (json config):
The text was updated successfully, but these errors were encountered: