mefistobaal / azurekeyvault
A simple wrapper for the Azure RM Key Vault API.
Installs: 6 442
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 10
pkg:composer/mefistobaal/azurekeyvault
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.3
This package is auto-updated.
Last update: 2025-12-17 06:56:21 UTC
README
Overview
A simple Proof Of Concept wrapper for the Azure RM API making it easy to comsume Azure Key Vault Secrets and Encrypt\DeCrypt strings with a Key.
More information about Azure Key Vault can be found here: https://docs.microsoft.com/en-us/azure/key-vault/
No tests implemented.
Usage
- Create an Azure AD application with access to the key vault you want to interact with.
- Install the project via composer.
- Follow one of the examples.
Requirements
- PHP 8+
Example
More examples can be found in the examples folder.
require_once '../../vendor/autoload.php'; use Vault\Azure\Authorization\Token as azureAuthorisation; use Vault\Azure\Keyvault\Secret as keyVaultSecret; $keyVault = new keyVaultSecret( [ 'accessToken' => azureAuthorisation::getKeyVaultToken( [ 'appTenantDomainName' => 'contoso.onmicrosoft.com', 'clientId' => '00000000-0000-0000-0000-000000000000', 'clientSecret' => '5Ki1PHwjbCuDqPQ2f/AAydhjdfhdsdndks7887jhjhs=' ] ), 'keyVaultName' => 'keyVaultName' ] ); // get the latest value for the secret var_dump($keyVault->get('T1'));
Contributors
- Ben Taylor
- MefistoBaal