rigetti / rpcq

The RPC framework and message specification for @rigetti Quantum Cloud Services.
Apache License 2.0
76 stars 29 forks source link

ZMQ Curve Auth for lisp #121

Closed appleby closed 4 years ago

appleby commented 4 years ago

Add support for ZeroMQ Curve Auth to lisp client and server

This commit adds two new structures -- CLIENT-AUTH-CONFIG and SERVER-AUTH-CONFIG -- that store the client/server authentication keys required for configuring ZeroMQ curve auth on a socket.

In addition, both the RPCQ:WITH-RPC-CLIENT macro and RPCQ:START-SERVER function get an additional :AUTH-CONFIG keyword argument allowing the caller to pass in a {CLIENT,SERVER}-AUTH-CONFIG, respectively.

When the :AUTH-CONFIG option is provided, the client / server will set the appropriate ZMQ socket options to enable curve encryption (and in the case of the client socket, server authentication) for the socket.

This commit does not implement server-side authentication of clients. Unlike the python pyzmq package, the lisp library we use, PZMQ, does not come with any built-in authenticator, so if we ever need that functionality, we'll either have to add it to PZMQ or else implement one ourselves on top of the ZeroMQ Authentication Protocol (ZAP).

Closes #111

appleby commented 4 years ago

gitlab results here:

https://gitlab.com/rigetti/forest/rpcq/pipelines/121380640

appleby commented 4 years ago

Z latest test results:

https://gitlab.com/rigetti/forest/rpcq/pipelines/121394904

stylewarning commented 4 years ago

fix merge confs and should be g2g

appleby commented 4 years ago

fix merge confs and should be g2g

rebased.

appleby commented 4 years ago

latest: https://gitlab.com/rigetti/forest/rpcq/pipelines/122041096