lease

lease 命令包含一组操作机密所关联的租约的子命令。想要操作租约上附加的令牌,请使用 vault token 子命令。

例子

查找一条租约:

$ vault lease lookup database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83
Key             Value
---             -----
expire_time     2021-03-17T11:55:50.755313-05:00
id              database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83
issue_time      2021-03-17T11:45:50.755312-05:00
last_renewal    <nil>
renewable       true
ttl             9m52s

续约:

$ vault lease renew database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83
Key                Value
---                -----
lease_id           database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83
lease_duration     5m
lease_renewable    true

吊销:

$ vault lease revoke database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83
Success! Revoked lease: database/creds/readonly/27e1b9a1-27b8-83d9-9fe0-d99d786bdc83

可用子命令

Usage: vault lease <subcommand> [options] [args]

  # ...

Subcommands:
    lookup    Lookup lease information by lease id
    renew     Renews the lease of a secret
    revoke    Revokes leases and secrets

每种子命令的详细使用方法,请阅读对应的章节。

results matching ""

    No results matching ""