Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6069

Implement command-line connection string/file support

    • Type: Icon: Story Story
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.34.0
    • Affects Version/s: None
    • Component/s: Connectivity
    • None
    • 8
    • Iteration Kraken, Iteration Lobster
    • Needed
    • Hide

      Compass allows specifying a connection string or connection on the command line. Similar to DOCSP-25219, Compass is invoked through the path to its executable.

      Variant 1: Specify a connection string

      Compass can be run as "<path/to/compass/executable> <connection string>", e.g. mongodb-compass mongodb://my.cluster.mongodb.net/.

      Variant 2: Specify a connection from an exported connection file

      DOCSP-25219 describes how to export connections into a file. This can include more information than a connection string, such as In-Use Encryption parameters or SSH tunnel parameters. If such a file is present, Compass can be run as "<path/to/compass/executable> --file=<filename> [--passphrase=<passphrase>] [<connection id>]", where "filename" is the filename to the connections list file, "passphrase" is the passphrase provided when exporting connections (if any). "connection id" is the value of the "id" attribute in the connections list file and only needs to be specified if there is more than one connection in the exported file.

      Compass will attempt to connect automatically in these cases. If there is an error while loading, parsing or decrypting the connection string/file, or an error while connecting, Compass will still display its UI and act as if the error came from a regular connection attempt through the connection form.

      We expect this feature to be used in conjunction with the --protectConnectionStrings command line option, which is going to be implemented in COMPASS-6066.

      Show
      Compass allows specifying a connection string or connection on the command line. Similar to DOCSP-25219, Compass is invoked through the path to its executable. Variant 1: Specify a connection string Compass can be run as "<path/to/compass/executable> <connection string>", e.g. mongodb-compass mongodb://my.cluster.mongodb.net/ . Variant 2: Specify a connection from an exported connection file DOCSP-25219 describes how to export connections into a file. This can include more information than a connection string, such as In-Use Encryption parameters or SSH tunnel parameters. If such a file is present, Compass can be run as "<path/to/compass/executable> --file=<filename> [--passphrase=<passphrase>] [<connection id>] ", where "filename" is the filename to the connections list file, "passphrase" is the passphrase provided when exporting connections (if any). "connection id" is the value of the "id" attribute in the connections list file and only needs to be specified if there is more than one connection in the exported file. Compass will attempt to connect automatically in these cases. If there is an error while loading, parsing or decrypting the connection string/file, or an error while connecting, Compass will still display its UI and act as if the error came from a regular connection attempt through the connection form. We expect this feature to be used in conjunction with the --protectConnectionStrings command line option, which is going to be implemented in COMPASS-6066 .

      This includes automatically filling the connection form and connecting to the server, and displaying an error alongside the connection form if this fails (as we currently do).

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: