Skip to content

Secret rotation service for database#112

Open
gloskull wants to merge 2 commits into
Utility-Protocol:mainfrom
gloskull:Secret-Rotation-Service-for-Database
Open

Secret rotation service for database#112
gloskull wants to merge 2 commits into
Utility-Protocol:mainfrom
gloskull:Secret-Rotation-Service-for-Database

Conversation

@gloskull

Copy link
Copy Markdown
Contributor

Motivation
Provide a deterministic, metadata-only coordinator to rotate database credentials and API keys with safe exportable metadata and zero-downtime rollout semantics.
Define a provider abstraction so production integrations can implement KMS/secret-manager creation and retirement without exposing secret material.
Ship operational artifacts (runbook, alerts, dashboard) to ensure safe blue-green/canary rollouts and on-call guidance.
Description
Add a Rust library src/secret_rotation.rs implementing SecretKind, RotationPolicy, SecretRecord, RolloutPlan, the SecretProvider trait, and an in-memory SecretRotationService with evaluate and rotate_due decision/coordination logic.
Add unit tests covering due rotations, non-due evaluations, previous-version retirement tracking, and invalid policy rejection in src/secret_rotation.rs (tests run under #[cfg(test)]).
Expose the module via src/lib.rs and enable chrono serde support in Cargo.toml so DateTime and Duration can be serialized for safe metadata export.
Add documentation and operational artifacts: docs/SECRET_ROTATION_ARCHITECTURE.md, docs/runbooks/SECRET_ROTATION_RUNBOOK.md, monitoring/secret-rotation-alerts.yml, and monitoring/secret-rotation-dashboard.json to scaffold monitoring and runbook procedures.
Testing
Ran formatting check with cargo fmt --all -- --check, which completed successfully.
Ran cargo test, which executed the module tests (3 unit tests) and reported 3 passed; 0 failed.
Ran cargo clippy --all-targets --all-features -- -D warnings, which completed without warnings.
Closes #78

gloskull added 2 commits July 17, 2026 18:44
Add secret rotation service for database credentials and API keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Secret Rotation Service for Database Credentials and API Keys

1 participant