2017-09-08 02:12:07 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: secrets tune - Command
|
2017-09-08 02:12:07 +00:00
|
|
|
description: |-
|
2021-12-10 17:08:28 +00:00
|
|
|
The "secrets tune" command tunes the configuration options for the secrets engine at the given PATH.
|
2017-09-08 02:12:07 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# secrets tune
|
|
|
|
|
|
|
|
The `secrets tune` command tunes the configuration options for the secrets
|
|
|
|
engine at the given PATH. The argument corresponds to the PATH where the secrets
|
2021-09-10 16:10:33 +00:00
|
|
|
engine is enabled, not the type.
|
2017-09-08 02:12:07 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2021-09-10 16:10:33 +00:00
|
|
|
Before tuning the secret mount, view the current configuration of the
|
|
|
|
mount enabled at "pki/":
|
2017-09-08 02:12:07 +00:00
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2021-09-10 16:10:33 +00:00
|
|
|
$ vault read sys/mounts/pki/tune
|
|
|
|
Key Value
|
|
|
|
--- -----
|
|
|
|
default_lease_ttl 12h
|
|
|
|
description Example PKI mount
|
|
|
|
force_no_cache false
|
|
|
|
max_lease_ttl 24h
|
|
|
|
```
|
|
|
|
|
|
|
|
Tune the default lease, exclude `common_name` and `serial_number` from being HMAC'd in the audit log for the PKI secrets engine:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ vault secrets tune -default-lease-ttl=18h -audit-non-hmac-request-keys=common_name -audit-non-hmac-response-keys=serial_number pki/
|
|
|
|
Success! Tuned the secrets engine at: pki/
|
|
|
|
|
|
|
|
$ vault read sys/mounts/pki/tune
|
|
|
|
Key Value
|
|
|
|
--- -----
|
|
|
|
audit_non_hmac_request_keys [common_name]
|
|
|
|
audit_non_hmac_response_keys [serial_number]
|
|
|
|
default_lease_ttl 18h
|
|
|
|
description Example PKI mount
|
|
|
|
force_no_cache false
|
|
|
|
max_lease_ttl 24h
|
2017-09-08 02:12:07 +00:00
|
|
|
```
|
|
|
|
|
2020-10-06 17:43:32 +00:00
|
|
|
Specify multiple audit non-hmac request keys:
|
|
|
|
|
|
|
|
```shell-session
|
2021-09-10 16:10:33 +00:00
|
|
|
$ vault secrets tune -audit-non-hmac-request-keys=common_name -audit-non-hmac-request-keys=ttl pki/
|
2020-10-06 17:43:32 +00:00
|
|
|
```
|
|
|
|
|
2017-09-08 02:12:07 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
The following flags are available in addition to the [standard set of
|
2020-01-22 20:05:41 +00:00
|
|
|
flags](/docs/commands) included on all commands.
|
2017-09-08 02:12:07 +00:00
|
|
|
|
2022-07-19 22:51:36 +00:00
|
|
|
- `-allowed-response-headers` `(string: "")` - response header values that the
|
2021-08-09 19:37:03 +00:00
|
|
|
secrets engine will be allowed to set. Note that multiple keys may be
|
|
|
|
specified by providing this option multiple times, each time with 1 key.
|
|
|
|
|
2020-10-06 17:43:32 +00:00
|
|
|
- `-audit-non-hmac-request-keys` `(string: "")` - Key that will not be HMAC'd
|
|
|
|
by audit devices in the request data object. Note that multiple keys may be
|
|
|
|
specified by providing this option multiple times, each time with 1 key.
|
2020-03-02 16:36:10 +00:00
|
|
|
|
2020-10-06 17:43:32 +00:00
|
|
|
- `-audit-non-hmac-response-keys` `(string: "")` - Key that will not be HMAC'd
|
|
|
|
by audit devices in the response data object. Note that multiple keys may be
|
|
|
|
specified by providing this option multiple times, each time with 1 key.
|
2020-03-02 16:36:10 +00:00
|
|
|
|
2017-09-08 02:12:07 +00:00
|
|
|
- `-default-lease-ttl` `(duration: "")` - The default lease TTL for this secrets
|
|
|
|
engine. If unspecified, this defaults to the Vault server's globally
|
|
|
|
configured default lease TTL, or a previously configured value for the secrets
|
2022-06-13 12:51:07 +00:00
|
|
|
engine. Uses [duration format strings](/docs/concepts/duration-format).
|
2017-09-08 02:12:07 +00:00
|
|
|
|
2021-08-09 19:37:03 +00:00
|
|
|
- `-description` `(string: "")` - Specifies the description of the mount.
|
|
|
|
This overrides the current stored value, if any.
|
|
|
|
|
|
|
|
- `-listing-visibility` `(string: "")` - The flag to toggle whether to show the
|
2022-06-07 13:49:13 +00:00
|
|
|
mount in the UI-specific listing endpoint. Valid values are `"unauth"` or `"hidden"`.
|
|
|
|
Passing empty string leaves the current setting unchanged.
|
2021-08-09 19:37:03 +00:00
|
|
|
|
2017-09-08 02:12:07 +00:00
|
|
|
- `-max-lease-ttl` `(duration: "")` - The maximum lease TTL for this secrets
|
|
|
|
engine. If unspecified, this defaults to the Vault server's globally
|
2021-10-12 12:24:07 +00:00
|
|
|
configured [maximum lease TTL](/docs/configuration#max_lease_ttl), or a
|
|
|
|
previously configured value for the secrets engine. This value is allowed to
|
|
|
|
override the server's global max TTL; it can be longer or shorter.
|
2022-06-13 12:51:07 +00:00
|
|
|
Uses [duration format strings](/docs/concepts/duration-format).
|
2021-08-09 19:37:03 +00:00
|
|
|
|
|
|
|
- `-passthrough-request-headers` `(string: "")` - request header values that will
|
|
|
|
be sent to the secrets engine. Note that multiple keys may be
|
|
|
|
specified by providing this option multiple times, each time with 1 key.
|
2021-12-10 17:08:28 +00:00
|
|
|
|
|
|
|
- `-allowed-managed-keys` `(string: "")` - Managed key name(s) that the mount
|
|
|
|
in question is allowed to access. Note that multiple keys may be specified
|
|
|
|
either by providing the key names as a comma separated string or by providing
|
|
|
|
this option multiple times, each time with 1 key.
|