[clug] authenticated RPC

Jeremy Kerr jk at ozlabs.org
Wed Sep 10 20:53:24 MDT 2014


Hi Jeff,

> Are there any RPC protocols out there that have
> authentication/aothorisation built in? It seem to have been over looked
> in every one I've looked at. I'm using python to write some middle ware
> to sit between a django front end on one server and a privileged service
> on another, exposing a limited set of functionality.

Sounds like what we've done in patchwork (a django application). There's
an XMLRPC interface which can be used to query the patch database.
Updates are allowed, from authorised users, by using HTTP Basic auth.

Server side XMLRPC views:

 http://git.ozlabs.org/?p=patchwork;a=blob;f=apps/patchwork/views/xmlrpc.py;h=ca84c94cdc7c3d1f21c4577a731db9a4a4292083;hb=HEAD

- the dispatcher does authentication, if the view requires it

Client side:

 http://git.ozlabs.org/?p=patchwork;a=blob;f=apps/patchwork/bin/pwclient;h=64c6817e570004b3693329790f173b4ff15a1b9e;hb=HEAD#l83

- which provides a new XMLRPC transport that supports Basic auth.

There's probably a much neater way of doing this, but it works.

Hope this helps,


Jeremy



More information about the linux mailing list