Skip to content

Conversation

@csabella
Copy link

bpo-17258: multiprocessing now supports stronger HMAC algorithms for inter-process connection authentication rather than only HMAC-MD5.

gpshead: I Reworked to be more robust while keeping the idea.

The protocol modification idea remains, but we now take advantage of the message length as an indicator of legacy vs modern protocol version. No more regular expression usage. We now default to HMAC-SHA256, but do so in a way that will be compatible when communicating with older clients or older servers. No protocol transition period is needed.

More integration tests to verify these claims remain true are required. I'm unaware of anyone depending on multiprocessing connections between different Python versions.


(cherry picked from commit 3ed57e4)

bpo-17258:  `multiprocessing` now supports stronger HMAC algorithms for inter-process connection authentication rather than only HMAC-MD5.

Signed-off-by: Christian Heimes <christian@python.org>

gpshead: I Reworked to be more robust while keeping the idea.

The protocol modification idea remains, but we now take advantage of the
message length as an indicator of legacy vs modern protocol version.  No
more regular expression usage.  We now default to HMAC-SHA256, but do so
in a way that will be compatible when communicating with older clients
or older servers. No protocol transition period is needed.

More integration tests to verify these claims remain true are required. I'm
unaware of anyone depending on multiprocessing connections between
different Python versions.

---------

(cherry picked from commit 3ed57e4)

Co-authored-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
@csabella csabella marked this pull request as ready for review December 18, 2024 18:07
Copy link

@joneshf-dd joneshf-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a pretty straight-forward cherry-pick.


(cherry picked from commit 3ed57e4)

👏 praise: Thanks for linking to the original commit! Made it easier to compare.

@csabella
Copy link
Author

👏 praise: Thanks for linking to the original commit! Made it easier to compare.

Thanks! I cheated and used the cpython cherry-picker tool.

@csabella csabella merged commit a4f4627 into 3.10 Dec 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants