Repository navigation
chore: add DB_CA_CERT option to postgres db connections for SSL - #414
Conversation
WalkthroughAdds conditional SSL/TLS configuration to database connections across 8 TypeORM DataSource configurations. Each now conditionally enables SSL with CA certificate verification when Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (1)
infrastructure/evault-core/src/config/database.ts (1)
18-23: Consider extracting SSL configuration to a shared utility.The same SSL configuration pattern is duplicated across 8 files in this PR. Consider creating a shared utility function in the infrastructure layer to reduce duplication and ensure consistency.
Example implementation in a shared file (e.g.,
infrastructure/evault-core/src/config/ssl-config.ts):import type { DataSourceOptions } from "typeorm"; export function getDatabaseSslConfig(): DataSourceOptions["ssl"] { return process.env.DB_CA_CERT ? { ca: process.env.DB_CA_CERT, } : false; }Then import and use in each DataSource configuration:
import { getDatabaseSslConfig } from "path/to/ssl-config"; export const AppDataSource = new DataSource({ // ... other options ssl: getDatabaseSslConfig(), });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
infrastructure/evault-core/src/config/database.ts(1 hunks)infrastructure/evault-core/src/core/provisioning/config/database.ts(1 hunks)platforms/cerberus/src/database/data-source.ts(1 hunks)platforms/dreamsync-api/src/database/data-source.ts(1 hunks)platforms/evoting-api/src/database/data-source.ts(1 hunks)platforms/group-charter-manager-api/src/database/data-source.ts(1 hunks)platforms/pictique-api/src/database/data-source.ts(1 hunks)platforms/registry/src/config/database.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: lint
- GitHub Check: test
- GitHub Check: test-web3-adapter-integration
- GitHub Check: test
Description of change
adds additional config for SSL connection in postgres
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit