feat(mongodb): add support for custom tls cert #222

Closed
opened 2026-04-05 16:16:00 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @itsmenewbie03 on 1/16/2026

What

This change adds support for custom TLS/SSL certificates when connecting to MongoDB databases during backup and restore operations.

Why

This enables secure connections to MongoDB instances that require certificate-based authentication, supporting both server verification via a CA certificate and mutual TLS using a client certificate and private key. This is necessary for environments where TLS is mandatory.

How

On the backend, new tls_ca_file, tls_cert_file, and tls_cert_key_file fields were added to the database schema, and the backup/restore logic was updated to write the provided certificates to temporary files and pass them to mongodump and mongorestore. The same TLS handling is also implemented in the MongoDB connection tester to ensure connectivity checks accurately reflect production behavior. On the frontend, three optional textarea inputs were added to the MongoDB configuration UI to allow pasting PEM-encoded certificates. All TLS fields are optional, so existing configurations continue to work without any changes.

*Originally created by @itsmenewbie03 on 1/16/2026* ### What This change adds support for custom TLS/SSL certificates when connecting to MongoDB databases during backup and restore operations. ### Why This enables secure connections to MongoDB instances that require certificate-based authentication, supporting both server verification via a CA certificate and mutual TLS using a client certificate and private key. This is necessary for environments where TLS is mandatory. ### How On the backend, new tls_ca_file, tls_cert_file, and tls_cert_key_file fields were added to the database schema, and the backup/restore logic was updated to write the provided certificates to temporary files and pass them to mongodump and mongorestore. The same TLS handling is also implemented in the MongoDB connection tester to ensure connectivity checks accurately reflect production behavior. On the frontend, three optional textarea inputs were added to the MongoDB configuration UI to allow pasting PEM-encoded certificates. All TLS fields are optional, so existing configurations continue to work without any changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#222