473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

secure xmlrpc server?


Hello,

I'm trying to create a simple XMLRPC server and a client. It is a small
application, but the connection needs to be secure. I would like the
client to be as thin as possible. Ideally, the client should only
require the basic python library, nothing else. I found many examples on
the net. But I could not find secure ones (except twisted/xmlrpc, but I
would like to use the basic python lib on the client side, if possible).
I know that python supports HTTPS. In theory, this could be used to
bulild a secure xmlrpc server. I think that the client would work with
this code:

# Connect to server
server = ServerProxy("https://myserver.com:8000")

But I do not know how to create an XML RPC server in Python that uses
HTTPS for XML transports. (The server may use other libraries, just the
client needs to be thin.)
Can you help me please?

Thanks,

Laszlo

Jun 7 '06 #1
7 2628
Laszlo Nagy wrote:
<cut ssl for xmlrpc>
Have a look at:
http://trevp.net/tlslite/

--
mph
Jun 7 '06 #2
Martin P. Hellwig wrote:
Laszlo Nagy wrote:
<cut ssl for xmlrpc>
Have a look at:
http://trevp.net/tlslite/

C:\temp\ccc>python setup.py install
running install
running build
running build_py
running build_ext
error: The .NET Framework SDK needs to be installed before building
extensions f
or Python.

C:\temp\ccc>
Does it mean that .NET framework is required for tlslite on Windows?

Also can you please provide an example for tlslite/xmlrpc integration?
The documentation of tlslite is very detailed, but it has many options
and I could not find an example.

Thanks,

Laszlo

Jun 7 '06 #3
Laszlo Nagy wrote:
Martin P. Hellwig wrote:
Laszlo Nagy wrote:
<cut ssl for xmlrpc>
Have a look at:
http://trevp.net/tlslite/
C:\temp\ccc>python setup.py install
running install
running build
running build_py
running build_ext
error: The .NET Framework SDK needs to be installed before building
extensions f
or Python.

C:\temp\ccc>


In the installers directory is exe for windows installation.

Does it mean that .NET framework is required for tlslite on Windows?

Also can you please provide an example for tlslite/xmlrpc integration?
The documentation of tlslite is very detailed, but it has many options
and I could not find an example.
SimpleXMLRPCServer uses SimpleHTTPServer for its transfer stuff, so you
might want to look more in that direction.

Thanks,

Laszlo

--
mph
Jun 7 '06 #4
Martin P. Hellwig írta:
Laszlo Nagy wrote:
Martin P. Hellwig wrote:
Laszlo Nagy wrote:
<cut ssl for xmlrpc>
Have a look at:
http://trevp.net/tlslite/

C:\temp\ccc>python setup.py install
running install
running build
running build_py
running build_ext
error: The .NET Framework SDK needs to be installed before building
extensions f
or Python.

C:\temp\ccc>


In the installers directory is exe for windows installation.

http://trevp.net/tlslite/ - no exe installers.
http://sourceforge.net/projects/tlslite/ - no file packages to download

:-( SimpleXMLRPCServer uses SimpleHTTPServer for its transfer stuff, so you
might want to look more in that direction.

Yes, In fact I read the whole source code of SimpleXMLRPCServer and
other examples like

http://aspn.activestate.com/ASPN/Coo...n/Recipe/81549
http://aspn.activestate.com/ASPN/Coo.../Recipe/165375

but I cannot combine the two. I see that the request handler is a
customised HTTP request handler:

class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTP RequestHandler):

but I have no idea how to use it with https. Do you know a small example
(like the ones above)? That would help a lot.

Laszlo

Jun 7 '06 #5
Laszlo Nagy wrote:
<cut>
http://trevp.net/tlslite/ - no exe installers.
http://sourceforge.net/projects/tlslite/ - no file packages to download

:-(


Download the zip and unpack it:
http://trevp.net/tlslite/tlslite-0.3.8.zip
Then there is an installers directory
SimpleXMLRPCServer uses SimpleHTTPServer for its transfer stuff, so
you might want to look more in that direction.

Yes, In fact I read the whole source code of SimpleXMLRPCServer and
other examples like

http://aspn.activestate.com/ASPN/Coo...n/Recipe/81549
http://aspn.activestate.com/ASPN/Coo.../Recipe/165375

but I cannot combine the two. I see that the request handler is a
customised HTTP request handler:

class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTP RequestHandler):

but I have no idea how to use it with https. Do you know a small example
(like the ones above)? That would help a lot.

Laszlo


Something like:

import SocketServer
import SimpleXMLRPCServer
import tlslite.api

# Overriding with ThreadingMixIn and TLSSocketServerMixIN
# to create a secure async server.
class txrServer(SocketServer.ThreadingMixIn,
tlslite.api.TLSSocketServerMixIn,
SimpleXMLRPCServer.SimpleXMLRPCServer):
pass
But the above is untested (been a while ago, since I experimented with
it, for my case it was more functional to use VPN's instead of SSL/TLS).

For the rest you can follow the same principals as for the SimpleHTTPServer:

http://trevp.net/cryptoID/docs/publi...xIn-class.html

--
mph
Jun 7 '06 #6
Laszlo Nagy wrote:
But I do not know how to create an XML RPC server in Python that uses
HTTPS for XML transports.


This recent recipe seems to do exactly what you want:
http://aspn.activestate.com/ASPN/Coo.../Recipe/496786

Kent
Jun 9 '06 #7
Kent Johnson wrote:
Laszlo Nagy wrote:
But I do not know how to create an XML RPC server in Python that uses
HTTPS for XML transports.


This recent recipe seems to do exactly what you want:
http://aspn.activestate.com/ASPN/Coo.../Recipe/496786


It was gently pointed out to me that the OP is the author of the
recipe...well I guess he figured it out!

That will teach me to get two days behind on reading c.l.py...
Jun 9 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: glin | last post by:
Hi I am trying to integrate the xmlrpc server into a class, does anyone know how to get it working? test.html: <html> <head> <title>XMLRPC Test</title> <script src="jsolait/init.js"></script>...
0
by: Juan Carlos CORUÑA | last post by:
Hello all, I'm trying to create a COM Server with an embedded xmlrpc server. Here is way it must work: - The client application (programmed with a COM capable language) instantiates my COM...
1
by: Joxean Koret | last post by:
Hi to all! I'm having troubles to make my XMLRPC application working with non ASCII characters. Example: 1.- In one terminal run the following script: -----------XMLRPC...
1
by: emielvl | last post by:
Hello, I'm developing a client/server architecture based on the XML-RPC implementation in php4. All works pretty well, except that in the response from the server there is no "Content-Length" in...
3
by: David Hirschfield | last post by:
An xmlrpc client/server app I'm writing used to be super-simple, but now threading has gotten into the mix. On the server side, threads are used to process requests from a queue as they come in....
8
by: Daniel Crespo | last post by:
Hello everybody, I'm trying to implement a secure xmlrpc server with basis on http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496786 recipe. The thing that I'm concerned about is how can...
1
by: fortepianissimo | last post by:
I have a simple xmlrpc server/client written in Python, and the client throws a list of lists to the server and gets back a list of lists. This runs without a problem. I then wrote a simple Java...
6
by: half.italian | last post by:
Hi, I'm trying to serve up a simple XMLRPC server as a windows service. I got it to run properly, I'm just not sure how to stop it properly. Most of the documentation/examples I found for this...
4
by: care02 | last post by:
I have implemented a simple Python XMLRPC server and need to call it from a C/C++ client. What is the simplest way to do this? I need to pass numerical arrays from C/C++ to Python. Yours, Carl
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.