Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bentaylorwork/php-azure-key-vault
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.
https://github.com/bentaylorwork/php-azure-key-vault
azure azure-key-vault azure-keyvault azure-php
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/bentaylorwork/php-azure-key-vault
- Owner: bentaylorwork
- License: mit
- Created: 2017-11-19T19:42:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-22T11:01:36.000Z (about 3 years ago)
- Last Synced: 2024-11-01T04:05:24.249Z (3 months ago)
- Topics: azure, azure-key-vault, azure-keyvault, azure-php
- Language: PHP
- Homepage: https://www.bentaylor.work
- Size: 6.84 KB
- Stars: 13
- Watchers: 2
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP - Azure Key Vault
## 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
1) Create an Azure AD application with access to the key vault you want to interact with.
2) Install the project via composer.
3) Follow one of the examples.## Example
More examples can be found in the examples folder.
```php
require_once '../../vendor/autoload.php';use bentaylorwork\azure\authorisation\Token as azureAuthorisation;
use bentaylorwork\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