2017-09-08 02:11:47 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: secrets enable - Command
|
|
|
|
sidebar_title: <code>enable</code>
|
2017-09-08 02:11:47 +00:00
|
|
|
description: |-
|
|
|
|
The "secrets enable" command enables an secrets engine at a given path. If an
|
|
|
|
secrets engine already exists at the given path, an error is returned. After
|
|
|
|
the secrets engine is enabled, it usually needs configuration. The
|
|
|
|
configuration varies by secrets engine.
|
|
|
|
---
|
|
|
|
|
|
|
|
# secrets enable
|
|
|
|
|
|
|
|
The `secrets enable` command enables an secrets engine at a given path. If an
|
|
|
|
secrets engine already exists at the given path, an error is returned. After the
|
|
|
|
secrets engine is enabled, it usually needs configuration. The configuration
|
|
|
|
varies by secrets engine.
|
|
|
|
|
|
|
|
By default, secrets engines are enabled at the path corresponding to their TYPE,
|
|
|
|
but users can customize the path using the `-path` option.
|
|
|
|
|
|
|
|
Some secrets engines persist data, some act as data pass-through, and some
|
|
|
|
generate dynamic credentials. The secrets engine will likely require
|
|
|
|
configuration after it is mounted. For details on the specific configuration
|
|
|
|
options, please see the [secrets engine
|
2020-01-22 20:05:41 +00:00
|
|
|
documentation](/docs/secrets).
|
2017-09-08 02:11:47 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Enable the AWS secrets engine at "aws/":
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:11:47 +00:00
|
|
|
$ vault secrets enable aws
|
|
|
|
Success! Enabled the aws secrets engine at: aws/
|
|
|
|
```
|
|
|
|
|
|
|
|
Enable the SSH secrets engine at ssh-prod/:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:11:47 +00:00
|
|
|
$ vault secrets enable -path=ssh-prod ssh
|
|
|
|
```
|
|
|
|
|
|
|
|
Enable the database secrets engine with an explicit maximum TTL of 30m:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:11:47 +00:00
|
|
|
$ vault secrets enable -max-lease-ttl=30m database
|
|
|
|
```
|
|
|
|
|
|
|
|
Enable a custom plugin (after it is registered in the plugin registry):
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2018-11-14 17:17:12 +00:00
|
|
|
$ vault secrets enable -path=my-secrets my-plugin
|
2017-09-08 02:11:47 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For more information on the specific configuration options and paths, please see
|
2020-01-22 20:05:41 +00:00
|
|
|
the [secrets engine](/docs/secrets) documentation.
|
2017-09-08 02:11:47 +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:11:47 +00:00
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
- `-audit-non-hmac-request-keys` `(string: "")` - Comma-separated
|
2020-03-02 16:36:10 +00:00
|
|
|
string or list of keys that will not be HMAC'd by audit devices in the
|
|
|
|
request data object.
|
|
|
|
|
|
|
|
- `-audit-non-hmac-response-keys` `(string: "")` - Comma-separated
|
|
|
|
string or list of keys that will not be HMAC'd by audit devices in the
|
|
|
|
response data object.
|
|
|
|
|
2017-09-08 02:11:47 +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.
|
|
|
|
|
|
|
|
- `-description` `(string: "")` - Human-friendly description for the purpose of
|
|
|
|
this engine.
|
|
|
|
|
|
|
|
- `-force-no-cache` `(bool: false)` - Force the secrets engine to disable
|
|
|
|
caching. If unspecified, this defaults to the Vault server's globally
|
|
|
|
configured cache settings. This does not affect caching of the underlying
|
|
|
|
encrypted data storage.
|
|
|
|
|
|
|
|
- `-local` `(bool: false)` - Mark the secrets engine as local-only. Local
|
|
|
|
engines are not replicated or removed by replication.
|
|
|
|
|
|
|
|
- `-max-lease-ttl` `(duration: "")` The maximum lease TTL for this secrets
|
|
|
|
engine. If unspecified, this defaults to the Vault server's globally
|
|
|
|
configured maximum lease TTL.
|
|
|
|
|
|
|
|
- `-path` `(string: "")` Place where the secrets engine will be accessible. This
|
|
|
|
must be unique cross all secrets engines. This defaults to the "type" of the
|
|
|
|
secrets engine.
|