audit
The audit
command groups subcommands for interacting with Vault's audit devices. Users can list, enable, and disable audit devices.
For more information, please see the audit device documentation
Examples
Enable an audit device:
List all audit devices:
Disable an audit device:
Note: Once an audit device is disabled, you will no longer be able to HMAC values for comparison with entries in the audit logs. This is true even if you re-enable the audit device at the same path, as a new salt will be created for hashing.
Usage
For more information, examples, and usage about a subcommand, click on the name of the subcommand in the sidebar.
audit disable
The audit disable
command disables an audit device at a given path, if one exists. This command is idempotent, meaning it succeeds even if no audit device is enabled at the path.
Once an audit device is disabled, no future audit logs are dispatched to it. The data associated with the audit device is unaffected. For example, if you disabled an audit device that was logging to a file, the file would still exist and have stored contents.
Note: Once an audit device is disabled, you will no longer be able to HMAC values for comparison with entries in the audit logs. This is true even if you re-enable the audit device at the same path, as a new salt will be created for hashing.
Examples
Disable the audit device enabled at "file/":
Usage
There are no flags beyond the standard set of flags included on all commands.
audit enable
The audit enable
command enables an audit device at a given path. If an audit device already exists at the given path, an error is returned. Additional options for configuring the audit device are provided as KEY=VALUE
. Each audit device declares its own set of configuration options.
Once an audit device is enabled, almost every request and response will be logged to the device.
Examples
Enable the audit device "file" enabled at "file/":
Full configuration parameters for each audit device are available on the Audit Devices page.
Usage
The following flags are available in addition to the standard set of flags included on all commands.
-description
(string: "")
- Human-friendly description for the purpose of this audit device.-local
(bool: false)
- Mark the audit device as a local-only device. Local devices are not replicated or removed by replication.-path
(string: "")
- Place where the audit device will be accessible. This must be unique across all audit devices. This defaults to the "type" of the audit device.
audit list
The audit list
command lists the audit devices enabled. The output lists the enabled audit devices and options for those devices.
Examples
List all audit devices:
List detailed audit device information:
Usage
The following flags are available in addition to the standard set of flags included on all commands.
Output options
-format
(string: "table")
- Print the output in the given format. Valid formats are "table", "json", or "yaml". This can also be specified via theVAULT_FORMAT
environment variable.
Command options
-detailed
(bool: false)
- Print detailed information such as options and replication status about each auth device.
Last updated