-
Type: Bug
-
Resolution: Gone away
-
Priority: Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
ALL
-
v4.2
-
-
Query 2019-07-01
In SERVER-40832 we added client-side encryption support for the $redact aggregation stage. This works by simply calling into our regular aggregation expression analysis which marks agg expressions for encryption. This so intent-to-encrypt marking logic, however, always assumes that field paths are full paths with respect to $$ROOT. It does not account for the fact that during $redact's descent of an object, $$CURRENT is rebound such that $$CURRENT != $$ROOT. Therefore, field paths in $redact are not always full path starting from the root of the document. The consequence is that the analysis can fail to mark a constant for encryption. See "Steps to Reproduce" for an example.
A quick fix for this problem would be to revert the changes in SERVER-40832. As a more complex fix, we could investigate whether it is possible to handle special cases in which we can statically prove that it is impossible for a comparison made in $redact to happen against both encrypted and unencrypted data.
- is related to
-
SERVER-40832 [FLE] Implement schema translation for $redact stage
- Backlog