Closed juergenbr closed 8 months ago
@g2vinay could you please take a look at this issue @juergenbr has filed? /cc @billwert
I am also seeing this issue when I am using the Spring Boot 2.7.2 ,spring-cloud-azure-dependencies - 4.3.0, Java 11.
I am using Azure role-based access control and assigned the Key Vault Administrator role to the System Managed Identity (created from Webapp). I am using Object (principal) ID for the client-id.
I am seeing this issue both in User Managed and System Managed Identity
spring.cloud.azure.keyvault.secret.property-source-enabled=true spring.cloud.azure.keyvault.secret.property-sources[0].credential.client-id=XXXXX spring.cloud.azure.keyvault.secret.property-sources[0].credential.managed-identity-enabled=true spring.cloud.azure.keyvault.secret.property-sources[0].profile.tenant-id=XXXXXX spring.cloud.azure.keyvault.secret.property-sources[0].endpoint=XXXXX
Hi @kalyanrn , thanks for using the Spring Cloud Azure Starter Key Vault Secret 4.3.0!
You can follow this just updated doc https://docs.microsoft.com/azure/spring-apps/tutorial-managed-identities-key-vault
@juergenbr
Can you try out the latest identity release v.1.9.1 and check if the issue still persists ?
Let us know if you still need any help/assistance on this.
Describe the bug ManagedIdentityCredentialBuilder with User assigned managed identity client id causes the following error:
2022-07-20 05:40:55.983 ERROR 42 --- [ parallel-1] c.a.identity.ManagedIdentityCredential : Azure Identity => ERROR in getToken() call for scopes [https://vault.azure.net/.default]: Server returned HTTP response code: 400 for URL: http://169.254.129.7:8081/msi/token?resource=https%3A%2F%2Fvault.azure.net&api-version=2019-08-01&client_id=a81093e4-baeb-424d-b3ee-62dd7fcf5028
Exception or Stack Trace
To Reproduce 1) Create Azure Function with VNet Integration and Private Endpoint 2) Add a user-assigned managed identity 3) Deploy function code that uses the Key Vault SDK and uses Managed Identity authentication 4) Call function and trigger execution of below code snipet
Code Snippet
Expected behavior A successful call to the Key Vault to retrieve the secret value.
Screenshots Not applicable
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context Add any other context about the problem here.
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report