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 language-specific examples with AzureIdentity SDK to access Azure resources #187

Closed
6 tasks done
aramase opened this issue Oct 1, 2021 · 2 comments
Closed
6 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@aramase
Copy link
Member

aramase commented Oct 1, 2021

  • Add language-specific examples with SDK to access Azure resources
    • Different languages
      • go
      • .NET
      • Python
      • JavaScript
      • Java
    • Examples with how to access different Azure resources
      • Key Vault

The Azure Identity beta sdks are available for node, python, java and .NET

@aramase aramase added the enhancement New feature or request label Oct 1, 2021
@aramase aramase self-assigned this Oct 1, 2021
@aramase aramase added this to the v0.7.0 milestone Oct 25, 2021
@aramase aramase removed this from the v0.7.0 milestone Feb 2, 2022
@salaxander salaxander added this to the v0.11.0 milestone Jun 8, 2022
@aramase aramase removed this from the v0.11.0 milestone Jun 29, 2022
@ghost
Copy link

ghost commented Aug 25, 2022

I tried to use ManagedIdentityCredential with Azure Workload Identity to access a blob in a storageaccount, like this:

var credential = new ManagedIdentityCredentialBuilder().build();

Authentication works, but repeated accesses are slow (30s) and I receive the following log messages:

2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.identity.ManagedIdentityCredential - Azure Identity => Managed Identity environment: AZURE AKS TOKEN EXCHANGE
2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.identity.ManagedIdentityCredential - Azure Identity => getToken() result for scopes [https://storage.azure.com/.default]: SUCCESS
2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.core.implementation.AccessTokenCache - Acquired a new access token at 1661424686 seconds after expiry. Retry may be attempted after 30 seconds.

The strange timestamp is now - 3600 - 26

There has been a bug against azure-identity with a similar error message: Azure/azure-sdk-for-java#25598

I assume that I am missing something. Can you comment?

The setup works, as using ClientAssertionCredential works just fine. I can connect and read the properties of the blob, authentication is quick and new Azure AD tokens are fetched every 55 minutes.

@aramase
Copy link
Member Author

aramase commented Aug 25, 2022

I tried to use ManagedIdentityCredential with Azure Workload Identity to access a blob in a storageaccount, like this:

var credential = new ManagedIdentityCredentialBuilder().build();

Authentication works, but repeated accesses are slow (30s) and I receive the following log messages:

2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.identity.ManagedIdentityCredential - Azure Identity => Managed Identity environment: AZURE AKS TOKEN EXCHANGE
2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.identity.ManagedIdentityCredential - Azure Identity => getToken() result for scopes [https://storage.azure.com/.default]: SUCCESS
2022-08-25 13:51:52.535 [parallel-4] [INFO] com.azure.core.implementation.AccessTokenCache - Acquired a new access token at 1661424686 seconds after expiry. Retry may be attempted after 30 seconds.

The strange timestamp is now - 3600 - 26

There has been a bug against azure-identity with a similar error message: Azure/azure-sdk-for-java#25598

I assume that I am missing something. Can you comment?

The setup works, as using ClientAssertionCredential works just fine. I can connect and read the properties of the blob, authentication is quick and new Azure AD tokens are fetched every 55 minutes.

@FlorianZieglerFeuerbach Thanks for commenting here. Azure Workload Identity only sets up the env vars used by sdks. For sdk specific issues, I would recommend opening an issue in the corresponding sdk repo so maintainers of the sdk would be able to respond to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants