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

Add keyId field to logicalTime object

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.5.6
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2017-04-17

    Description

      The keyId field is populated during the signature generation and is used to uniquely identify the key that was used for it.
      This change will add a dummy keyId value and a few tests to verify the new format.

      1. add int _keyId

      {0}

      member to the SignedLogicalTime class, change its c-tor to take a keyId argument.
      2. add a static const SignedLogicalTime::kUninitialized for the default constructed
      3. change LogicalTimeMetadata::writeToMetadata to write to logicalTime the keyId as

      logicalTime: {
          clusterTime: <highest known valid LogicalTime_MEM>
          signature: {
              hash: HMAC SHA1 hash of cluster time for validation,
              keyId: <int>
          }
      }
      

      4. change LogicalTimeMetadata::readFromMetadata to parse the keyId
      5. add a test to logical_type_Test.cpp to validate that keyId roundtrip works

      Attachments

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: