1

ZeroMQ seems to provide some authentication mechanisms. That's a great thing but the connection seems to be performed in the background and authentication might fail if something hasn't been configured correctly. Therefore my question is: How can a client detect this failure? I was not able to find any information about this in the documentation. Maybe I've overlooked something?

--

Sorry, I forgot to add:
In this particular case all components using ZeroMQ are implemented in Python. So I'd be interested in explanations addressing the ZeroMQ Python API. (Though conceptually it seems to be the same it is a bit different from the C API.)

user3666197
  • 1
  • 6
  • 50
  • 92
Regis May
  • 3,070
  • 2
  • 30
  • 51

1 Answers1

1

Q : " How can a client detect this failure? "

Fact #0 :
The Connection Management meta-plane used to be since ever, due to architectural & performance reasons, not directly accessible from the application-level code.

Fact #1 :
Users may wish not to have the Fact #0 in place :o)

Solution?

Try the limits of the as-is state of the zmq_socket_monitor(), still evolving as the whole our Universe is, and try to live with capabilities available for connection-oriented transport-classes via ZMQ_EVENT_HANDSHAKE_FAILED and possibly others.

Still that's not matching your needs?

Perhaps try to separate the concerns - let AUTH/CRYPT meta-plane part being operated independently ( ssh + port-forwarding, having their resources & methods to setup, manage, detect state-changes ) and let ZeroMQ use that meta-plane infrastructure in a zero-auth/zero-crypt mode, as all that was sufficiently outsourced to the prior meta-plane.

That's cool, isn't it?


Neither did I find any code example that would solve my problem, nor did you provide me with such a code example, nor has the python API a zmq_socket_monitor() function. And I'm pretty much tired from scanning through ZeroMQ test cases in order to figure out how things somehow maybe under certain conditions could possibly work. And that exactly is the reason why I ask: Mentioning that there could be some "meta-plan part independently operated infrastructure" is nice but not really helpful. A recipe that solves my problem would be. So: No, that isn't cool :-) – Regis May 46 mins ago

1)
've you read (not heaps of SLOCs, there was no such advice [was it?] but rather) the published API documentation for zmq_socket_monitor()?

2)
Have you provided site mandatory MCVE-formulated problem, having a reproducible fashion?

3)
Have you defined a { PASS | FAIL }-clause for reproducible assessment of the said MCVE from 2)?

Neither 1), nor 2), nor 3) - so I did my best in directing you to the pair of directions, that are solving your generic problem. ZeroMQ is cool, using smart tools for outsourcing AUTH/CRYPT parts is cool.

Not a Gimme codez site here :o)

user3666197
  • 1
  • 6
  • 50
  • 92
  • Neither did I find any code example that would solve my problem, nor did you provide me with such a code example, nor has the python API a `zmq_socket_monitor()` function. And I'm pretty much tired from scanning through ZeroMQ test cases in order to figure out how things somehow maybe under certain conditions could possibly work. And that exactly is the reason why I ask: Mentioning that there could be some "meta-plan part independently operated infrastructure" is nice but not really helpful. A recipe that solves my problem would be. So: No, that isn't cool :-) – Regis May Nov 26 '20 at 08:46
  • **1)** 've you **read** *(not heaps of SLOCs, there was no such advice [was it?] but rather)* the **published API** documentation for zmq_socket_monitor()? **2)** Have you **provided** *site mandatory* MCVE-formulated problem, having a reproducible fashion? **3)** Have you defined a { PASS | FAIL }-clause for reproducible assessment of the said MCVE from 2)? Neither 1), nor 2), nor 3) - so I did my best in directing you to the **pair** of directions, that are solving your generic problem. ZeroMQ is cool, using smart tools for outsourcing AUTH/CRYPT parts is cool.Not a Gimme codez site here :o) – user3666197 Nov 26 '20 at 09:27