Skip to main content

No project description provided

Project description

Documentation Status Code Health


xmlprcssl is a Python library that provides secure communication (TLS) beetween clients and servers through xmlrpc protocol. It supports plugable handlers to provide user authentication. For now, it has as an example a ldap based authentication handler.

Server configuration

>>> from xmlrpcssl import SecureAuthenticatedXMLRPCServer
>>> from xmlrpcssl.handlers import LdapVerifyingRequestHandler
>>> from datetime import datetime
>>> keySsl='/tmp/server.key'
>>> crtSsl='/tmp/server.crt'
>>> tcpPort=433
>>> serverIp=''
>>> ldapHost = 'ldapHost' # User must have access granted to this host in ldap
>>> ldapServer = 'ldapServer' # ip or name of ldap server
>>> gidNumber = 111 # User must be in this group in order to be authenticated
>>> isMasterUser = False # True if the user has write permissions in the ldap server
>>> baseUsrLoginDn = 'o=Organization,c=US' # user base DN to perform login in
 # the ldap server
>>> baseSearchDn = 'o=Organization,c=US' # search base DN to perform a search in
 # the ldap server base
>>> RequestHandler = LdapVerifyingRequestHandler # a handler that inherits from
 # BaseRequestHandler and performs user authentication
>>> optArgs={'isMasterUser':isMasterUser,'baseUsrLoginDn':baseUsrLoginDn,
...  'ldapServer':ldapServer,'gidNumber':gidNumber,'baseSearchDn':baseSearchDn,
...  'host':ldapHost,'RequestHandler':RequestHandler}
>>> serverSSL=SecureAuthenticatedXMLRPCServer((serverIp,tcpPort),keySsl,crtSsl,**optArgs)
>>> def test():
...  # toy test function
...  return"%H:%M:%S")
>>> serverSSL.register_function(test)
>>> serverSSL.serve_forever()

Client configuration

>>> from xmlrpclib import ServerProxy
>>> userName = 'ldapUser'
>>> password = 'ldapUserPassword'
>>> tcpPort=433
>>> serverIp=''
>>> clientXml=ServerProxy('https://'+userName+':'+password+'@'+serverIp+':'+str(tcpPort))
>>> response = clientXml.test()
>>> print response


To install xmlrpcssl, simply run:

$ pip install xmlrpcssl

xmlrpcssl is compatible with Python 2.6+

Source Code

Feel free to fork, evaluate and contribute to this project.



GPLv3 licensed.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xmlrpcssl, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size xmlrpcssl-0.1.3-py2.7.egg (6.0 kB) File type Egg Python version 2.7 Upload date Hashes View hashes
Filename, size xmlrpcssl-0.1.3.tar.gz (27.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page