Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2659

Fix test failures using PyKMIP

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • Not Needed

    Description

      Summary

      Fix test failures using PyKMIP.

      Background & Motivation

      The Java driver observed test failures on tests using PyKMIP. See slack thread.

      A patch build was run to dump the logs of the PyKMIP server.

      Logs suggest TLS is failing from the driver to PyKMIP due to no shared ciphers.

      2023-06-21 19:35:58,126 - kmip.server.session.00000003 - INFO - Starting session: 00000003
      2023-06-21 19:35:58,173 - kmip.server.session.00000003 - DEBUG - Request encoding: b'4200780100000070'
      2023-06-21 19:35:58,173 - kmip.server.session.00000003 - DEBUG - Request encoding: b'4200770100000038420069010000002042006a0200000004000000010000000042006b0200000004000000000000000042000d0200000004000000010000000042000f010000002842005c05000000040000001200000000420079010000001042009407000000013200000000000000'
      2023-06-21 19:35:58,173 - kmip.server.session.00000003 - WARNING - Failure parsing request message.
      2023-06-21 19:35:58,173 - kmip.server.session.00000003 - ERROR - object of type 'NoneType' has no len()
      Traceback (most recent call last):
        File "/data/mci/ed2138b4a01580ba489bb7e3b9bc6679/drivers-tools/.evergreen/csfle/kmstlsvenv/lib/python3.11/site-packages/kmip/services/server/session.py", line 133, in _handle_message_loop
          "Possible session ciphers: {0}".format(len(shared_ciphers))
                                                 ^^^^^^^^^^^^^^^^^^^
      TypeError: object of type 'NoneType' has no len()
      2023-06-21 19:35:58,174 - kmip.server.session.00000003 - DEBUG - Response encoding: b'42007b01000000c842007a0100000048420069010000002042006a0200000004000000010000000042006b020000000400000000000000004200920900000008000000006493511e42000d0200000004000000010000000042000f010000007042007f0500000004000000010000000042007e0500000004000000040000000042007d07000000444572726f722070617273696e672072657175657374206d6573736167652e2053656520736572766572206c6f677320666f72206d6f726520696e666f726d6174696f6e2e00000000'
      2023-06-21 19:35:58,175 - kmip.server.session.00000003 - INFO - Stopping session: 00000003
      

      Go had a similar problem. Tthis was solved by using EC certificates in: https://github.com/mongodb/mongo-go-driver/pull/1051
      Maybe something on the rhel80 distro, or JVM changed resulting in a different set of supported ciphers.

      Attachments

        Activity

          People

            kevin.albertson@mongodb.com Kevin Albertson
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: