Skip to content

MongoDB driver for the Linux app #3646

Open

Description

@datlechin

Problem

The Linux app has no MongoDB driver (linux/README.md, Status), while the macOS app opens MongoDB connections through its plugin.

linux/ROADMAP.md, Backlog, More engines lists MongoDB with the client, mongodb 3.x with default features off and rustls-tls-aws-lc, and one condition: "It must use the system trust store first: it fills its roots from webpki-roots unless ca_file_path is set, so it needs native roots upstream or ca_file_path set to the platform bundle."

Like Redis, MongoDB does not speak SQL, and the driver contract assumes SQL through SqlDialect and SqlGrammar (linux/docs/adding-drivers.md, section 7).

Proposed solution

  • Meet the trust store condition first: native roots in the mongodb crate upstream, or ca_file_path pointed at the system bundle, so a server certificate is checked against the same roots as the other engines (ADR 0009).
  • A crates/drivers/mongodb crate reached through the app's transport. Through an SSH tunnel, connect to the one host with directConnection, since replica set members advertise names the tunnel does not reach.
  • Decide how documents fit the grid and the editor, and record it in linux/docs/adding-drivers.md:
    • the sidebar lists databases and collections;
    • a collection opens as a grid of top-level fields, with nested documents and arrays shown as JSON and edited as JSON, checked before saving, as JSON cells are today;
    • the editor runs find and aggregate style queries with their own grammar, and the history check skips any that carry credentials.
  • Read-only connections refuse writes before they are sent, including aggregate with $out or $merge.
  • Stop a running operation with killOp or by closing the cursor, as the contract requires.
  • The conformance suites that apply, a Docker fixture with a replica set, and a page in linux/docs/drivers/.

Done means: a MongoDB connection, direct, through an SSH tunnel or with mongodb+srv://, lists collections, pages documents and edits a field, and the adding-drivers.md checklist is complete.

Alternatives considered

No response

Platform

Linux

Related database type

MongoDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions