I noticed in SharedTokenCacheCredentials it only works on windows.
I used to use get_azure_cli_credentials and does the cli have a shared token cache across platforms?
It'd be great for DefaultAzureCredential to work using the logged in azure cli account when developing locally and then no code changes needed when deploying to Azure with managed identity.
Hi @damienpontifex
We definitely wants to address this scenario, we'll discuss with the team how to do it correctly :)
Thanks @lmazuel I'd be happy to contribute a change if there's guidance on the best way to do this.
Thanks @damienpontifex , we are working on the design , I don't think this issue is the best one for contribution, but I will update this thread as soon as we have a candidate PR.
FYI - We are still discussing this internally and should have an update soon.
@jongio Hi. Is there any update for this issue? :)
Thanks for checking in. We are discussing when to do a preview of this. Hopefully within the next couple of weeks, but we still have some remaining design to flesh out. I'll earmark this to update when we have something ready.
@schaabs
Hi :) Any luck with this issue? It would be really nice to be able to use play with the SDK without having to create additional service accounts :(
The first preview of DefaultAzureCredential integrating the Azure CLI is available now in azure-identity 1.4.0b1. In this preview, DefaultAzureCredential will attempt to authenticate with the identity you've set up with az login, with no configuration required in your code. Please try it out and let us know what you think.
Thanks @chlowell I did some initial testing with some KeyVault code I have and seems good so far :)
Any idea when these credentials will also make their way to the python azure management libraries? e.g. DNS
Adopting these credentials in management libraries is tracked by #9310. I don't know the timeline (@zikalino may have more details) but a comment on that issue links to an adapter you can try in the meantime.
@damienpontifex - Just so you know the python version of AzureIdentityCredentialWrapper has been added to Azure Identity Extensions https://github.com/jongio/azidext#python
We are still a ways from officially supporting Azure Identity in Mgmt plane libraries, but it is something we are actively working on. For now, we must use adapters.
Thanks for opening this issue. I'm closing it now because the current preview version of azure-identity has this support. Please open another issue if you encounter problems using it.
Most helpful comment
The first preview of
DefaultAzureCredentialintegrating the Azure CLI is available now in azure-identity 1.4.0b1. In this preview,DefaultAzureCredentialwill attempt to authenticate with the identity you've set up withaz login, with no configuration required in your code. Please try it out and let us know what you think.