Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53081

Extend KMSService to support BSONObj cmks

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Fully Compatible
    • Security 2020-12-14

      Today, KMSService only supports encryptDataKey where a cmk is identified by a string. This does not support the needs of Azure and GCP which need their key information defined by BSON.

      KMService should be extended as follows:

      • add virtual StringData name() const = 0;
      • add virtual BSONObj encryptDataKey(ConstDataRange cdr, BSONObj keyId);
      • change the existing encryptDataKey to be non-abstract
      • create default implementations of encryptDataKey that throw errors saying the key format is unsupported.

      change EncryptedDBClientBase::generateDataKey to dispatch to the right encryptDataKey depending on type of the parameter, and adjust the type checking in KeyVault::_createKey.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: