Block deprecated substringPreview query type strings at collection creation and CRUD time

XMLWordPrintableJSON

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

      Once libmongocrypt supports the new "substring" query type name, block the deprecated "substringPreview" string at collection creation and CRUD time. See SERVER-123416 for an example blocking the deprecated "suffixPreview" and "prefixPreview" types.

      Acceptance Criteria:

      Change the following

      • Collection creation (src/mongo/db/shard_role/ddl/create_command.cpp) — Add uassert calls to reject "SubstringPreviewDeprecated" at collection creation, matching the existing pattern from SERVER-123416.
      • (src/mongo/crypto/fle_crypto.cpp — getAndValidateSchema) — Add uassert calls to reject operations on collections that still use "SubstringPreviewDeprecated", prompting users to recreate with the new "Substring". This matches the existing CRUD-time blocking from SERVER-123416.
      • Address all "TODO"s marking places in the code where substringPreview should be updated to substring (e.g. src/mongo/db/modules/enterprise/jstests/no_passthrough/fle2_create_collection_invalid_text_opts.js)

       

            Assignee:
            Sam Frank
            Reporter:
            Sam Frank
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: