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

Support Multiple Encrypted Index Types on a Single Field

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Queryable Encryption
    • None
    • Server Security

      Reasoning/Need:

      Now that we're adding Range, a single field could be associated with multiple encrypted indices–in particular, both Range and Equality. So, when a field is being analyzed in an FLE2 supported queries context, that field could be associated with a set of queries. And, thus, every member of that query set should be checked (i.e., confirm that it's a currently supported type).

       

      The critical change begins in resolved_encryption_info.h by changing:

      stdx::variant<FleAlgorithmEnum, Fle2AlgorithmInt> algorithm;  

      TO:
      stdx::variant<FleAlgorithmEnum, std::set<Fle2AlgorithmInt>> algorithm;
       
      (unless a better type has been determined). 
       

      Details:

      Main files:

      resolved_encryption_info.cpp & resolved_encryption_info.h (src>mongo>db>modules>enterprise>src>fle>query_analysis)

      Notes:

      Examples of functions that will likely need to be modified (in resolved_encryption_info.cpp):

      • ResolvedEncryptionInfo constructor. E.g.,:
        • initialize algorithm as something like std::set<Fle2AlgorithmInt> algorithm;
          • would then set to default kUnindexed IF the set is empty before type checking at the end of the constructor
        • instead of algorithm = Fle2AlgorithmInt::kRange, would use something like algorithm.insert(Fle2AlgorithmInt::kEquality)
      • algorithmIs(Fle2AlgorithmInt fle2Alg)
        • instead of the current get_if<FleAlgorithmEnum>
        • do something like: ...get_if<std::set<Fle2AlgorithmInt>>...

            Assignee:
            backlog-server-security [DO NOT USE] Backlog - Security Team
            Reporter:
            reilly.mcbride@mongodb.com Reilly McBride
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: