"Request is missing a Bearer or PoP token." with Client token
See original GitHub issue- Package Name: @azure/keyvault-secrets
- Package Version: “^4.1.0”
- Operating system: Windows 10
- nodejs
- version: 14.8.0
- browser
- name/version: Chrome/84.0.4147.135
- typescript
- version: “^3.9.6”
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://docs.microsoft.com
Describe the bug Access Azure Key Vault from Gatsby/React app Initiate access with
this.keyVaultUri = `https://${keyVaultName}.vault.azure.net`;
const credential = new ClientSecretCredential(tenantId, clientId, clientSecret);
this.keyVaultClient = new SecretClient(this.keyVaultUri, credential);
Get a specific secret lke
get GoogleMapApiKey() {
return (async () => await this.keyVaultClient.getSecret('GoogleMapApiKey'));
}
Get the secret value like:
const mapsKey:KeyVaultSecret = await keyVault.GoogleMapApiKey();
setGoogleMapsApiKey(mapsKey.value ?? '' );
To Reproduce Steps to reproduce the behavior: Illustrated in the description
Expected behavior Should retrieve the secret from the Azure Key Vault.
Additional context This seems related to #9005. This is a Gatsby React app. I am using TypeScript.
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (16 by maintainers)
Top Results From Across the Web
Azure Key Vault Request is missing a Bearer or PoP token
When I try to read the value of my secret in the web GUI via link of my secret : "https://REDACTED.vault.azure.net/secrets/REDIS-PASSWORD/ ...
Read more >Accessing Key Vault with @azure/identity and get error ...
Accessing Key Vault with @azure/identity and get error 'Request is missing a Bearer or PoP token Error 401' · App Registered via Azure...
Read more >How To Access Azure Key Vault Secrets Through Rest API ...
Go to certificates and secrets section => click on new client secret => Give ... Here, request url for access token can be...
Read more >Authorizing requests - Postman Learning Center
Bearer tokens enable requests to authenticate using an access key, such as a JSON Web Token (JWT). The token is a text string,...
Read more >How is pop token more secure than bearer token?
Bearer token if lost (during transit over the wire) can give the holder of the token same privileges as the genuine owner. POP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One more thought for which I have NO experience is to add Azure function to the app. Since it is already being deployed to static web site on Azure this seems like a natural place to put a function?
Again thank you for the help.
Kevin
On Wed, Aug 26, 2020 at 1:05 PM Daniel Rodríguez notifications@github.com wrote:
It would. If you have time. Thank you.
Kevin
On Wed, Aug 26, 2020 at 1:01 PM Daniel Rodríguez notifications@github.com wrote: