erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
900 stars 194 forks source link

Support curve authentication #173

Open kpcyrd opened 7 years ago

kpcyrd commented 7 years ago

I was able to setup an encrypted connection with #167, but I couldn't find anything on how to do actual authentication. Currently, only the server is authenticated but any client can connect and send messages.

It would be nice if it'd be possible to add a list of public keys which I trust to send messages.

cite-reader commented 5 years ago

libzmq implements ZAP for authenticating peers. I banged out a basic example of implementing a CURVE authenticator in rust-zmq.

jean-airoldie commented 5 years ago

I've got a decent implementation from my lib here that could be ported if you are interested. The general principle is to start a ZAP handler thread with every context and send commands to it via inproc.