Daniel Rodríguez
Daniel Rodríguez
Ok so, What I tried that worked was to use Jon's https://github.com/jongio/storage-node-resource-provider-getting-started There, Jon uses `KeyVault.msRestAzure.loginWithServicePrincipalSecret` to authenticate. Since that worked, I tried to reproduce this separately. Here's my isolated...
Both libraries have a method called `loginWithServicePrincipalSecret` that return a value of the class `ApplicationTokenCredentials`, **however** these classes are different in `ms-rest-azure` and in `@azure/ms-rest-nodeauth`. I haven't been able to...
Let's say I try this: ```ts const credentials = await msRestAzure.loginWithServicePrincipalSecret( process.env.AZURE_CLIENT_ID, process.env.AZURE_CLIENT_SECRET, process.env.AZURE_TENANT_ID ); const client = new KeyVault.KeyVaultClient(credentials as msRestNodeAuth.ApplicationTokenCredentials); ``` Emphasis in `credentials as msRestNodeAuth.ApplicationTokenCredentials`. Then I...
These two TokenCredentials are widely different: - https://github.com/Azure/ms-rest-nodeauth/blob/adea8415de97a8076006fbd9948123d09dfdd78d/lib/credentials/tokenCredentialsBase.ts - https://github.com/Azure/azure-sdk-for-node/blob/master/runtime/ms-rest/lib/credentials/tokenCredentials.js
The issue is that azure-keyvault 3.0.5 depends on ms-rest-azure 2.6.0, and keeps referencing the 2.6.0 types even if we install ms-rest-azure 3.0.0. This causes the type mismatch. Can we update...
I believe this issue is similar to https://stackoverflow.com/questions/58840006/multiple-instance-of-same-class-get-different-instanceof We use instanceof to check if we're receiving the supported credentials. instanceof will answer differently for different classes, even if they have...
> how does passing credentials from ms-rest-nodeauth to azure-keyvault work It doesn't, the names have been confusing me. It only works if we explicitly use the same version as azure-keyvault...
Can do! Thank you 🙌
Here's a PR: https://github.com/Azure/azure-sdk-for-node/pull/5171
@ramya-rao-a we’re just about to provide some functions to make parsing bearer challenges easier, see this comment: https://github.com/Azure/azure-sdk-for-js/pull/17315#discussion_r710509338 I’ll ping @xirzec to get his feedback.