Download the PHP package technicalguru/vault without Composer
On this page you can find all versions of the php package technicalguru/vault. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download technicalguru/vault
More information about technicalguru/vault
Files in technicalguru/vault
Package vault
Short Description A flexible, lightweight PHP-based vault to provide secrets dynamically
License LGPL-3.0-or-later
Informations about the package vault
technicalguru/php-vault
A flexible PHP-based vault to provide secrets dynamically
License
This project is licensed under GNU LGPL 3.0.
Installation
By Composer
By Package Download
You can download the source code packages from GitHub Release Page
Hashicorp Setup
The procedure is best described at Hashicorp Blog. It describes
how to create an approle
. Here is the essence of it:
Please notice that you need to recreate the secret ID whenever you change the application role or a policy.
Examples
Create a HashicorpVault
Please note that this vault is actually a client to an existing Hashicorp Vault.
Create a MemoryVault
Create a FileVault
The secrets file (JSON) shall look like this:
Retrieving a secret
A value in a secret is NULL
when the key does not exists whereas an exception will be thrown when the secret itself cannot be found
or an error occurred while retrieval.
Using lazy callback credentials
You can use the SecretProvider
or CredentialsProvider
helper classes to pass them credentials without knowing where they come from
or how to use a vault.
The CredentialsProvider
takes additional constructor arguments that define, which keys in the secret provide username and password. The
defaults are as given above for the SecretProvider
.
Contribution
Report a bug, request an enhancement or pull request at the GitHub Issue Tracker.