[SERVER-78742] Ensure that connection fatal socket exceptions are respected in PyKMIP Created: 06/Jul/23  Updated: 29/Oct/23  Resolved: 07/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc8, 6.0.9

Type: Task Priority: Major - P3
Reporter: Spencer Jackson Assignee: Spencer Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.0
Sprint: Security 2023-07-10
Participants:
Linked BF Score: 5

 Description   

PyKMIP emits a specific exception in its message handling loop when it believes that a socket fatal condition has occured. This exception is used to terminate the KMIP session. On Linux, it's able to pretty reliably detect a closed connection. On Windows, the socket stack emits an error like ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host. PyKMIP does not map this ConnectionResetError exception into its equivalent internal exception type.

We should perform this mapping, in order to get PyKMIP to gracefully respond to client hangups on all platforms, and not emit huge amounts of log messages on Windows.


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