mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 23:21:08 +02:00
* Update README Let contributors know that docs will now be located in UDR * Add comments to each mdx doc Comment has been added to all mdx docs that are not partials * chore: added changelog changelog check failure * wip: removed changelog * Fix content errors * Doc spacing * Update website/content/docs/deploy/kubernetes/vso/helm.mdx Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com> --------- Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com> Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
---
|
||
layout: api
|
||
page_title: Redis - Database - Secrets Engines - HTTP API
|
||
description: >-
|
||
The Redis plugin for Vault's database secrets engine generates [ACL credentials](https://redis.io/docs/manual/security/acl/)
|
||
to access Redis servers.
|
||
---
|
||
|
||
> [!IMPORTANT]
|
||
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
|
||
|
||
# Redis database plugin HTTP API
|
||
|
||
The Redis database plugin is one of the supported plugins for the database
|
||
secrets engine. This plugin generates database credentials dynamically based on
|
||
configured roles for the Redis database.
|
||
|
||
## Configure connection
|
||
|
||
In addition to the parameters defined by the [Database
|
||
Secrets Engine](/vault/api-docs/secret/databases#configure-connection), this plugin
|
||
has a number of parameters to further configure a connection.
|
||
|
||
| Method | Path |
|
||
| :----- | :----------------------- |
|
||
| `POST` | `/database/config/:name` |
|
||
|
||
### Parameters
|
||
|
||
- `host` `(string: <required>)` – Specifies the host to connect to.
|
||
|
||
- `port` `(int: <required>)` – Specifies the port number of the connection.
|
||
|
||
- `username` `(string: <required>)` – Specifies the username for Vault to use.
|
||
|
||
- `password` `(string: <required>)` – Specifies the password corresponding to the given username.
|
||
|
||
- `tls` `(bool: false)` – Specifies whether to use TLS when connecting to Redis.
|
||
|
||
- `insecure_tls` `(bool: false)` – Specifies whether to skip verification of the
|
||
server certificate when using TLS.
|
||
|
||
### Sample payload
|
||
|
||
```json
|
||
{
|
||
"plugin_name": "redis-database-plugin",
|
||
"host": "localhost://127.0.0.1",
|
||
"username": "user",
|
||
"password": "pass",
|
||
"allowed-roles": "my-*-role"
|
||
}
|
||
```
|
||
|
||
### Sample request
|
||
|
||
```shell-session
|
||
$ curl \
|
||
--header "X-Vault-Token: ..." \
|
||
--request POST \
|
||
--data @payload.json \
|
||
http://127.0.0.1:8200/v1/database/config/redis
|
||
```
|
||
|
||
## Statements
|
||
|
||
Statements are configured during role creation and are used by the plugin to
|
||
determine what is sent to the database on user creation, renewing, and
|
||
revocation. For more information on configuring roles see the [Role
|
||
API](/vault/api-docs/secret/databases#create-role) in the database secrets engine docs.
|
||
|
||
### Parameters
|
||
|
||
The following are the statements used by this plugin. If not mentioned in this
|
||
list the plugin does not support that statement type.
|
||
|
||
- `creation_statements` `(list: [])` – Specifies a JSON string containing
|
||
[Redis ACL rules](https://redis.io/commands/acl-cat) to assign to created users. If not provided, defaults to
|
||
a read-only user that can read any key.
|