"매 secret 은 매 git 에 절대 — 매 vault 에". Secret management 는 매 API key, DB password, certificate, signing key 의 매 lifecycle (issue, store, rotate, revoke, audit) 의 매 centralized control. 2026 현재 매 HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, Doppler, Infisical 가 매 dominant; 매 SPIFFE/SPIRE workload identity, 매 short-lived (15min) tokens 가 매 long-lived API key 를 매 replace.
매 핵심
매 Anti-secrets
Hardcoded in source.
Plain in .env committed.
Shared via Slack DM.
Long-lived (years) static API keys.
매 Pillars
Encryption at rest: KMS-backed.
Encryption in transit: TLS-only.
Access control: RBAC + audit log.
Rotation: automated (DB pwd, KMS key).
Workload identity: 매 service ≠ user — 매 ephemeral token 의 매 cloud IAM.
Detection: 매 git pre-commit (gitleaks, trufflehog) + 매 GitHub secret scanning.
매 응용
App → DB: dynamic creds.
CI → cloud: OIDC federation, no static keys.
K8s pod → AWS: IRSA / Workload Identity.
Cross-service: SPIFFE SVID.
💻 패턴
Vault dynamic DB cred
vault write database/roles/app-readonly \
db_name=postgres-prod \
creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \"{{name}}\";"\
default_ttl=1h max_ttl=24h
# App requests cred
vault read database/creds/app-readonly
# username: v-token-app-readonly-x9a..., password: A1b2C3..., lease_id: ..., lease_duration: 3600
언제: Secret-scanner triage (매 actual secret vs 매 test fixture?), rotation runbook generation, IAM policy synthesis from natural-language requirement.
언제 X: 매 secret 자체를 매 LLM context 에 매 넣지 마. 매 leak risk.
❌ 안티패턴
.env in git: 매 even private repo — 매 contributor leak.
Long-lived keys: 매 5-year IAM access key — 매 incident blast-radius huge.
Shared service account: 매 audit trail 의 매 useless.
Plain ENV var visible to all containers: 매 sidecar / multi-tenant — 매 leak.