我创建了一个带有策略的用户:
$ vault token create -renewable -policy=admin_policy Key Value
--- -----
token s.kG0Kdb8d2DSOUHv3AMzw5tdO
token_accessor Do57Fg9DpiMv1j6t3oysZoz9
token_duration 900h
token_renewable true
token_policies ["admin_policy" "default"]
identity_policies []
policies ["admin_policy" "default"]
现在我想为令牌添加策略。我该怎么做?
或者我创建了用户:
vault write auth/userpass/users/test3 password=test -policy=admin_policy
Success! Data written to: auth/userpass/users/test3
现在我想向用户添加一个策略:
vault write auth/userpass/users/test3 password=test -policy=admin_policy -policy=crm_sales_policy
Success! Data written to: auth/userpass/users/test3
但一切都没有改变。