feat: MongoDB TLS CA fields + DocumentDB connection type#29
Merged
jiatolentino merged 2 commits intoJun 28, 2026
Conversation
deb6b25 to
c4b3148
Compare
alxboyle
approved these changes
Jun 28, 2026
- Add tls_ca_file and tls_allow_invalid_certificates to MongoConnectionConfig, serialized only when TLS is enabled (ca_file only when set, allow-invalid only when true), with round-trip deserialization and unit tests. - Add DatabaseType.documentdb and DocumentDbConnectionConfig (a MongoConnectionConfig subclass differing only by db_type), registered in DB_TYPE_MAP and exported, so AWS DocumentDB connections round-trip as their own type.
c4b3148 to
4853ace
Compare
alxboyle
approved these changes
Jun 28, 2026
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.
MongoDB TLS CA fields
tls_ca_file: str = ""andtls_allow_invalid_certificates: bool = FalsetoMongoConnectionConfig.to_api_dictspec):tlsis enabled,tls_ca_fileonly when set,tls_allow_invalid_certificatesonly whenTrue.AWS DocumentDB connection type
DatabaseType.documentdb.DocumentDbConnectionConfig, a thin subclass ofMongoConnectionConfigthat differs only by itsdb_type/database_typediscriminator (inherits all fields, TLS handling, and serialization).DB_TYPE_MAPand export it fromdatamasque.client.Testing
tests/test_connections.py:db_type=documentdb,retry_writespassthrough) andvalidate_connectiondispatch toDocumentDbConnectionConfig.pytest(358 passed),ruff, andmypyall clean.Notes