Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40392

[FLE] Handle reconciliation of pipeline output schema with collection schema for pipeline updates

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc2, 4.3.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • v4.2
    • Query 2019-06-17

      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

            Assignee:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: