Vault:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→使用) |
|||
第9行: | 第9行: | ||
=== AppRole<ref>{{Cite web |url=https://learn.hashicorp.com/vault/identity-access-management/approle |title=AppRole Pull Authentication |accessdate=2020-07-29}}</ref> === | === AppRole<ref>{{Cite web |url=https://learn.hashicorp.com/vault/identity-access-management/approle |title=AppRole Pull Authentication |accessdate=2020-07-29}}</ref> === | ||
==== 建立 ==== | |||
先產生AppRole: | 先產生AppRole: | ||
第25行: | 第26行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
vault write -f auth/approle/role/example_role/secret-id | vault write -f auth/approle/role/example_role/secret-id | ||
</syntaxhighlight> | |||
==== 使用 ==== | |||
這邊使用[[HTTPie]]產生JSON request: | |||
<syntaxhighlight lang="bash"> | |||
http https://vault.example.com/v1/auth/approle/login role_id=x secret_id=y | |||
</syntaxhighlight> | </syntaxhighlight> | ||
2020年7月28日 (二) 19:59的版本
Vault是一套由HashiCorp开发的密码管理软体。
概要
Vault可以拿来存放各类credential资料,像是Key或是Password,这个方法比Twelve-Factor App methodology所提到的方法(利用环境变数)安全许多。
使用
AppRole[1]
建立
先产生AppRole:
vault write auth/approle/role/example_role token_policies="example_policy1,example_policy2"
读取role-id
:
vault read auth/approle/role/example_role/role-id
产生对应的secret-id
:
vault write -f auth/approle/role/example_role/secret-id
使用
这边使用HTTPie产生JSON request:
http https://vault.example.com/v1/auth/approle/login role_id=x secret_id=y
相关连结
参考文献
- ↑ AppRole Pull Authentication. [2020-07-29].
外部连结
- 官方网站 (英文)