Add support for creating encrypted schemas

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • mongoose-csfle
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... mongoose user
      I want... I want to be able to specify which fields I want encrypted and how
      So that... I can use field-level encryption in an idiomatic way 

      Acceptance Criteria

      Implementation Requirements

      • On construction, the Schema constructor 
        • parses the input from the user and extracts any encrypted fields into a separate field, encryptedFields.  see the schema section of the design for details.
        • Determines the encryption type (queryable encryption or CSFLE).  
        • see the schema section of the design for details.
      • Schema mutation methods will be updated to update the encrypted fields map if new encrypted fields are added / removed.  This applies to:
        • add()
        • remove()
      • Validation
      • Typescript support
        • Add typescript support for encrypted schemas
      • Merge to mongodb mongoose fork for now

      Testing Requirements

      • Test that data is stored correctly
      • Throw on incorrect configruation
      • Add Typescript tests outlining the expected Typescript behavior when declaring schemas

      Documentation Requirements

      • API docs

      Follow Up Requirements

      • Mongoose Docs update to include CSFLE/QE

            Assignee:
            Bailey Pearson
            Reporter:
            Bailey Pearson
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: