Add AzureServiceClientCredentials
See original GitHub issueThe existing interface ServiceClientCredentials
has been working fine for most management plane libraries. However, when it comes to Graph RBAC client, the resourceId
field sent in the authorization request is different the other management plane libraries. Thus we would have to use a different credentials for Graph, which requires us to use a different RestClient
as well.
To fix this, AzureServiceClientCredentials
is introduced to extend ServiceClientCredentials
. It
- is still immutable
- requires an
AzureEnvironment
- matches the request base URL to the entries in
AzureEnvironment
to figure out where to authenticate and whichresourceId
to send.
This does not only solve the problem for Graph RBAC, but also supports Azure stack scenarios. Developers can create custom AzureEnvironment
instances and the implementation of AzureServiceClientCredentials
is able to log into public Active Directory service with on-premise resource IDs.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Is there any chance of also adding one other class that extends ServiceClientCredentials type that works with the Storage API (SAS Tokens), which are retrieved from the Insights API?
This would enable the direct retrieval of Azure VM metrics from Azure Storage Tables using only the RestClient from this library (rather than requiring the whole storage SDK).
It’s added and called
AzureTokenCredentials
.For now we have no plan to unify the authentication methods across services since there are just too many different needs and requirements.