1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-25 11:02:56 +02:00

azuredns: use TenantID also for cli authentication (#2176)

This commit is contained in:
Orgad Shaneh 2024-05-07 21:56:05 +03:00 committed by GitHub
parent 983c181e45
commit 2ec9e42ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,7 +213,11 @@ func getCredentials(config *Config) (azcore.TokenCredential, error) {
return &timeoutTokenCredential{cred: cred, timeout: config.AuthMSITimeout}, nil
case "cli":
return azidentity.NewAzureCLICredential(nil)
var credOptions *azidentity.AzureCLICredentialOptions
if config.TenantID != "" {
credOptions = &azidentity.AzureCLICredentialOptions{TenantID: config.TenantID}
}
return azidentity.NewAzureCLICredential(credOptions)
case "oidc":
err := checkOIDCConfig(config)