[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2015-03-12 Thread Davin Potts

Davin Potts added the comment:

Per Richard's post from 1 year ago where he offers both explanation and an 
example, ultimately concluding that things are working as intended, and because 
there have been no objections or requests for clarification in the past year, 
closing this and marking it as not a bug.

--
nosy: +davin
resolution:  - not a bug
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-03-23 Thread Richard Oudkerk

Richard Oudkerk added the comment:

For reasons we all know unpickling unauthenticated data received over TCP is 
very risky.  Sending an unencrypted authentication key (as part of a pickle) 
over TCP would make the authentication useless.

When a proxy is pickled the authkey is deliberately dropped.  When the proxy is 
unpickled the authkey used for the reconstructed proxy is 
current_process().authkey.  So you can fix the example by setting the 
current_process().authkey to match the one used by the manager:

import multiprocessing
from multiprocessing import managers
import pickle

class MyManager(managers.SyncManager):
pass

def client():
mgr = MyManager(address=(localhost,2288),authkey=12345)
mgr.connect()
l = mgr.list()
multiprocessing.current_process().authkey = 12345# --- HERE
l = pickle.loads(pickle.dumps(l))

def server():
mgr = MyManager(address=(,2288),authkey=12345)
mgr.get_server().serve_forever()

server = multiprocessing.Process(target=server)
client = multiprocessing.Process(target=client)
server.start()
client.start()
client.join()
server.terminate()
server.join()

In practice all processes using the manager should have 
current_process().authkey set to the same value.

I don't claim that multiprocessing supports distributed computing very well, 
but as far as I can see, things are working as intended.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-28 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
assignee:  - sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Paul Tunison

Paul Tunison added the comment:

I can confirm that this is still an issue with python 2.7.5. My method of 
resolving this locally is similar to xhantu's. I created a sub-class of 
BaseProxy, overriding the __reduce__ method and injecting the authkey into the 
appropriate spot in the super method's returned content.

--
nosy: +Paul.Tunison

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Paul Tunison

Paul Tunison added the comment:

I can confirm that this is still an issue with python 2.7.5. My method of 
resolving this locally is similar to xhantu's. I created a sub-class of 
BaseProxy, overriding the __reduce__ method and injecting the authkey into the 
appropriate spot in the super method's returned content.

--
nosy: +Paul.Tunison

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Paul Tunison

Paul Tunison added the comment:

I can confirm that this is still an issue with python 2.7.5. My method of 
resolving this locally is similar to xhantu's. I created a sub-class of 
BaseProxy, overriding the __reduce__ method and injecting the authkey into the 
appropriate spot in the super method's returned content.

--
nosy: +Paul.Tunison

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Dhanannjay Deo

Dhanannjay Deo added the comment:

Confirmed for python 2.7.3 on ubuntu 12.04 lts. Why this issue is still open 
after 4 years ?

--
nosy: +Dhanannjay.Deo
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Ned Deily

Ned Deily added the comment:

[Note, due to a bug tracker error now fixed, s couple of comments made to this 
issue earlier today were dropped.  I'm manually adding them here on behalf of 
the original submitters.]

At Wed Feb 26 17:05:01 CET 2014, Paul Tunison added the comment:

I can confirm that this is still an issue with python 2.7.5. My method of 
resolving this locally is similar to xhantu's. I created a sub-class of 
BaseProxy, overriding the __reduce__ method and injecting the authkey into the 
appropriate spot in the super method's returned content.

--
nosy: +Paul.Tunison, ned.deily, sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2014-02-26 Thread Ned Deily

Ned Deily added the comment:

At Wed Feb 26 17:09:49 CET 2014, Dhanannjay Deo added the comment:

Confirmed for python 2.7.3 on ubuntu 12.04 lts. Why this issue is still open 
after 4 years ?

--
nosy: +Dhanannjay.Deo
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2011-11-15 Thread xhantu

xhantu pwo...@rz-online.de added the comment:

Confirmed for Python 2.7.1 on Ubuntu.

Problematic are the __reduce__ methods of 
multiprocessing.process.AuthenticationString and 
multiprocessing.managers.BaseProxy. Pickling of an authkey in BaseProxy is only 
done and allowed when Popen.thread_is_spawning() is True. The comments state 
this is done because of security reasons.

If you pass proxies with multiprocessing after process initialization then no 
authkey is available after unpickle, a random authkey will be used with results 
in an digest error. Because of this fallback in case no authkey is available, 
using None as authkey didn't work in my case.

This bug looks like a design flaw of multiprocessing. If security was really a 
concern, encryption should be used along with authentication for communication. 
And passing None as authkey should disable authentication as stated in the 
documentation and should not use a random authkey.

Disabling the Popen.thread_is_spawning() checks allows passing of proxies. I 
have done this during runtime by replacing the __reduce__ methods of the 
affected classes to avoid patching the installed python.

--
nosy: +xhantu

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2011-11-15 Thread xhantu

xhantu pwo...@rz-online.de added the comment:

forgot to set version in classification

--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2009-12-24 Thread Nir Aides

Changes by Nir Aides n...@winpdb.org:


--
nosy: +nirai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2009-12-14 Thread Pete Hunt

Pete Hunt floydoph...@gmail.com added the comment:

UPDATE: this example WORKS if you remove authkey - so it seems to be a 
problem with authentication.

--
type:  - crash

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2009-12-14 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +jnoller

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2009-12-14 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
priority:  - normal
type: crash - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2009-12-13 Thread Pete Hunt

New submission from Pete Hunt floydoph...@gmail.com:

When pickling a proxy object (such as a list) created on a client, an 
exception is thrown. Example attached.

Python 2.6.4 Mac OS X 10.6

p

--
components: Library (Lib)
files: multiprocessing_bug.py
messages: 96371
nosy: peterhunt
severity: normal
status: open
title: multiprocessing AuthenticationError digest sent was rejected when 
pickling proxy
versions: Python 2.6
Added file: http://bugs.python.org/file15551/multiprocessing_bug.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7503
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com