Skip to content

{Identity} Support UsernamePasswordCredential.authenticate#13604

Merged
jiasli merged 1 commit intoAzure:identityfrom
jiasli:identity-password
May 21, 2020
Merged

{Identity} Support UsernamePasswordCredential.authenticate#13604
jiasli merged 1 commit intoAzure:identityfrom
jiasli:identity-password

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented May 21, 2020

Description
Due to the removal of UsernamePasswordCredential.authenticate, when username+password is used as the authentication method, Azure CLI can't persist user's AuthenticationRecord and utilize refresh tokens stored in MSAL cache. In such case, Azure CLI will have to save user's password by itself, which is absolutely not a good idea from a security perspective. See Azure/azure-sdk-for-python#11449, Azure/azure-sdk-for-python#11546

This PR solves the above issue by incorporating the changes from Azure/azure-sdk-for-python#11528

⚠ However, using this AuthenticationRecord correctly remains unsolved: Azure/azure-sdk-for-python#11448. We use InteractiveBrowserCredential as a temporary workaround:

return InteractiveBrowserCredential(authentication_record=auth_record, disable_automatic_authentication=True,
enable_persistent_cache=True)

Testing Guide

az login -u admin4@AzureSDKTeam.onmicrosoft.com -p xxxx

@jiasli jiasli changed the title Support UsernamePasswordCredential.authenticate {Identity} Support UsernamePasswordCredential.authenticate May 21, 2020
@jiasli jiasli self-assigned this May 21, 2020
@jiasli jiasli merged commit 5eec289 into Azure:identity May 21, 2020
@jiasli jiasli deleted the identity-password branch May 21, 2020 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants