Search code examples
pythonsslrpcspyne

Spyne, TLS and server-to-client requests


Does Spyne support TLS security and server-to-client requests (communication symmetry) through the usage of the ZMQ underlaying transport?

Spyne's API reference (http://pythonhosted.org/spyne/reference/index.html) and, in case of the ZeroMQ server it says:

class spyne.server.zeromq.ZeroMQServer(app, app_url, wsdl_url=None)[source]
    transport = 'http://rfc.zeromq.org/'

... where it links to the RFC of the ZeroMQ organization. I do not know whether this involves that all transport protocols (including TLS) are supported by Spyne since ZeroMQ supports them.


Solution

  • Spyne maintainer here.

    1. Spyne does not support communication symmetry. You'd have to implement a new breed of transport (mixed one) that deals with the challenges of using a single connection for multiple messages both ways. But it's certainly doable, I can't think of anything in Spyne's design that would slow you down.

    2. That link to the ZeroMQ RFC is analoguous to the Http transport linking to http://schemas.xmlsoap.org/soap/http/ -- i.e. just an unambigous way to denote which ZeroMQ we're talking about.

      The ZeroMQ transport was an experiment to see how ZeroMQ fared in an RPC setting. I did not like what I saw, so I moved on.

      As you noted, the only supported scheme is REQ/REP and if REQ/REP sockets can be switched to TLS just by switching the URL, it'll work. Otherwise, well, you're on your own.

    Btw, the latest docs are at http://spyne.io/docs