feat(connection-string-policy): add shared connection string policy checks VSCODE-798 - #863
Open
ivandevp wants to merge 2 commits into
Open
feat(connection-string-policy): add shared connection string policy checks VSCODE-798#863ivandevp wants to merge 2 commits into
ivandevp wants to merge 2 commits into
Conversation
…hecks VSCODE-798 Moves the connection string option checks that lived in the Compass main process into a shared package, so that the VS Code extension and the MCP server can use the same lists.
| 'timeoutMS', | ||
| 'tls', // Only if value is `true` or target host is local. | ||
| 'tlsCertificateKeyFile', | ||
| 'tlsCertificateKeyFilePassword', |
Collaborator
There was a problem hiding this comment.
Shouldn't we move tlsCertificateKeyFile/tlsCRLFile and the other local-file-reading options to the disallowed list? Or how do we make a decision on what goes in which bucket?
Collaborator
Author
There was a problem hiding this comment.
I know we tried moving it to the disallowed list but we ended up reverting it in mongodb-js/compass@6fb1568 and I found this thread about it
Collaborator
There was a problem hiding this comment.
It's worth documenting somewhere around this code I think as this is not the first time this trips people up
Co-authored-by: Alena Khineika <alena.khineika@mongodb.com>
gribnoysup
reviewed
Sep 1, 2026
| * Check a connection string against the policy list, and report the options that fall | ||
| * outside it. | ||
| * | ||
| * This is *not* a general-purpose connection string validator: it makes no claim about |
Collaborator
There was a problem hiding this comment.
Can we clarify what then it tells us?
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.
Description
Adds new package to check connection string policy and be reusable across different clients (i.e. compass, vscode, mcp).
Open Questions
mongodbpeer dependency is pinned to a single major on purpose: the type-level checks that keep the lists exhaustive are only meaningful against one set of driver typings. Is this safe to assume?devtools-connectinstead. I went with a separate package to avoid pulling its dependencies into a client that needs none of them, but happy to re-export it from there if preferred.Checklist