[COMPASS-6342] KeyVault error with embedded shell Created: 01/Dec/22  Updated: 29/Oct/23  Resolved: 14/Jun/23

Status: Closed
Project: Compass
Component/s: Embedded Shell
Affects Version/s: 1.34.1
Fix Version/s: 1.34.2

Type: Bug Priority: Minor - P4
Reporter: Anas Dhouib Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

macOs 12.6.1


Attachments: PNG File embedded_shell_error.png    
Story Points: 2
Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

Can not use embedded shell to get the keyVault object for the current encrypted database connection 

Please be sure to attach relevant logs with any sensitive data redacted.

Steps to Reproduce

Connection with In Use encryption using a local KeyStore

Compass 1.34.1

keyVault = db.getMongo().getKeyVault(); --> Error

Expected Results

Success when running keyVault = db.getMongo().getKeyVault(); 

Actual Results

[Error:|#]

Cannot find module 'mongodb'

Require stack: - /Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/mongodb-client-encryption/lib/index.js - /Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Julia Oppenheim [ 14/Jun/23 ]

closing this ticket as it looks like the main ask has been addressed 

Comment by Githook User [ 02/Dec/22 ]

Author:

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

Message: fix(service-provider-server): pass in driver to fle addon directly COMPASS-6342 (#1368)

See the ticket/source comments for details. I’ve confirmed that this
fixes the bug, although the main thing to address here is probably
writing an e2e test in Compass.
Branch: main
https://github.com/mongodb-js/mongosh/commit/0f7d57a7925a35f723d5c1a6b25f17489f44ba02

Comment by Githook User [ 02/Dec/22 ]

Author:

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

Message: fix(service-provider-server): pass in driver to fle addon directly COMPASS-6342

See the ticket/source comments for details. I’ve confirmed that this
fixes the bug, although the main thing to address here is probably
writing an e2e test in Compass.
Branch: 6342-dev
https://github.com/mongodb-js/mongosh/commit/f0dc008ceb6db28b5c97ac700173b831ebb7b542

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