truesocialmetrics / vault
Vault for private keys and secret data
Installs: 7 042
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.1.0
Suggests
- aws/aws-sdk-php: Allow using AWS SSM parameter store
README
Vault for private keys and secret data
tt-vault
Created by Rostislav Mykhajliw
Introduction
Twee\Service\Vault is a simple vault for storing private keys/tokens and pther secret data
Features / Goals
- Secure store data on filesystem
- Simple access
- Errors and leaks protections
Installation
Main Setup
With composer
- Add this to your composer.json:
"require": { "truesocialmetrics/vault": "*", }
- Now tell composer to download Twee\Service\Vault by running the command:
$ php composer.phar update
Usage
$vault = new Vault\File('path/to/vault.php'); $vault->get('my-token'); // ['abc' => 123] $vault->get('non-exist'); // throw InvalidArgumentException
Sample vault.php file
<?php
return [
'vault' => [
'my-token' => [
'abc' => 123,
],
],
];
Sample with AWS SSM parameter store
$vault = new Vault\Aws([ 'credentials' => [ 'key' => '...', 'secret' => '...', ], 'region' => 'us-east-1', 'version' => 'latest', ]); $vault->get('my-token'); // ['abc' => 123] $vault->get('non-exist'); // throw InvalidArgumentException