[COMPASS-6074] Implement connection import via CLI Created: 30/Aug/22  Updated: 29/Oct/23  Resolved: 13/Sep/22

Status: Closed
Project: Compass
Component/s: Connection Import/Export
Affects Version/s: None
Fix Version/s: 1.34.0

Type: Task Priority: Major - P3
Reporter: Anna Henningsen Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-6113 Ensure telemetry for CLI connection i... Closed
Documented
Related
is related to COMPASS-6073 Implement connection export via CLI Closed
is related to COMPASS-6076 Implement connection import via UI Closed
is related to COMPASS-6119 Investigate how to fix keychain integ... Closed
is related to COMPASS-6269 Investigate connection import / expor... Closed
Epic Link: COMPASS-5816
Story Points: 3
Documentation Changes: Needed
Documentation Changes Summary:

Compass adds support for importing and exporting favorite connections from the command line.

In the following examples, "mongodb-compass" stands for the Compass executable, or the path to it, respectively. For example, this could be MongoDBCompass.exe on Windows, mongodb-compass on Linux, and MongoDB Compass on macOS, preceded by the installation path.

Exporting connections can be performed via

mongodb-compass --export-connections=<filename> --passphrase=<passphrase>

Where Compass will export all favorite connections to filename. If --passphrase is provided, it will encrypt secrets in the resulting file using that passphrase. If it is not provided, connection secrets will be included in unencrypted format. Importing connections happens similarly:

mongodb-compass --import-connections=<filename> --passphrase=<passphrase>

It is worth noting that in the near future, Compass will introduce related features:

  • COMPASS-6066 will include a new flag that can also be passed on the command line together with the other export flags, which, amongst other things, will make Compass omit secrets when exporting
  • COMPASS-6075 and COMPASS-6076, which will add the same functionality to the Compass UI itself.
Sprint: Iteration Jellyfish

 Description   

This includes adding telemetry and e2e tests.



 Comments   
Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074 (#3454)

  • chore(compass-e2e-tests): allow spawning one-shot compass processes
  • chore(connection-model): allow accessing from main process

`splice-disk` is the main process equivalent of `splice-disk-ipc`
for renderers. Properly expose it and use it in connection-model.

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/c2469d2fd0ea1bb9bea0254fb5ce2493bba81a18

Comment by Githook User [ 15/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074 (#3454)

  • chore(compass-e2e-tests): allow spawning one-shot compass processes
  • chore(connection-model): allow accessing from main process

`splice-disk` is the main process equivalent of `splice-disk-ipc`
for renderers. Properly expose it and use it in connection-model.

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: COMPASS-6110-remove-spacing-between-tabs-and-sidebar
https://github.com/mongodb-js/compass/commit/c2469d2fd0ea1bb9bea0254fb5ce2493bba81a18

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074 (#3454)

  • chore(compass-e2e-tests): allow spawning one-shot compass processes
  • chore(connection-model): allow accessing from main process

`splice-disk` is the main process equivalent of `splice-disk-ipc`
for renderers. Properly expose it and use it in connection-model.

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: COMPASS-6060-new-preferences-class
https://github.com/mongodb-js/compass/commit/c2469d2fd0ea1bb9bea0254fb5ce2493bba81a18

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074 (#3454)

  • chore(compass-e2e-tests): allow spawning one-shot compass processes
  • chore(connection-model): allow accessing from main process

`splice-disk` is the main process equivalent of `splice-disk-ipc`
for renderers. Properly expose it and use it in connection-model.

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: main
https://github.com/mongodb-js/compass/commit/c2469d2fd0ea1bb9bea0254fb5ce2493bba81a18

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/136e346492e2eba0b9a0872fb4dedccee442761e

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/e24cec2744261a3158a93eb390443bf37dffee73

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/db27b61c1e3182cb2f43b611b86ecd59cb5057fd

Comment by Githook User [ 12/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/20771d45b43bb623f0bd528de02495242bf6dd3b

Comment by Githook User [ 12/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/4a0b5c473def173ec0edf941525b38c38406b29e

Comment by Githook User [ 09/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fixup! feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/2b5898f9b3e3fac9f1689760a61a761319bc02e6

Comment by Githook User [ 09/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/2081fee374a41b0adcfc0b80fba0caf13250781f

Comment by Githook User [ 08/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat(compass): add CLI connection import/export COMPASS-6073 COMPASS-6074

Add support for exporting and importing favorite connections when
using Compass as a CLI. Users can specify `--export-connections=<file>`,
`--import-connections=<file>` and optionally also a passphrase
through `--passphrase=<string>`.

The encryption/decryption and export/import logic are added to the
data-service package. The Compass main entry point is modified
to the degree to which it is necessary to allow running it as
a CLI rather than always in GUI mode.
Branch: cli-connection-import-export
https://github.com/mongodb-js/compass/commit/151f8dc50265172988611a3b1b00003f90335c2f

Generated at Wed Feb 07 22:41:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.