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

FLE Schema Validation in Compass Gives Warning/Error

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • None
    • 3
    • Iteration Johannesburg

      I’m creating the following schema server side:

      db.getSiblingDB("testdb").runCommand(
        {
          "collMod" : "testcol",
          "validator" : {
            "$jsonSchema" : {
              "bsonType" : "object",
              "properties" : {
                "subscriber_ssn_nbr" : {
                  "encrypt" : {
                    "keyId" : [UUID("1618bad4-936d-4a9e-aa30-06629f1ee001")],
                    "algorithm" : "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
                  }
                },
                "claimArray": {
                  "bsonType": "array",
                  "items": {
                    "bsonType" : "object",
                    "properties": {
                      "claimId": {
                        "encrypt" : {
                          "keyId" : [UUID("1618bad4-936d-4a9e-aa30-06629f1ee001")],
                          "algorithm" : "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      )

      From Mongo Shell it’s executed and I get an ok: 1. It does enforcement properly as well (we’re using manual encryption). But from Compass I get a warning/error “Array elements must have type BinData, found object” I think this is worth investigating (or could be a potential bug?)

            Assignee:
            Unassigned Unassigned
            Reporter:
            emre.ucal@mongodb.com Emre Ucal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: