Cybersecurity-Projects/PROJECTS/intermediate/credential-rotation-enforcer/spec/unit
CarterPerez-dev bad50daad2 feat(rotators): abstract Rotator with macro registration + EnvFileRotator + 4-step orchestrator
Rotator base exposes the four lifecycle methods as abstract; subclasses
register at compile time via 'register_as :kind' macro. REGISTRY is
populated as soon as the rotator file is required - drop a new file in
src/cre/rotators/ and the orchestrator can dispatch to it.

EnvFileRotator implements the simplest rotation:
- generate: 32 random bytes -> base64-urlsafe (no padding)
- apply: write to PATH.pending atomically (in-place line replace, 0600)
- verify: parse pending file, confirm key=value present and non-empty
- commit: rename PATH.pending -> PATH (atomic on POSIX)
- rollback_apply: unlink PATH.pending

RotationOrchestrator runs the 4-step contract with full event publishing,
state machine transitions in DB (generating -> applying -> verifying ->
committing -> completed | failed), and rollback_apply on apply/verify
failure. 8 specs cover happy path + raised-during-apply + rollback verification.
2026-04-29 00:59:01 -04:00
..
audit feat(audit): hash chain + HMAC ratchet + Merkle batches + Ed25519 signing 2026-04-29 00:45:54 -04:00
aws feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
cli feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
compliance feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
crypto feat(crypto): AEAD envelope encryption with AES-256-GCM, KEK loader, secure random 2026-04-29 00:43:12 -04:00
domain feat(domain): NewSecret and CredentialVersion structs 2026-04-29 00:32:53 -04:00
engine feat(rotators): abstract Rotator with macro registration + EnvFileRotator + 4-step orchestrator 2026-04-29 00:59:01 -04:00
events feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
github feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
notifiers feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
persistence feat(persistence): SQLite adapter with credentials/versions/rotations/audit repos 2026-04-29 00:36:22 -04:00
policy feat(policy): Crystal Policy as Code DSL with macros + compile-time enum autocast 2026-04-29 00:56:29 -04:00
rotators feat(rotators): abstract Rotator with macro registration + EnvFileRotator + 4-step orchestrator 2026-04-29 00:59:01 -04:00
tui feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
vault feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00
.gitkeep feat(cre): source tree skeleton with empty module dirs and CI workflow 2026-04-28 23:54:59 -04:00