[DRIVERS-2659] Fix test failures using PyKMIP Created: 21/Jun/23  Updated: 28/Oct/23  Resolved: 23/Jun/23

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Driver Changes: 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.



 Comments   
Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2659 use fork of PyKMIP (#326)
Branch: master
https://github.com/mongodb-labs/drivers-evergreen-tools/commit/a32b7d31f74761f3268e2ea61200b9c505f23bf2

Generated at Thu Feb 08 08:26:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.