PHPackages                             deepdigs/laravel-vault-suite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. deepdigs/laravel-vault-suite

ActiveLibrary[Security](/categories/security)

deepdigs/laravel-vault-suite
============================

Vault-powered secrets suite for Laravel with multi-backend support and operational tooling.

v0.1.0-alpha.2(6mo ago)00[4 PRs](https://github.com/omar-karray/laravel-vault-suite/pulls)MITPHPPHP ^8.2CI passing

Since Oct 20Pushed 1mo agoCompare

[ Source](https://github.com/omar-karray/laravel-vault-suite)[ Packagist](https://packagist.org/packages/deepdigs/laravel-vault-suite)[ Docs](https://github.com/omar-karray/laravel-vault-suite)[ GitHub Sponsors](https://github.com/omar-karray)[ RSS](/packages/deepdigs-laravel-vault-suite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (16)Versions (7)Used By (0)

Laravel Vault Suite
===================

[](#laravel-vault-suite)

[![CI](https://github.com/omar-karray/laravel-vault-suite/actions/workflows/run-tests.yml/badge.svg)](https://github.com/omar-karray/laravel-vault-suite/actions/workflows/run-tests.yml)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5c95bd6d74108b23f9fa881ae34d34b1c0194f6c7c5fb2f2a1ff6eea5d9e4c2f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656570646967732f6c61726176656c2d7661756c742d73756974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deepdigs/laravel-vault-suite)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3378e1b88ed5ffb427d22ca7d1b2b4ee82d7cbe09fb4430dbe214c7c44261fd2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6d61722d6b61727261792f6c61726176656c2d7661756c742d73756974652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/omar-karray/laravel-vault-suite/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/aae494034dd1537349338ea0f86f4821b9678bd7ba1c7f73c97a4d8ccef367f6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6d61722d6b61727261792f6c61726176656c2d7661756c742d73756974652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/omar-karray/laravel-vault-suite/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)

Laravel Vault Suite connects your Laravel applications to dedicated secrets backends such as HashiCorp Vault and OpenBao. It ships with an extensible driver system, an expressive facade, and artisan tooling so you can read, write, and manage secrets without copying values into `.env` files.

📘 Documentation:

Features
--------

[](#features)

- **Command-first operations** – Ship-ready Artisan commands (`vault:unseal`, `vault:enable-engine`, …) for the tasks operators and developers run every day.
- **Fluent PHP API** – Fetch, write, list, and delete secrets through a clean service/facade when you need programmatic access.
- **Multi-backend driver manager** – Vault and OpenBao out of the box with an extensible contract for additional backends.
- **Configuration &amp; bootstrap blueprint** – Centralise driver settings today and hydrate Laravel configuration at runtime as the bootstrapper lands.
- **Documentation site** – [Guides on GitHub Pages](https://omar-karray.github.io/laravel-vault-suite/) cover installation, commands, configuration, and the API surface.

Installation
------------

[](#installation)

```
composer require deepdigs/laravel-vault-suite
```

Publish the configuration file to tailor drivers and bootstrap behaviour:

```
php artisan vendor:publish --tag="vault-suite-config"
```

Add the relevant environment variables in your `.env` file (or server configuration):

```
VAULT_SUITE_DRIVER=vault
VAULT_ADDR=http://127.0.0.1:8200
VAULT_TOKEN=your-root-or-app-token
VAULT_ENGINE_MOUNT=secret
VAULT_ENGINE_VERSION=2
```

Usage
-----

[](#usage)

Read a secret as an array:

```
use Deepdigs\LaravelVaultSuite\Facades\LaravelVaultSuite;

$database = LaravelVaultSuite::fetch('apps/laravel/database');
```

Read a specific key from the secret payload:

```
$password = LaravelVaultSuite::fetch('apps/laravel/database', 'password');
```

Write or update a secret:

```
LaravelVaultSuite::put('apps/laravel/database', [
    'username' => 'laravel',
    'password' => 'new-password',
]);
```

List secret keys beneath a path:

```
$keys = LaravelVaultSuite::list('apps/laravel');
```

Artisan commands
----------------

[](#artisan-commands)

- `vault:unseal` – Submit key shards (from CLI or a file) and track progress until Vault is unsealed. ```
    php artisan vault:unseal --file=storage/keys/unseal.txt --reset
    ```
- `vault:enable-engine` – Mount and configure secrets engines with typed options. ```
    php artisan vault:enable-engine secret/apps --option=version=2 --local
    ```

See [docs/commands.md](docs/commands.md) for the full option reference.

Local development
-----------------

[](#local-development)

- Use a multi-root VS Code workspace that includes this package and your Laravel app.
- Register the package as a [Composer path repository](https://getcomposer.org/doc/05-repositories.md#path) for hot-linked development.
- Only run `composer update deepdigs/laravel-vault-suite` after changing this package’s `composer.json` or autoloading configuration.
- When tagging for production use, publish to Packagist and update your application to use the release tag instead of the path repository.

Testing
-------

[](#testing)

```
composer test
```

Documentation
-------------

[](#documentation)

Project docs are powered by MkDocs. Preview locally with:

```
pip install mkdocs mkdocs-material
mkdocs serve
```

The documentation source lives in `docs/` and can be deployed to GitHub Pages via `mkdocs gh-deploy --clean`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Guide: using Vault Suite in development
---------------------------------------

[](#guide-using-vault-suite-in-development)

1. **Install &amp; publish config** (see Installation above). Populate `VAULT_ADDR`, `VAULT_TOKEN`, and mount settings in `.env` or your secret manager.
2. **Verify connectivity**```
    php artisan vault:status
    php artisan vault:enable-engine secret/apps --option=version=2
    ```
3. **Load existing secrets or commit new ones**```
    php artisan vault:read secret/apps/database --json
    ```

    Write new values from PHP: ```
    use Deepdigs\LaravelVaultSuite\LaravelVaultSuite;

    app(LaravelVaultSuite::class)->put('secret/apps/database', [
        'username' => 'laravel',
        'password' => Str::random(32),
    ]);
    ```
4. **Script it** – combine commands in deployment pipelines (e.g. run `vault:list` to confirm a rotation, then fetch credentials for tests).

Guide: loading configuration from Vault
---------------------------------------

[](#guide-loading-configuration-from-vault)

Until the bootstrapper ships, load secrets in a service provider or dedicated config loader:

```
use Deepdigs\LaravelVaultSuite\LaravelVaultSuite;

class VaultConfigServiceProvider extends ServiceProvider
{
    public function boot(LaravelVaultSuite $vault): void
    {
        if (! app()->environment('production')) {
            return;
        }

        $database = $vault->fetch('secret/apps/database');

        config([
            'database.connections.mysql.username' => $database['username'],
            'database.connections.mysql.password' => $database['password'],
        ]);
    }
}
```

> ℹ️ When the bootstrapper lands, you will be able to map these keys directly inside `config/vault-suite.php` and hydrate them during `config:cache`.

Guide: securing database credentials with Vault
-----------------------------------------------

[](#guide-securing-database-credentials-with-vault)

1. **Create/mount a KV engine** dedicated to database credentials: ```
    php artisan vault:enable-engine database/credentials --type=kv --option=version=2
    ```
2. **Store the credentials** from an operator machine or CI job: ```
    php artisan vault:read database/credentials/mysql-root --json   # verify
    ```

    Or programmatically via Laravel Vault Suite: ```
    $vault->put('database/credentials/mysql-app', [
        'username' => 'app',
        'password' => Str::random(40),
    ]);
    ```
3. **Load credentials into Laravel** at runtime (see provider example above) or inject them into environment variables before `config:cache`.
4. **Rotate safely**: rotate the credential in Vault (`put` new password), then redeploy the application so it fetches the updated secret. Combine with Vault’s DB secrets engine if you want automated rotation.

### Deployment pattern

[](#deployment-pattern)

- Run `php artisan vault:status` during health checks.
- If Vault is sealed, run `vault:unseal` with the key shards available to your SRE team or automation.
- Re-run `config:cache` after updating configuration if you load secrets at boot.

### Tips

[](#tips)

- Never check tokens or key shards into source control. Use your CI/CD secret store.
- Grant the Laravel application a limited token (e.g. via AppRole) scoped to the paths it needs.
- Combine the suite with Vault’s audit logging to track access.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance80

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bccef1397d2511a74bbc8253f543043a043d81bea288ddc6d1f20c89919a557?d=identicon)[omar-karray](/maintainers/omar-karray)

---

Top Contributors

[![omar-karray](https://avatars.githubusercontent.com/u/58574695?v=4)](https://github.com/omar-karray "omar-karray (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelvaultsecretsdeepdigsopenbaolaravel-vault-suite

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/deepdigs-laravel-vault-suite/health.svg)

```
[![Health](https://phpackages.com/badges/deepdigs-laravel-vault-suite/health.svg)](https://phpackages.com/packages/deepdigs-laravel-vault-suite)
```

###  Alternatives

[spatie/laravel-ciphersweet

Use ciphersweet in your Laravel project

416718.4k1](/packages/spatie-laravel-ciphersweet)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
