承接 trenaldas/hush-hush 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

trenaldas/hush-hush

Composer 安装命令:

composer require trenaldas/hush-hush

包简介

AWS Secrets Manager helper package

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads

Composer package to help with AWS Secrets Manager service secrets (hush-hushes). This package will automatically update your database credentials from AWS Secrets Manager secret.

Installation

Use Composer to install Hush-Huhs to your Laravel project

composer require trenaldas/hush-hush

After installing Hush-Hush Composer package, use command below:

php artisan hush-hush:install

This will publish config file to config/hush-hush.php and will create empty hush-hush.yml file in your root directory.

Config File

Config file has three main configs:

environments
exception_throw
every_request

'environment' config describes the environments you want your secrets to be retrieved at. It's set to have two most common environments by default: staging and production. You should amend these accordingly with your project environment names (best do it before running database and secret commands).

'exception_throw' config is set to false by default. This will log errors in case of any failure (fore example while running composer install in the environment that does not have access to AWS SM)

'every_request' config is set to true by default. Calls SM with every request, if set to false - checks if connection is okay, and if not, calls SM to update db credentials.

Usage

For database login details

Use command:

php artisan hush-hush:database

For any other secret to store

Use command:

php artisan hush-hush:create-secret

All secrets created can be manually edited, deleted or added in hush-hush.yml file.

To get secrets anywhere in your code

Use class HushHush function uncover('localSecretName') to get secret.

.yml file example

database:
  name: mysql
  environemts:
    local: hush-hush-secret-local
    staging: hush-hush-secret-staging
    production: hush-hush-secret-production
secrets:
  local_secret_name:
    local_name: app-secret
    environments:
      local: hush-hush-local
      staging: hush-hush-staging
      production: hush-hush-production
  local_super_secret_name:
    local_name: my-api-login
    environments:
      local: hush-hush-super-local
      staging: hush-hush-super-staging
      production: hush-hush-super-production       

Authors

  _   _           _           _   _           _
 | | | |_   _ ___| |__       | | | |_   _ ___| |__
 | |_| | | | / __| '_ \ _____| |_| | | | / __| '_ \
 |  _  | |_| \__ \ | | |_____|  _  | |_| \__ \ | | |
 |_| |_|\__,_|___/_| |_|     |_| |_|\__,_|___/_| |_|

统计信息

  • 总下载量: 97
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固