Secrets auto-rotation not implemented (manual only) #3

Closed
opened 2026-09-30 16:13:03 -07:00 by CanuteTheGreat · 1 comment
Owner

crates/patronus-secrets/src/manager.rs:293 - when a secret needs rotation, the code logs warn!("Secret '{}' needs rotation but auto-rotation not implemented. Manual rotation required.").

Fix needed: implement real auto-rotation for at least the secret types that support it (e.g. internally-generated API keys/certs) rather than requiring an operator to notice the warning and rotate manually.

Found during a real gap-analysis review, 2026-09-30.

`crates/patronus-secrets/src/manager.rs:293` - when a secret needs rotation, the code logs `warn!("Secret '{}' needs rotation but auto-rotation not implemented. Manual rotation required.")`. **Fix needed**: implement real auto-rotation for at least the secret types that support it (e.g. internally-generated API keys/certs) rather than requiring an operator to notice the warning and rotate manually. Found during a real gap-analysis review, 2026-09-30.
Author
Owner

Resolved: real auto-rotation is implemented in crates/patronus-secrets/src/manager.rs (SecretManager::enforce_rotation_policy / auto_rotate_secret, commit 2234-era feat(secrets): implement real auto-rotation in enforce_rotation_policy) and is actually invoked on an hourly tokio::spawn loop in crates/patronus-web/src/lib.rs (commit 2856, feat(secrets): actually invoke enforce_rotation_policy() periodically). Locally-rotatable types (VPN PSK, IPsec PSK, SNMP community, webhook secret) are auto-regenerated; everything else is still correctly routed to needs_manual_rotation with a reason, since this codebase cannot safely rotate externally-coordinated secrets unattended. No remaining gap against the original report. Closing.

Resolved: real auto-rotation is implemented in `crates/patronus-secrets/src/manager.rs` (`SecretManager::enforce_rotation_policy` / `auto_rotate_secret`, commit 2234-era `feat(secrets): implement real auto-rotation in enforce_rotation_policy`) and is actually invoked on an hourly `tokio::spawn` loop in `crates/patronus-web/src/lib.rs` (commit 2856, `feat(secrets): actually invoke enforce_rotation_policy() periodically`). Locally-rotatable types (VPN PSK, IPsec PSK, SNMP community, webhook secret) are auto-regenerated; everything else is still correctly routed to `needs_manual_rotation` with a reason, since this codebase cannot safely rotate externally-coordinated secrets unattended. No remaining gap against the original report. Closing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
CanuteTheGreat/patronus#3
No description provided.