Managing static credentials is one of the most common security risks in modern infrastructure. When API keys, database passwords, and TLS certificates never change, a single breach exposes your entire system. Secrets rotation — the automated, periodic replacement of credentials — eliminates this risk by ensuring that compromised credentials have a limited blast radius.
In this guide, we compare three self-hosted platforms for secrets rotation and credential lifecycle management: HashiCorp Vault, Infisical, and External Secrets Operator. While our Kubernetes secrets management comparison covers deployment options, this article focuses specifically on automated rotation capabilities, credential lifecycle workflows, and integration patterns.
Why Secrets Rotation Matters
Static credentials are a security liability. When a developer leaves, a server is compromised, or a dependency is breached, rotating credentials manually is slow, error-prone, and often skipped entirely. Automated rotation solves this by:
- Limiting credential lifetime — secrets expire and are replaced automatically
- Reducing blast radius — compromised credentials become useless within hours
- Meeting compliance requirements — SOC 2, PCI-DSS, and HIPAA mandate credential rotation
- Eliminating human error — no more forgotten password changes after team departures
Comparison Table
| Feature | HashiCorp Vault | Infisical | External Secrets Operator |
|---|---|---|---|
| GitHub Stars | 35,552 | 26,435 | 2,585 |
| Primary Model | Secrets-as-a-Service platform | Developer-first secrets manager | Kubernetes-native sync |
| Auto-Rotation | Built-in rotation engine | Built-in rotation with webhooks | Sync + triggers rotation |
| Rotation Targets | Databases, cloud providers, PKI | Databases, APIs, SSH keys | Kubernetes Secrets |
| Rotation Scheduling | TTL-based, renewable | Cron-based, configurable | Kubernetes CronJob triggers |
| Dynamic Secrets | Yes (database, cloud, SSH, PKI) | Yes (limited providers) | No (syncs static secrets) |
| Audit Logging | Comprehensive | Full audit trail | Kubernetes events |
| Web UI | Limited (CLI-first) | Full dashboard | No (Kubernetes-native) |
| API | REST + CLI | REST + CLI | Kubernetes CRDs |
| Deployment | Docker, Kubernetes, binary | Docker Compose, Kubernetes | Kubernetes only (Helm) |
| Encryption | Shamir’s Secret Sharing | AES-256-GCM | Kubernetes encryption at rest |
| Cloud Integration | AWS, GCP, Azure, K8s | AWS, GCP, Azure, K8s | AWS, GCP, Azure, Vault |
HashiCorp Vault
Vault is the industry-standard secrets management platform. Its rotation engine is built around dynamic secrets — credentials generated on-demand with automatic expiration — and a powerful rotation daemon that can periodically rotate credentials for databases, cloud providers, and SSH keys.
Key rotation features:
- Database rotation — automatically rotates database credentials on a schedule, creating new users and passwords without downtime
- Cloud credential rotation — generates short-lived AWS IAM, GCP service account, and Azure managed identity credentials
- PKI rotation — manages certificate authorities with automatic certificate renewal before expiration
- SSH rotation — generates SSH key pairs and signed certificates with configurable TTLs
- Transform secrets engine — rotates encryption keys for tokenized data
When to use: Enterprise environments requiring comprehensive secrets rotation across multiple platforms with strict audit and compliance requirements.
Docker Compose Deployment
| |
Vault configuration (vault-config/vault.hcl):
| |
Configure database credential rotation:
| |
Infisical
Infisical is a developer-first secrets management platform with a focus on ease of use. It provides automated secrets rotation with a clean web UI, SDK integrations, and support for rotating database credentials, API keys, and SSH keys.
Key rotation features:
- Secret rotation with webhooks — triggers webhooks when secrets rotate, enabling downstream systems to update
- Folder-level access control — granular permissions for who can view, edit, or rotate secrets
- Secret versioning — full history of all secret changes with rollback capability
- SDK integration — rotate secrets programmatically via Python, Node.js, Go, and Rust SDKs
- Environment-scoped secrets — different rotation schedules per environment (dev, staging, prod)
When to use: Development teams wanting a user-friendly secrets manager with rotation capabilities and SDK integrations.
Docker Compose Deployment
| |
External Secrets Operator
External Secrets Operator (ESO) is a Kubernetes operator that synchronizes secrets from external secret managers into Kubernetes Secret objects. While ESO itself doesn’t rotate secrets, it integrates with Vault, AWS Secrets Manager, and other rotation-capable backends to ensure rotated credentials are automatically synced to your cluster.
Key rotation integration features:
- Refresh interval — configurable sync intervals that pick up rotated secrets from backends
- Secret store abstraction — rotate secrets in your backend (Vault, AWS) and ESO syncs automatically
- Controller-based — no cron jobs needed; the operator watches for changes and syncs in real-time
- Composition — combine secrets from multiple backends into a single Kubernetes Secret
When to use: Kubernetes-native teams that already use an external secrets manager and want automatic sync of rotated credentials to pods.
Kubernetes Deployment
ESO is deployed via Helm and configured with Custom Resource Definitions:
| |
Building a Rotation Pipeline
A production-ready secrets rotation pipeline combines all three approaches:
- Vault generates and rotates database credentials on a 24-hour schedule
- Infisical manages API keys with webhook-triggered rotation when thresholds are reached
- External Secrets Operator syncs the latest credentials from Vault to Kubernetes pods every hour
This layered approach ensures credentials are rotated at the source, tracked in a developer-friendly UI, and automatically distributed to consuming applications.
Why Self-Host Secrets Rotation?
Cloud-managed secrets services (AWS Secrets Manager, Azure Key Vault) charge per secret and per API call. At scale, costs add up quickly. Self-hosted rotation gives you unlimited secrets, no per-operation pricing, and full audit control. For secrets encryption in Git workflows, combining rotation with encrypted-in-repo secrets provides both operational agility and version-controlled audit trails. Organizations managing container security should also rotate image registry credentials to prevent supply chain compromise.
FAQ
What is the difference between secrets management and secrets rotation?
Secrets management covers storing, accessing, and distributing credentials. Secrets rotation is a subset — the automated process of periodically replacing credentials with new ones. A secrets manager may not support rotation (it just stores), but a rotation-capable platform generates new credentials and deactivates old ones on a schedule.
How often should I rotate secrets?
For database credentials: every 24 hours to 7 days. For API keys: every 30 to 90 days. For TLS certificates: before expiration (typically 90 days for Let’s Encrypt). Critical infrastructure secrets (root database passwords, CA private keys) should be rotated less frequently with careful planning.
Can Vault rotate secrets for databases it doesn’t natively support?
Vault’s database secrets engine supports PostgreSQL, MySQL, MongoDB, Cassandra, Oracle, MSSQL, Elasticsearch, and more via plugins. For unsupported databases, you can write a custom plugin using Vault’s database plugin SDK, or use the generic key-value rotation with custom scripts.
Does External Secrets Operator rotate secrets itself?
No. ESO is a synchronization layer — it copies secrets from external managers (Vault, AWS Secrets Manager, etc.) into Kubernetes. The actual rotation happens in the backend system. ESO’s role is to ensure rotated secrets reach your pods within the configured refresh interval.
What happens to applications during credential rotation?
With dynamic secrets, Vault generates new credentials on each request, so there’s no “during” — applications always use current credentials. With static secret rotation, there’s a brief window where old and new credentials coexist. Applications should implement retry logic and credential refresh mechanisms to handle this transition gracefully.
Can I rotate secrets without restarting my applications?
Yes. Most modern applications support hot-reloading credentials. Database connection pools (PgBouncer, HikariCP) can refresh connections with new credentials. HTTP clients can reload API keys from environment variables or config files. The key is designing applications to detect and use updated credentials without requiring a full restart.