freebuu/laravel-vault is a Laravel package for laravel package for hashicorp vault.
It currently has 5 GitHub stars and 0 downloads on Packagist.
Install it with composer require freebuu/laravel-vault.
Discover more Laravel packages by freebuu
or browse all Laravel packages to compare alternatives.
Last updated
Get your .env from remote (HaspiCorp Vault) on deploy
Warning! This is very beginning alpha version without usable realise. Not recommended for using now
composer require freebuu/laravel-vault
php artisan vendor:publish --tag=config --provider="FreeBuu\LaravelVault\LaravelVaultServiceProvider"
Add patches from Vault and variables to secrets in vault.php
'vars' => [
'patches' => [
'/secret/database/{env}'
],
'patch_variables' => [
'env' => 'production',
],
]
Make vault.json file with Vault options - structure MUST be same as vault.php
You can override here ALL options from vault.php
{
"connections": {
"vault": {
"host": "http://vault",
"role_id": "your_secret_id",
"secret_id": "your_secret_id"
}
}
}
base64 -w 0 vault.json | php artisan vault:get --stdin --b64
If all OK (credentials is actual and have access to secret patches), you see merged values from all patches:
+---------+------------+
| Key | Value |
+---------+------------+
| secret1 | value1 |
| secret2 | value2 |
+---------+------------+
Here is a shorthand command special from CI
php artisan vault:ci s.JYVfe67632rRDtyf --app=my_project --env=production