-
Notifications
You must be signed in to change notification settings - Fork 5.1k
chore(destination-mongodb): remove strict-encrypt variant, use env-aware TLS enforcement #72812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore(destination-mongodb): remove strict-encrypt variant, use env-aware TLS enforcement #72812
Conversation
…are TLS enforcement - Add spec() override to MongodbDestination that removes TLS option for standalone instances when DEPLOYMENT_MODE=CLOUD - Add TLS enforcement check in check() method for cloud deployment mode - Remove registryOverrides.cloud.dockerRepository pointing to strict-encrypt - Delete destination-mongodb-strict-encrypt connector directory This migration allows the base connector to handle both OSS and Cloud deployments, enforcing TLS in Cloud mode without needing a separate strict-encrypt connector. Co-Authored-By: AJ Steers <aj@airbyte.io>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Note 📝 PR Converted to Draft More info...Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy. As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page. To skip draft status in future PRs, please include |
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| final JsonNode instanceConfig = config.get(MongoUtils.INSTANCE_TYPE); | ||
| final var instance = MongoUtils.MongoInstanceType.fromValue(instanceConfig.get(MongoUtils.INSTANCE).asText()); | ||
| if (instance.equals(MongoUtils.MongoInstanceType.STANDALONE) && !MongoUtils.tlsEnabledForStandaloneInstance(config, instanceConfig)) { | ||
| throw new ConfigErrorException("TLS connection must be used to read from MongoDB."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Incorrect error message says 'read from' for a destination connector
The error message in the TLS enforcement check incorrectly says "TLS connection must be used to read from MongoDB" but this is a destination connector that writes to MongoDB, not reads from it.
Click to expand
Issue
At line 94, when TLS is not enabled for a standalone instance in cloud mode, the error message states:
throw new ConfigErrorException("TLS connection must be used to read from MongoDB.");This message was copied from the original MongodbDestinationStrictEncrypt which had the same incorrect wording. For a destination connector, the message should say "write to" instead of "read from".
Impact
This is a cosmetic issue that may confuse users when they see the error message, as it incorrectly describes the operation being performed. The functionality works correctly - TLS enforcement still happens properly.
Recommendation: Change the error message to: "TLS connection must be used to write to MongoDB."
Was this helpful? React with 👍 or 👎 to provide feedback.
…loudDeployment() Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
| | 0.1.1 | 2021-09-29 | [6536](https://github.com/airbytehq/airbyte/pull/6536) | Destination MongoDb: added support via TLS/SSL | | ||
|
|
||
| </details> No newline at end of file | ||
| | 0.3.0 | 2026-02-04 | [*PR_NUMBER_PLACEHOLDER*](https://github.com/airbytehq/airbyte/pull/*PR_NUMBER_PLACEHOLDER*) | Remove strict-encrypt variant; use environment-aware TLS enforcement | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
| | 0.1.1 | 2021-09-29 | [6536](https://github.com/airbytehq/airbyte/pull/6536) | Destination MongoDb: added support via TLS/SSL | | ||
|
|
||
| </details> No newline at end of file | ||
| | 0.3.0 | 2026-02-04 | [*PR_NUMBER_PLACEHOLDER*](https://github.com/airbytehq/airbyte/pull/*PR_NUMBER_PLACEHOLDER*) | Remove strict-encrypt variant; use environment-aware TLS enforcement | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
| | 0.1.1 | 2021-09-29 | [6536](https://github.com/airbytehq/airbyte/pull/6536) | Destination MongoDb: added support via TLS/SSL | | ||
|
|
||
| </details> No newline at end of file | ||
| | 0.3.0 | 2026-02-04 | [*PR_NUMBER_PLACEHOLDER*](https://github.com/airbytehq/airbyte/pull/*PR_NUMBER_PLACEHOLDER*) | Remove strict-encrypt variant; use environment-aware TLS enforcement | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
| | 0.3.0 | 2026-02-04 | [*PR_NUMBER_PLACEHOLDER*](https://github.com/airbytehq/airbyte/pull/*PR_NUMBER_PLACEHOLDER*) | Remove strict-encrypt variant; use environment-aware TLS enforcement | | |
| | 0.3.0 | 2026-02-04 | [_PR_NUMBER_PLACEHOLDER_](https://github.com/airbytehq/airbyte/pull/*PR_NUMBER_PLACEHOLDER*) | Remove strict-encrypt variant; use environment-aware TLS enforcement | |
|
Deploy preview for airbyte-docs ready! ✅ Preview Built with commit 35139b0. |
What
Removes the separate
destination-mongodb-strict-encryptconnector by migrating its TLS enforcement logic into the basedestination-mongodbconnector, making it responsive to theDEPLOYMENT_MODE=CLOUDenvironment variable.This is part of a broader effort to eliminate strict-encrypt connector variants, which create cross-connector dependencies in the publish workflow and complicate progressive rollouts (see workflow comments).
How
spec()override inMongodbDestinationthat removes the TLS configuration option for standalone instances when running in cloud deployment modecheck()method that throwsConfigErrorExceptionif a standalone instance doesn't have TLS enabled in cloud modedockerRepositoryoverride inmetadata.yamlthat pointed cloud to the strict-encrypt variantdestination-mongodb-strict-encryptconnector directoryReview guide
MongodbDestination.java- Verify:getIsCloudDeployment()is accessible (inherited fromBaseConnector)metadata.yaml- Confirm the registry override change is correctUser Impact
Can this PR be safely reverted and rolled back?
Link to Devin run: https://app.devin.ai/sessions/bebef009e9144b0a8b6ad3f164acd8d6
Requested by: AJ Steers (@aaronsteers)