zeromq/pyzmq — pull request #451 by claws (2013-12-10 13:20:58+00:00)
Title: Add Authentication

I have a number of czmq applications as well as pyzmq applications that use CURVE security. The current security interface in pyzmq is very low level and write your own ZAP handler. I wanted the same simple high level authentication capabilities available to my Python applications.

This pull request adds a high level authentication module to pyzmq. The design is modelled on the zauth module in czmq. The test_auth.py module is a comprehensive test of the features available from the zmq.auth module.

A minor bug in the test_z85.py module was discovered while developing and testing this zmq.auth module.

Discussion points:
1. In the test_auth.py file I generate some temporary certificates for the test run. This tests the certificate generation and loading features of the zmq.auth module. It also creates an environment needed to realistically test the CURVE authentication mechanism. I'm concerned about the portability of this approach, perhaps the zmq.test directory will not be writeable everywhere?

2. While I mirror the structure of czmq's certificates (which means czmq and pyzmq apps are interoperable using the same certificate files) there might be a better design. Perhaps YAML or JSON? There was discussion on the zeromq-dev-list about this topic. However, I think that this implementation will suffice until a language independent design is specified.

3. I suspect I have missed off the correct banners etc. Is there a template that should be followed?