forked from Azure/azure-sdk-for-rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cataggar
commented
Dec 28, 2023
cataggar
commented
Dec 30, 2023
sdk/identity/src/token_credentials/client_secret_credentials.rs
Outdated
Show resolved
Hide resolved
sdk/identity/src/token_credentials/client_secret_credentials.rs
Outdated
Show resolved
Hide resolved
cataggar
changed the title
add SpecificAzureCredential
add azure_identity::new_credential(), SpecificAzureCredential, AppServiceManagedIdentityCredential, VirtualMachineManagedIdentityCredential
Jan 1, 2024
Published to Azure#1532. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds
azure_identity::new_credential()
,SpecificAzureCredential
,AppServiceManagedIdentityCredential
, andVirtualMachineManagedIdentityCredential
.azure_core::new_http_client()
,azure_identity::new_credential()
is a function that simplifies the most common use cases.SpecificAzureCredential
fixes add SpecificAzureCredential Azure/azure-sdk-for-rust#1503. It provides an easy and fast way to specify a specific credential type at runtime using anAZURE_CREDENTIAL_TYPE
environment variable.AppServiceManagedIdentityCredential
andVirtualMachineManagedIdentityCredential
are split off of and make use ofImdsManagedIdentityCredential
. This fixes split up ImdsManagedIdentityCredential Azure/azure-sdk-for-rust#1495.Most all of the credentials have a
create(options: impl into<TokenCredentialOptions>) -> Result<Self>
now. This is similar to how C# hasTryCreate
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 isVirtualMachineManagedIdentityCredential
, 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 settingAZURE_CREDENTIAL_TYPE
tovirtualmachine
. You can also include them using theDefaultAzureCredentialBuilder
.There are a few changes to make unit testing possible and easier. The
azure_core::NoopClient
is exposed behind atest
feature. I createazure_identity::env::Env
for access to environment variables.