Download the PHP package gawsoft/laravel-secrets without Composer
On this page you can find all versions of the php package gawsoft/laravel-secrets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gawsoft/laravel-secrets
More information about gawsoft/laravel-secrets
Files in gawsoft/laravel-secrets
Package laravel-secrets
Short Description Package for Laravel projects for read secrets from file. Second feature is to prevent to show secrets in logs.
License MIT
Informations about the package laravel-secrets
Laravel Secrets
A Laravel package with 2 main functions:
- Remove secrets from Logs. Prevent from secrets being leaked in logs.
- Load kubernetes/docker secrets from file
Demo & Usage
1. Remove secrets from Logs
Without laravel-secrets. secretpassword leaked in log
With laravel-secrets, secretpassword is redacted before send log
2. Read secret from file.
Minimum requirements
- PHP 8.0
- Laravel 8.0
Installation
Install package assets
Configuration
Example config/secrets.php:
1. Read secrets from file
When you install laravel in docker or kubernetes for security reason your devops team inject secrets to file in the container. This package will read this secret with function laravel_secrets.
2. Read encrypted secrets from file
You can also encrypt secrets with Laravel App Key and auto encrypt after loaded encrypted string to Laravel config.
3. Remove secrets from Logs
During logs process in Laravel my package will remove sensitive data from log message. Default will remove all values saved in all configs. You can change this options in config/secrets.php via set whitelist and blacklist.
Tests
RoadMap
- Add Strategy for AWS Secret Manager
- Add Strategy for Hashicorp Vault
How to write new strategy
- Create new file LaravelSecrets\Secrets\Providers\MySecretProvider.php
-
Write your driver
- Register as default strategy in configs/secrets.php
License
MIT
All versions of laravel-secrets with dependencies
illuminate/contracts Version ^10|^11
illuminate/console Version ^10|^11
illuminate/log Version ^10|^11