Hi all,
On the topic of encryption, has anyone every tried adding an encryption
layer (if that’s the right term) into XML::RPC? I’m thinking of a
simple public/private key mechanism using openssl, where the server
stores a list of public keys - one per authorized IP address. Clients
would then pass their key as the first argument to any method call so
that the server could authenticate them. Messages passed back and forth
would be encrypted.
Is this really secure? The clients’ public keys are public, so how do
you authenticate them?
The server should first create a random key and send this to the client,
encrypted with it’s (the client’s) public key. So, only the client can
decrypt it (with it’s private key) and extract the random key, which
from now on encrypts the following traffic, using a symetrical
algorithm.
Has anyone done this?
Something very similar: A (simplistic) SOAP authentification service
using tickets.
It behaves as follows:
Client requests a ticket that the server generates randomly.
The client then encrypts this ticket with his password and sends it
back to the server.
Now the server decrypts the ticket and compares it with the original
one, if both are equal, the client is authentificated.
If so, how did it affect performance? (I haven’t actually tried it
yet).
Not tested, as even the encryption algorithm (RC4) is implemented in
Ruby so that the benchmarks would not be very expressive.
Is this something that could be optionally integrated into the main
XML::RPC libs, or is it best left at the application level?
XMLRPC::Client supports SSL, but only on a low-level.
I don’t think that integrating it into XMLRPC would be a good idea.
But it should be no big thing to add to an existing application. The
service methods, for example, could be wrapped using AspectR where the
first argument is taken and used for authentification. Similarily on the
client side, where you could create a Client::Proxy instance, passing it
the public-key as argument, which will then be prepended to every method
call performed on that proxy object.
Regards,
Michael
···
On Tue, 2002-11-05 at 21:57, Daniel Berger wrote: