feat: resolve issues #229, #230, #231, and #232 - #329
Open
zikirullahiabdu31-ops wants to merge 1 commit into
Open
feat: resolve issues #229, #230, #231, and #232#329zikirullahiabdu31-ops wants to merge 1 commit into
zikirullahiabdu31-ops wants to merge 1 commit into
Conversation
…idoko257#232 Detailed explanation of changes and implementation: 1. IP Whitelist with CIDR Notation Support (Closes Pidoko257#229): - Enhanced ipWhitelist middleware in src/middleware/ipWhitelist.ts with IPv4 and IPv6 CIDR parsing using ipaddr.js. - Added helper isIpInCidrRange to parse and match IP addresses against single IPs or subnets (e.g., 192.168.1.0/24, 2001:db8::/32). - Integrated dynamic configuration loading via WHITELISTED_IP_CIDRS environment variable in src/config/env.ts. 2. Rate Limiting Bypass for Whitelisted IP Ranges (Closes Pidoko257#230): - Integrated IP CIDR whitelist checking into rate limiting middleware (src/middleware/rateLimit.ts and src/middleware/rateLimitRedis.ts). - Added isRateLimitBypassed helper function to bypass rate limiting for whitelisted IPs when RATE_LIMIT_BYPASS_ENABLED is enabled. - Added rateLimitBypassTotal Prometheus counter metric in src/utils/metrics.ts to monitor and track bypassed requests. 3. Encryption Key Rotation for PII Data (Closes Pidoko257#231): - Implemented non-blocking key rotation job src/jobs/keyRotationJob.ts to re-encrypt PII data with active key versions in paginated batches without interrupting live operations. - Leveraged dual-key fallback support in src/utils/encryption.ts ensuring uninterrupted read capabilities during and post key rotation. - Registered key-rotation job in scheduler src/jobs/scheduler.ts configured via KEY_ROTATION_CRON. 4. Audit Logging for All Configuration Changes (Closes Pidoko257#232): - Created database migration migrations/20260729_create_audit_log.sql creating immutable audit_log table with database trigger preventing UPDATE and DELETE. - Updated src/middleware/auditInterceptor.ts to intercept admin configuration changes, capturing before and after JSON states along with user identity, resource, action, and client metadata. - Expanded src/services/auditlogService.ts with logConfigChange, fetchConfigAuditLogs, and regulatory exportAuditLogs (supporting CSV and JSON formats). - Exposed audit log export route /api/admin/audit-logs/export in src/routes/admin.ts.
|
@zikirullahiabdu31-ops 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.
Detailed explanation of changes and implementation:
Description
Brief description of changes.
Related Issue
Fixes #(issue number)
Type of Change
Changes Made
Testing
How did you test these changes?
Checklist
Screenshots (if applicable)
Additional Notes