zejames has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks,

I want to write a Perl application to manage several servers from a unique management console. Of course, communication between the management console and the servers must be encrypted.

What I want to do is to write a daemon, that is binded to an arbitrary port, and write a client that connects to.

My problem is about authentication : how can I be sure that only my management console can connect the daemon, and which Perl module should I use for that.

I have thought about using IO::Socket::SSL, but it seems to be done, like SSL anyway, to manage easily one server and several clients, and what I want is to have one client (my management console) and several managed servers. Of course, I could have one different certificate per manager server, but that is not the Clean Way To Do It (C)...

Eventually, I'd like an SSL-encrypted connexion with a SSH-like key (RSA) authentication...

Any idea or module or pointer ?


Many thanks

--
zejames

Replies are listed 'Best First'.
Re: Management console encrypted connexion
by rob_au (Abbot) on Sep 19, 2002 at 05:49 UTC
    It seems as if you will be reinventing a lot of wheels if you want to write the code to do all this yourself - If I were faced with such an application requirement, I would look at using an Apache server built with mod_perl and mod_ssl support as the base for this application. This would allow the Apache server to handle the more mundane aspects of the application server - For example, with this application base, port and address binding, access and user-permission limitations and low-level socket and request handling are all taken care of for you. Indeed, it is even possible to implement SSL certificate requirements of clients connecting to your resource so that you can control who connects to your resource.

    Such an approach would mean that you would could worry less about the low-level details of the management console and can address your attention to the functional and business level requirements of such an application.

     

Re: Management console encrypted connexion
by zentara (Cardinal) on Sep 18, 2002 at 15:46 UTC
    Use Net::EasyTCP. It has a "portpassword" you can set, so only clients knowing the password can connect. It also encrypts, although RSA seems to be too slow for me, but it does work. Look at an example here: EasyTCP You can carry on any kind of conversation with this module, not just file transfer. Look at the example in the pod.