[SERVER-63467] Create a shell helper that can be used to call compact encryption data Created: 09/Feb/22  Updated: 29/Oct/23  Resolved: 17/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Security 2022-03-07, Security 2022-03-21
Participants:

 Comments   
Comment by Githook User [ 15/Mar/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-63467 Create a shell helper that can be used to call compact encryption data
Branch: master
https://github.com/mongodb/mongo/commit/30f48983c02e18b8af6303526582d05c8bff865b

Comment by Mark Benvenuto [ 09/Feb/22 ]

Calling compactStructuredEncryptionData requires ECOC tokens

1. Extend the mongo object in src/mongo/scripting/mozjs/mongo.h with a new method
2. Extend the EncryptedDBClientBase object with a new method that will access the key vault and generate the ECOC tokens
3. I believe it may be simpler for the EncryptedDBClientBase to then send the command onward to the server. If that is too complicated, have the helper return a compactStructuredEncryptionData BSON document and use JS code to send it to the server (via runCommand)
4. add a JS method on Collection in src/mongo/shell/collection.js

Generated at Thu Feb 08 05:57:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.