implementing-hashicorp-vault-dynamic-secrets

Generate dynamic HashiCorp Vault secrets for databases, AWS IAM, and PKI certificates.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Acczdy/MoZiSec --skill implementing-hashicorp-vault-dynamic-secrets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-hashicorp-vault-dynamic-secrets
Source: https://github.com/Acczdy/MoZiSec/tree/main/iam/.claude/skills/implementing-hashicorp-vault-dynamic-secrets
Command: npx skills add https://github.com/Acczdy/MoZiSec --skill implementing-hashicorp-vault-dynamic-secrets

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hvac, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill eliminates static, long-lived credentials by implementing HashiCorp Vault dynamic secrets for databases, AWS IAM, and PKI certificates, reducing credential sprawl and enabling automated rotation and revocation for improved security and compliance.

Core Features & Use Cases

  • Dynamic Database Credentials: Create time-limited PostgreSQL and MySQL users on demand with revocation statements and TTL controls.
  • Ephemeral AWS IAM Keys: Generate IAM user keys, assumed-role STS tokens, and federation tokens with configurable leases to avoid long-lived AWS credentials.
  • PKI Certificate Issuance: Issue short-lived TLS certificates via Vault PKI (root/intermediate) for web services and service mesh.
  • Lease Management & Monitoring: Automatic lease renewal patterns, scripted revocation, audit log analysis, and Prometheus metrics for operational visibility.
  • Application Integration: AppRole authentication examples and a Python agent demonstrating credential retrieval, renewal, and revocation for microservices and CI/CD pipelines.
  • Use Case: Migrate many microservices from environment-stored DB passwords to per-service Vault roles with automatic rotation and minimal code changes.

Quick Start

Request dynamic database credentials for role app-readonly and return the username, password, lease_id, and lease_duration.

Frequently Asked Questions about implementing-hashicorp-vault-dynamic-secrets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate dynamic database credentials with HashiCorp Vault to replace static passwords?

HashiCorp Vault dynamic database credentials replace static passwords by creating time-limited PostgreSQL and MySQL users on demand. The Skill manages database credential rotation using revocation statements and configurable TTL controls to eliminate long-lived database passwords.

What are dynamic secrets in Vault and when do I need them for microservices?

Dynamic secrets in Vault are ephemeral credentials generated on demand with automatic expiration. You need them for microservices to eliminate credential sprawl by assigning per-service roles with automated rotation and revocation instead of sharing long-lived static credentials.

Can I generate ephemeral AWS IAM keys and STS tokens using Vault dynamic secrets?

Yes, you can generate ephemeral AWS IAM keys using Vault dynamic secrets. The Skill supports creating IAM user keys, assumed-role STS tokens, and federation tokens with configurable leases to avoid relying on long-lived AWS credentials in your application configurations.

Does this Vault dynamic secrets approach work with Python and AppRole authentication?

Yes, this approach works with Python and AppRole authentication. The Skill provides a Python agent using the hvac library to demonstrate credential retrieval, automatic lease renewal, and revocation integrated with AppRole authentication for microservices and CI/CD pipelines.

How do I issue short-lived TLS certificates via Vault PKI for service mesh?

Issue short-lived TLS certificates via Vault PKI by configuring root or intermediate certificate authorities. The Skill automates PKI certificate issuance to provide web services and service meshes with ephemeral TLS certificates, replacing static certificate management with automated lease expiration.

What is the best way to manage Vault lease renewal and automated credential revocation?

The best way to manage Vault lease renewal and automated credential revocation is through scripted revocation patterns and automatic lease renewal logic. The Skill provides lease management with audit log analysis and Prometheus metrics for operational visibility into dynamic secret lifecycles.