Skip to content

Commit 9e68f17

Browse files
[3.13] Document that multiprocessing treats local same-user processes as trusted (GH-149001) (#149034)
Document that multiprocessing treats local same-user processes as trusted (GH-149001) Clarify in the Authentication keys section that the authkey handshake covers Listener/Client (addressable endpoints) only, not the anonymous pipes behind Pipe() and Queue, and that isolation between same-user processes must be arranged at the OS level. (cherry picked from commit f27e91e) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
1 parent 9651429 commit 9e68f17

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/library/multiprocessing.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,6 +2829,16 @@ between themselves.
28292829

28302830
Suitable authentication keys can also be generated by using :func:`os.urandom`.
28312831

2832+
This authentication protects :class:`Listener` and :func:`Client` connections,
2833+
which are reachable by address. It is not applied to the anonymous pipes
2834+
created by :func:`~multiprocessing.Pipe` or used internally by
2835+
:class:`~multiprocessing.Queue`.
2836+
:mod:`multiprocessing` treats all local processes running as the same user as
2837+
trusted; on most operating systems such processes can access each other's pipe
2838+
file descriptors regardless. Applications that require isolation between
2839+
processes of the same user must arrange it at the operating-system level --
2840+
for example, by running workers under a different user account or in a sandbox.
2841+
28322842

28332843
Logging
28342844
^^^^^^^

0 commit comments

Comments
 (0)