Skip to content

Incorporate architecture board feedback#5728

Merged
chlowell merged 13 commits intoAzure:masterfrom
chlowell:identity
Jun 7, 2019
Merged

Incorporate architecture board feedback#5728
chlowell merged 13 commits intoAzure:masterfrom
chlowell:identity

Conversation

@chlowell
Copy link
Member

@chlowell chlowell commented Jun 6, 2019

This closes #5631:

  • SupportsGetToken renamed TokenCredential
  • added DefaultAzureCredential, a chain of environment -> managed identity credentials
  • TokenCredentialChain.__init__ takes credentials as variadic arguments
  • get_token takes scopes as variadic arguments

Some other changes:

  • Added ImdsCredential and MsiCredential to support both flavors of managed identity
  • ManagedIdentityCredential becomes a factory for ImdsCredential and MsiCredential. Its constructor returns MsiCredential if MSI environment variables are set, ImdsCredential otherwise.
  • Some small fixes and minor tidying

Live tests (with recordings) and documentation updates are my next work items.

@chlowell chlowell added Client This issue points to a problem in the data-plane of the library. Azure.Identity labels Jun 6, 2019
@chlowell chlowell self-assigned this Jun 6, 2019
@adxsdk6
Copy link

adxsdk6 commented Jun 6, 2019

Can one of the admins verify this patch?

@bryevdv
Copy link
Contributor

bryevdv commented Jun 7, 2019

Modulo things I don't have context to evaluate (e.g IMDS and MSI creds needing to be internal) LGTM

Copy link

Choose a reason for hiding this comment

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

Does it make sense to export these without the Async prefix, so that the same credential names can be used in both the sync and async?

Copy link
Member Author

Choose a reason for hiding this comment

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

They could just have the same names, if we require a qualified import:

sync

from azure.identity import ClientSecretCredential

async

from azure.identity.aio import ClientSecretCredential

Which is fine by me. I followed the azure-core policy naming pattern here but I'm not attached to it.

Copy link

@schaabs schaabs left a comment

Choose a reason for hiding this comment

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

:shipit:

@chlowell chlowell merged commit c8991f7 into Azure:master Jun 7, 2019
@chlowell chlowell deleted the identity branch June 13, 2019 13:28
rajivnandivada pushed a commit to rajivnandivada/azure-sdk-for-python that referenced this pull request Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Identity Client This issue points to a problem in the data-plane of the library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorporate architecture board feedback

4 participants