[SERVER-40392] [FLE] Handle reconciliation of pipeline output schema with collection schema for pipeline updates Created: 29/Mar/19  Updated: 29/Oct/23  Resolved: 13/Jun/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.2.0-rc2, 4.3.1

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

Issue Links:
Backports
Related
related to SERVER-40381 Add the ability to specify a pipeline... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Query 2019-06-17
Participants:

 Description   

In the case that a pipeline is being used for an update, ensure that FLE passes the pipeline to the aggregation machinery encapsulated by class FLEPipeline.

Given the output schema returned from aggregate_expression_intender::getOutputSchema for the last stage which should be present in FLEPipeline's _finalSchema field, compare it to the the schema for the collection being written to and produce an error message if there is a mismatch.

This ticket does not include the work to mark literals for encryption for the sake of writing to the database which is covered in SERVER-41485. So this work assumes that the schema output from the last Stage is already desirable.

Without SERVER-41485 The following should work and be tested:

  • writing to unencrypted fields with a pipeline that does not source from encrypted fields
  • writing from encrypted fields to other encrypted fields of the same type

The following is not expected to work:

  • writing a literal or conditional expression containing literals into an encrypted field


 Comments   
Comment by Githook User [ 13/Jun/19 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-40392 Handle reconciliation of pipeline output schema with collection schema for pipeline updates

(cherry picked from commit caa9ba4794594ddcf26328f0bd3bd0dbb5774bad)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/06761edcaa1fd1bea36905a61fcd1c3bc278a0f3

Comment by Githook User [ 13/Jun/19 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-40392 Handle reconciliation of pipeline output schema with collection schema for pipeline updates
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/caa9ba4794594ddcf26328f0bd3bd0dbb5774bad

Comment by James Wahlin [ 30/Apr/19 ]

We are missing a test to confirm that this feature is currently banned. If we decide to not do the work described by this ticket we should add this test.

Generated at Thu Feb 08 04:54:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.