Skip to content

feat: authenticate the ZMQ bus with CURVE - #429

Open
DaniilSmirnov wants to merge 1 commit into
VKCOM:developfrom
DaniilSmirnov:fix/zmq-curve-auth
Open

DaniilSmirnov wants to merge 1 commit into
VKCOM:developfrom
DaniilSmirnov:fix/zmq-curve-auth

Conversation

@DaniilSmirnov

Copy link
Copy Markdown

Anyone who could reach the proxy ROUTER (7110, published by docker-compose-prod.yaml) or the processor ROUTER (7160) could send any wire message, shell commands to devices included.

With ZMQ_SECRET set, every ROUTER/DEALER created through lib/util/zmqsocket runs CURVE. Both keypairs are derived from the secret, so nothing else has to be distributed: a DEALER needs the server key to finish the handshake, and a ZAP handler on the ROUTER side accepts only the client key. Traffic is encrypted as well.

Without ZMQ_SECRET the bus works as before, and a ROUTER bound to a non-local address logs a warning.

Anyone who could reach the proxy ROUTER (7110, published by
docker-compose-prod.yaml) or the processor ROUTER (7160) could send any
wire message, shell commands to devices included.

With ZMQ_SECRET set, every ROUTER/DEALER created through lib/util/zmqsocket
runs CURVE. Both keypairs are derived from the secret, so nothing else has
to be distributed: a DEALER needs the server key to finish the handshake,
and a ZAP handler on the ROUTER side accepts only the client key. Traffic
is encrypted as well.

Without ZMQ_SECRET the bus works as before, and a ROUTER bound to a
non-local address logs a warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant