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.

Add AzureServiceClientCredentials

See original GitHub issue

The 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 which resourceId 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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
solvingjcommented, Aug 24, 2016

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).

0reactions
jianghaolucommented, Oct 7, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to create ServiceClientCredential to be used with ...
First you need to create Active Directory application. See How to: Use the portal to create an Azure AD application and service principal...
Read more >
ServiceClientCredentials Class (Microsoft.Rest) - Azure for ...
Learn more about the Microsoft.Rest.ServiceClientCredentials in the Microsoft.Rest namespace.
Read more >
Authentication using Azure Management SDK
Instantiating the client class will require an implementation of the ServiceClientCredentials abstract class. Rather than implement that class ...
Read more >
Unable to use TokenCredentials instances from the azure ...
On Azure China, Trying to use the TokenCredentials instances from the identity library that work with ServiceClientCredentials instances ...
Read more >
Using the Azure SDK with Pulumi - samcogan.com
Azure.Management.Dns. We will import them and then add the ... Most of the Azure SDK clients need a “ServiceClientCredentials” object to ...
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