feat: subscription locking, DB encryption, API key rotation, and payment gateway adapter#647
Conversation
…key rotation, and payment gateway adapter - Issue Smartdevs17#610: Advisory lock service with retry/deadlock detection, integrated into billing and subscription operations - Issue Smartdevs17#604: Column-level AES-256-GCM encryption with envelope key management (KMS/Vault providers), CMK config API - Issue Smartdevs17#603: Automated API key rotation with configurable interval, grace period overlap, rotation history, and cron job - Issue Smartdevs17#581: Payment gateway adapter pattern with Stripe/Circle/Stellar implementations, fallback chain routing - Add database migrations for encrypted columns, API key rotation, and merchant gateway config tables - Add Prometheus-compatible lock contention and timeout metrics - Update IoC container and barrel exports for all new services
|
@samsonmbah002 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! 🚀 |
…nflict resolution
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 34266369 | Triggered | Generic Password | eff1088 | backend/config/tests/redis.test.ts | View secret |
| 15742864 | Triggered | Generic Password | eff1088 | docker-compose.yml | View secret |
| 15762030 | Triggered | Generic Password | eff1088 | docker-compose.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Summary
This PR implements four major features addressing subscription billing race conditions, column-level encryption, API key rotation, and payment gateway extensibility.
Issues
Closes #610
Closes #604
Closes #603
Closes #581
#610 — Subscription Billing Race Condition Handling (Pessimistic Locking)
#604 — Database Encryption at Rest with Customer-Managed Keys
#603 — API Key Rotation Automation
#581 — Payment Gateway Adapter Pattern
Technical Details