-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Core} Drop msrestazure managed identity authentication
#31577
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
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the legacy msrestazure-based managed identity authentication in favor of MSAL across the CLI. Key changes include:
- Deletion of the
adal_authentication.pymodule and associated tests. - Simplification of
login_with_managed_identityandget_raw_tokenin_profile.pyto exclusively use MSAL credentials. - Removal of configuration flags (
use_msal_managed_identity) and telemetry entries for the old flow.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_aad_auth.py | Drop import of MSIAuthenticationWrapper unused after removal |
| src/azure-cli-core/azure/cli/core/tests/test_profile.py | Remove all msrestazure-based MSI tests and rename MSAL tests |
| src/azure-cli-core/azure/cli/core/telemetry.py | Clean up telemetry property and function for MSAL flag |
| src/azure-cli-core/azure/cli/core/auth/adal_authentication.py | Removed entirely (legacy ADAL wrapper) |
| src/azure-cli-core/azure/cli/core/_profile.py | Simplify MSI flows: drop login_with_managed_identity_msrestazure and related branches |
|
We can actually merge #31066 together with this PR. But I'm also fine with split PRs |
| from azure.cli.command_modules.appconfig._utils import get_appconfig_data_client | ||
| from azure.cli.core._profile import Profile | ||
| from azure.cli.core.auth.credential_adaptor import CredentialAdaptor | ||
| from azure.cli.core.auth.adal_authentication import MSIAuthenticationWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect test cases using MSIAuthenticationWrapper have been skipped in #31115. @zhoxing-ms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+App Service team @albertofori for awareness
Related command
az login --identityDescription
Managed identity authentication with MSAL was added in 2.71.0 (#31092) and made the default in 2.73.0 (#25959). No issues have been reported.
This PR removes
msrestazure's managed identity authentication in 2.75.0.The config option
core.use_msal_managed_identityand its telemetry are removed.msrestazurewill be removed by #31066.