Home > Net >  How to fetch Azure KeyVault secrets values dynamically in PHP
How to fetch Azure KeyVault secrets values dynamically in PHP

Time:10-08

I'm using wapacro library to fetch KeyVault secrets into my laravel app. There's a function to retrieve secrets (not values) getSecrets() maximum of 25 secrets. And to retrieve a specific secret there's getSecret() function. But I would like to dynamically fetch secrets from keyvault and their values while application(laravel app) loads instead of calling getSecret() with one secret name. Is there a way to implement this?

CodePudding user response:

I found the solution. I just had to check if the nextLink in response from getSecrets() is null or not. If it is I have to call the function getSecrets($nextLink) recursively.

  • Related