Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Apr 20, 2022

Description

#22009 relies on the latest msal-extensions 1.0.0, but azure-identity will release a new version (Azure/azure-sdk-for-python#24083) as early as 2020-04-22. This will miss our 2022-04-20 code freeze deadline and 2022-04-22 release schedule for Apr 2022 sprint.

rdbms is the only module using azure-identity. #4908 first uses env vars to create azure.common.credentials.ServicePrincipalCredentials and passes the credential to client constructor. #17191 migrated to using azure.identity.ClientSecretCredential.

Since Azure CLI has migrated to MSAL (#19853), rdbms can now use ServicePrincipalCredential provided by azure.cli.core with environment credential.

We will fully support environment credential in the future (#10241).

Testing Guide

Set env vars:

AZURE_CLIENT_ID=...
AZURE_TENANT_ID=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a
AZURE_CLIENT_SECRET=...
AZURE_CLI_RDBMS_RM_URI=https://management.azure.com/
AZURE_CLI_RDBMS_SUB_ID=0b1f6471-1bf0-4dda-aec3-cb9272f09590

Run

az mysql server list

@ghost ghost requested a review from yonzhan April 20, 2022 05:38
@ghost ghost added the Auto-Assign Auto assign by bot label Apr 20, 2022
@ghost ghost assigned evelyn-ys Apr 20, 2022
@ghost ghost added this to the Apr 2022 (2022-04-26) milestone Apr 20, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 20, 2022

RDBMS


authority, _ = _get_authority_url(
# Override authority host if defined as env var
getenv(AZURE_AUTHORITY_HOST) or 'https://login.microsoftonline.com',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Override authority host if defined as env var
getenv(AZURE_AUTHORITY_HOST) or 'https://login.microsoftonline.com',
getenv(AZURE_TENANT_ID))
credentials = ServicePrincipalCredential(sp_auth, authority=authority)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is broken by the ServicePrincipalCredential's signature change in #29439.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants