Extend KMSService to support BSONObj cmks

XMLWordPrintableJSON

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

      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
            Reporter:
            Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: