Prohibit encrypted fields and json schema with encrypted fields in create collection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Security 2022-03-21, Security 2022-04-04
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      To reduce scope, it is difficult to verify if a user has specified encryptedField and JSON schema for the same field in createCollection. We also do not want users to have FLE 1 deterministic and FLE 2 in the same collection. As a result, we are going to block users from using them at the same time.

      In DatabaseImpl::userCreateNS,if collectionOptions.encryptedFieldConfig.has_value(), remove MatchExpressionParser::AllowedFeatures::kEncryptKeywords from allowedFeatures in MatchExpressionParser::parse.
      See https://github.com/mongodb/mongo/blob/cd92f1325982f82314e0cbb08ced8d254198a7b2/src/mongo/db/catalog/database_impl.cpp#L1069

              Assignee:
              Shreyas Kalyan
              Reporter:
              Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: