Specify socket/connect timeout to use for KMS requests

XMLWordPrintableJSON

    • Hide

      Summary of necessary driver changes

      •  

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      •  

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  

      Summary

      Specify socket/connect timeout to use for KMS requests

      Motivation

      When libmongocrypt enters the MONGOCRYPT_CTX_NEED_KMS state, drivers are expected to connect with TLS to a KMS service and do a socket write and read. It is not currently specified what socket/connect timeouts are expected.

      Drivers do not appear to apply timeouts consistently (ranging from 10 seconds, to 5 minutes, to "no timeout"). There is a report of KMS timeouts observed under heavy load with the Java driver using the 10 second timeout.

      Who is the affected end user?

      Users of CSFLE/QE.

      How does this affect the end user?

      May cause confusion as drivers have inconsistent timeout behavior with KMS requests.

      How likely is it that this problem or use case will occur?

      Likely. There are known inconsistencies between implementations:

      If the problem does occur, what are the consequences and how severe are they?

      Depends on the driver implementation. A too-long or no-timeout could block an application, and a too-short timeout could trigger unexpected KMS requests. The inconsistency may make it harder for users to reason about different language applications.

      Is this issue urgent?

      No?

      Is this ticket required by a downstream team?

      No?

      Is this ticket only for tests?

      No.

      Acceptance Criteria

      • Specify the expected timeout for KMS requests.
      • Specify the timeout passed to the KMS callback if CSOT is not applied (added in DRIVERS-2920).

            Assignee:
            Unassigned
            Reporter:
            Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: