Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8013

Investigate changes in SERVER-91075: Make min, max, and sparsity optional when validating a QE range QueryTypeConfig

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools
    • Not Needed

      Original Downstream Change Summary

      This change relaxes a restriction on the server & query analysis code when validating a queryable encryption schema ("encryptedFieldConfig") that defines range-indexed encrypted fields. Specifically, the min and max fields are no longer required for int, long, and date types, and the sparsity field is no longer required for all types. For int, an unspecified min implies a default lower bound of -1 * 2^31 (or -2147483648) and an unspecified max implies a default upper bound of 2^31 - 1 (or 2147483647). For long, the implicit default min and max are (-1 * 2^63) and (2^63 - 1) respectively. In terms of milliseconds since the Unix epoch, date has the same default implicit upper and lower bounds as long. Sparsity currently defaults to a value of 1, but this is not final, and is expected to be changed in SERVER-91077.

      Description of Linked Ticket

      The IDL validator for the EncryptedFieldConfig enforces a requirement that the min and max fields must be specified for range query specs for types int, long, and date. In addition, sparsity must be specified for all range types. The crypto team has asked that we make the min, max, and sparsity fields optional.

      For int & long long, query analysis will default to using std::numeric_limits<T>::min() and std::numeric_limits<T>::max() for unspecified min & max, respectively, when setting the min/max in the FLE2RangeInsertSpec or in the FLE2RangeFindSpecEdgesInfo. For date, the default min is Date_t::min() and default max is Date_t::max(). Sparsity will default to 1.

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: