Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it works on Azure China (21Vianet) ? #58

Open
eduardoferrari opened this issue Dec 17, 2024 · 1 comment
Open

Does it works on Azure China (21Vianet) ? #58

eduardoferrari opened this issue Dec 17, 2024 · 1 comment

Comments

@eduardoferrari
Copy link

I'm trying to deploy some certificates in china, I can do the registration with the KV but when I try to order the certificate I'm getting error 500 when it tries to "Getting DNS Client Token from AAD"

DBUG: Getting DNS Client Token from AAD...
ERROR: Unhandled exception. Azure.Identity.AuthenticationFailedException: DefaultAzureCredential authentication failed due to an unhandled exception:
ERROR: ---> Azure.Identity.AuthenticationFailedException: ManagedIdentityCredential authentication failed: Service request failed.
ERROR: Status: 500 (Internal Server Error)

I'm connecting with a System Managed Identity in a container
az cloud set --name "AzureChinaCloud"
az login --identity
az account set --subscription $TargetSubscriptionId

It is connecting properly to the China environment and setting the context to the correct subscription.

Thank you for the support.

@eduardoferrari
Copy link
Author

Ok, I think I found it looking into the source code...

On the DnsFactory.cs at line 54 you have a fixed string "https://management.azure.com/.default" and this one is different for China....

I will make a change to make it dynamic and a PR later to solve it...

But please, would be nice to have some other eyes to validate my idea.

Thank you

eduardoferrari pushed a commit to eduardoferrari/az-acme-cli that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant