2017-09-08 02:12:32 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: token capabilities - Command
|
2017-09-08 02:12:32 +00:00
|
|
|
description: |-
|
|
|
|
The "token capabilities" command fetches the capabilities of a token for a
|
|
|
|
given path.
|
|
|
|
---
|
|
|
|
|
|
|
|
# token capabilities
|
|
|
|
|
|
|
|
The `token capabilities` command fetches the capabilities of a token for a given
|
|
|
|
path.
|
|
|
|
|
|
|
|
If a TOKEN is provided as an argument, this command uses the "/sys/capabilities"
|
|
|
|
endpoint and permission. If no TOKEN is provided, this command uses the
|
|
|
|
"/sys/capabilities-self" endpoint and permission with the locally authenticated
|
|
|
|
token.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
List capabilities for the local token on the "secret/foo" path:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:12:32 +00:00
|
|
|
$ vault token capabilities secret/foo
|
|
|
|
read
|
|
|
|
```
|
|
|
|
|
|
|
|
List capabilities for a token on the "cubbyhole/foo" path:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:12:32 +00:00
|
|
|
$ vault token capabilities 96ddf4bc-d217-f3ba-f9bd-017055595017 database/creds/readonly
|
|
|
|
deny
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2018-02-12 23:12:16 +00:00
|
|
|
The following flags are available in addition to the [standard set of
|
2023-01-26 00:12:15 +00:00
|
|
|
flags](/vault/docs/commands) included on all commands.
|
2018-02-12 23:12:16 +00:00
|
|
|
|
2023-07-18 21:07:55 +00:00
|
|
|
### Output options
|
2018-02-12 23:12:16 +00:00
|
|
|
|
|
|
|
- `-format` `(string: "table")` - Print the output in the given format. Valid
|
|
|
|
formats are "table", "json", or "yaml". This can also be specified via the
|
2020-01-18 00:18:09 +00:00
|
|
|
`VAULT_FORMAT` environment variable.
|