tokenly / laravel-vault
A Laravel interface for Hashicorp Vault
Installs: 15 823
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 5
Forks: 7
Open Issues: 2
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.2
- jippi/vault-php-sdk: ^2.0
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0||~6.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-10-27 04:43:44 UTC
README
A Laravel interface for Hashicorp Vault.
This is a wrapper around https://github.com/jippi/vault-php-sdk.
Installation
Add the package via composer
composer require tokenly/laravel-vault
Usage with Laravel
Add the Service Provider
Add the following to the providers
array in your application config:
Tokenly\Vault\VaultServiceProvider::class,
Set the environment variables
VAULT_ADDR=https://127.0.0.1:8200
VAULT_CA_CERT_PATH=/path/to/ca.cert
Use it
// get the vault seal status $vault = app('vault'); $seal_status = $vault->sys()->sealStatus(); // seal the vault $token = '1389b58b-0000-4800-a000-1d8869aee825'; // your vault authentication token $vault = app('vault')->setToken($token); $vault->sys()->seal();