starcode-solutions/yii2-vault
Composer 安装命令:
composer require starcode-solutions/yii2-vault
包简介
Vault integration for Yii2
关键字:
README 文档
README
Vault integration for Yii2.
About Vault by HashiCorp
Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault handles leasing, key revocation, key rolling, and auditing. Through a unified API, users can access an encrypted Key/Value store and network encryption-as-a-service, or generate AWS IAM/STS credentials, SQL/NoSQL databases, X.509 certificates, SSH credentials, and more.
How to install
Install from composer
composer require starcode-krasnodar/yii2-vault
or add to composer.json
// ...
"require": {
// ...
"starcode-krasnodar/yii2-vault": "dev-master",
// ...
}
// ...
Add vault module in your application config
<?php return [ // ... 'modules' => [ // other modules ... 'vault' => [ 'class' => 'starcode', // module config params ... ], ], // ... ];
CLI for vault module
Module provide CLI for yii2 app:
vault/client/listlist of vault secrets in path (first argument).vault/client/readread secret data by path (first argument)vault/client/writewrite secret data (first argument path, second JSON-string value)vault/client/deletedelete secret data
Examples
Create new secret
php yii vault/client/write secret/path/to/secret/key '{"value": "some secret"}'
Read exist secret
php yii vault/client/read secret/path/to/secret/key # output Array ( [value] => some secret )
Delete secret
php yii vault/client/read secret/path/to/secret/key
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-28