Skip to content
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

add azure_identity::new_credential(), SpecificAzureCredential, AppServiceManagedIdentityCredential, VirtualMachineManagedIdentityCredential #78

Closed
wants to merge 42 commits into from

Conversation

cataggar
Copy link
Owner

@cataggar cataggar commented Dec 26, 2023

This adds azure_identity::new_credential(), SpecificAzureCredential, AppServiceManagedIdentityCredential, and VirtualMachineManagedIdentityCredential.

Most all of the credentials have a create(options: impl into<TokenCredentialOptions>) -> Result<Self> now. This is similar to how C# has TryCreate shown in Azure#1495. They are able to check environment variables or files to see if they can be created, something milliseconds fast. The main exception is VirtualMachineManagedIdentityCredential, which does not have anything quick to check, so it is disabled by default. This is a breaking behavioral change that allows the default credentials to be faster by default. You can still opt in to using them by setting AZURE_CREDENTIAL_TYPE to virtualmachine. You can also include them using the DefaultAzureCredentialBuilder.

There are a few changes to make unit testing possible and easier. The azure_core::NoopClient is exposed behind a test feature. I create azure_identity::env::Env for access to environment variables.

@cataggar cataggar changed the title add SpecificAzureCredential add azure_identity::new_credential(), SpecificAzureCredential, AppServiceManagedIdentityCredential, VirtualMachineManagedIdentityCredential Jan 1, 2024
@cataggar
Copy link
Owner Author

cataggar commented Jan 1, 2024

Published to Azure#1532.

@cataggar cataggar closed this Jan 1, 2024
@cataggar cataggar deleted the SpecificAzureCredential branch January 1, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add SpecificAzureCredential split up ImdsManagedIdentityCredential
1 participant