• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Vault
  • Install
  • Tutorials
  • Documentation
  • API
  • Integrations
  • Try Cloud(opens in new tab)
  • Sign up
Vault Home

Documentation

Skip to main content
  • Documentation
  • What is Vault?
  • Use Cases

  • Browser Support
  • Installing Vault

    • Overview
    • Active Directory
    • AliCloud
    • AWS
    • Azure
    • Consul
    • Cubbyhole
      • Overview
      • Cassandra
      • Couchbase
      • Elasticsearch
      • HanaDB
      • IBM Db2
      • InfluxDB
      • MongoDB
      • MongoDB Atlas
      • MSSQL
      • MySQL/MariaDB
      • Oracle
      • PostgreSQL
      • Redis
      • Redis ElastiCache
      • Redshift
      • Snowflake
      • Custom
    • Google Cloud
    • Google Cloud KMS
    • KMIP
      ENTERPRISEENTERPRISE
    • Kubernetes
    • MongoDB Atlas
    • Nomad
    • LDAP
    • RabbitMQ
    • Terraform Cloud
    • TOTP
    • Venafi (Certificates)
  • Vault Integration Program
  • Vault Interoperability Matrix
  • Troubleshoot






  • Glossary


  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Vault
  3. Documentation
  4. Secrets Engines
  5. Databases
  6. Redis ElastiCache
  • Vault
  • v1.11.x
  • v1.10.x
  • v1.9.x
  • v1.8.x
  • v1.7.x
  • v1.6.x
  • v1.5.x
  • v1.4.x

»Redis ElastiCache Database Secrets Engine

Redis ElastiCache is one of the supported plugins for the database secrets engine. This plugin generates static credentials for existing managed roles.

See the database secrets engine docs for more information about setting up the database secrets engine.

Capabilities

Plugin NameRoot Credential RotationDynamic RolesStatic RolesUsername Customization
redis-elasticache-database-pluginNoNoYesNo

Setup

  1. Enable the database secrets engine if it is not already enabled:

    $ vault secrets enable database
    Success! Enabled the database secrets engine at: database/
    

    By default, the secrets engine will enable at the name of the engine. To enable the secrets engine at a different path, use the -path argument.

  2. Configure Vault with the proper plugin and connection configuration:

    $ vault write database/config/my-redis-elasticache-cluster \
      plugin_name="redis-elasticache-database-plugin" \
      url="primary-endpoint.my-cluster.xxx.yyy.cache.amazonaws.com:6379" \
      username="AKI***" \
      password="ktriNYvULAWLzUmTGb***" \
      allowed_roles="*"
    

Note: The username and password parameters are optional. If omitted, authentication falls back on the AWS credentials provider chain. Using a temporary credential stored in the proper environment variable is the preferred configuration method.

Usage

After the secrets engine is configured, write static roles to enable generating credentials.

Static roles

  1. Configure a static role that maps a name in Vault to an existing Redis ElastiCache user.

    $ vault write database/static-roles/my-static-role \
        db_name="my-redis-elasticache-cluster" \
        username="my-existing-redis-user" \
        rotation_period=5m
    Success! Data written to: database/static-roles/my-static-role
    
  2. Retrieve the credentials from the /static-creds endpoint:

    $ vault read database/static-creds/my-static-role
    Key                    Value
    ---                    -----
    last_vault_rotation    2022-09-14T11:45:57.24715105-04:00
    password               GKdS6qY-UtVAMpcD9iuu
    rotation_period        5m
    ttl                    4m48s
    username               my-existing-redis-user
    

Note: New passwords may take up-to a couple of minutes before ElastiCache has the chance to complete their configuration. It is recommended to use a retry strategy when establishing new Redis ElastiCache connections. This may prevent errors when trying to use a password that isn't yet live on the targeted ElastiCache cluster.

API

The full list of configurable options can be seen in the Redis ElastiCache Database Plugin API page.

For more information on the database secrets engine's HTTP API please see the Database Secrets Engine API page.

Edit this page on GitHub

On this page

  1. Redis ElastiCache Database Secrets Engine
  2. Capabilities
  3. Setup
  4. Usage
  5. API
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)