feat: automated secret rotation policy for credentials (#281)#369
Open
omonxooo-commits wants to merge 1 commit intoEDOHWARES:mainfrom
Open
feat: automated secret rotation policy for credentials (#281)#369omonxooo-commits wants to merge 1 commit intoEDOHWARES:mainfrom
omonxooo-commits wants to merge 1 commit intoEDOHWARES:mainfrom
Conversation
- Add RotationPolicy model with intervalHours, nextRotationAt, enabled fields - Add rotation.service: rotateCredential (AES-256-GCM re-encrypt) + processDueRotations - Add rotation.controller + credential.routes (GET/POST/DELETE policy, POST rotate, POST rotate/process) - Register /api/credentials in app.js - Add hourly scheduler in server.js - Audit log every rotation event (operation: UPDATE, resourceType: Credential) - 6 unit tests passing (node --test) - Docs: docs/secret-rotation.md
|
@omonxooo-commits Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements automated secret rotation for API keys and tokens, closing #281.
Changes
rotationPolicy.model.js— stores rotation interval, last/next rotation timestamps, and enabled flag per credentialrotation.service.js—rotateCredentialre-encrypts tokens with AES-256-GCM;processDueRotationsbatch-processes all overdue policiesrotation.controller.js— CRUD for policies, manual rotate endpoint, admin process-due endpointcredential.routes.js— registered at/api/credentialswith OpenAPI JSDocsetIntervalinserver.jscallsprocessDueRotationsAuditLogentry (operation: UPDATE,resourceType: Credential); token values are never stored (redacted)__tests__/rotation.test.js, all passing (node --test)docs/secret-rotation.mdcovering API, data model, scheduler, and security notesAcceptance Criteria
RotationPolicy/docs