Secrets hygiene is a proactive security program to minimize the risk of credential compromise by enforcing ephemeral, rotatable, and recoverable secrets management. This design focuses on three pillars: short-lived credentials, rotation drills, and break-glass procedures. It assumes a cloud-native environment (e.g., AWS, GCP, Azure) with tools like HashiCorp Vault, AWS Secrets Manager, or Kubernetes Secrets.
The program reduces blast radius by:
Limiting credential lifespan.
Practicing rotations to build muscle memory.
Enabling rapid recovery from breaches.
Program Ownership: Security team leads, with engineering/devops buy-in. Quarterly reviews.
1. Short-Lived Credentials Policy
Mandate credentials with lifetimes under 12 hours (ideally 15-60 minutes) to limit exposure if stolen.
Key Requirements
Category
Lifespan
Implementation
Examples/Tools
API Tokens
1-4 hours
JWTs/OAuth2 with short TTL; auto-refresh via SDKs
AWS STS AssumeRole (1h default), GCP ID Tokens
Service Accounts
15-60 min
Ephemeral tokens via workload identity
Kubernetes Service Account Tokens, AWS IAM Roles for Workloads
User Access
8-12 hours
MFA + short-session tokens
Okta/SAML with session controls, short-lived PATs in GitHub/GitLab