NAME

SRS::EPP::Proxy - IETF EPP <=> SRS XML proxy software

SYNOPSIS

my $proxy = SRS::EPP::Proxy->new(

    # where to listen for inbound connections
    listen => [ "$addr:$port", "[$addr6]:$port" ],

    # SSL engine: certificate for presentation
    ssl_key_file => $ssl_key_filename,
    ssl_cert_file => $ssl_key_filename,

    # path for verifying client certificates
    ssl_cert_dir => $ssl_cert_path,
    # and of course, revocations
    ssl_crl_file => $ssl_crl_file,

    # PGP home for dealing with the SRS
    pgp_dir => $path,

    );

# initialises everything - listens on sockets, checks SSL
# keys and PGP home dir valid
$proxy->init();

# main entry mechanism
$proxy->accept_loop();

# alternate piecemeal interfaces, mostly for testing
$proxy->init_listener;
$proxy->init_ssl;
$proxy->init_pgp;
my $session = $proxy->accept_one;  # doesn't fork

DESCRIPTION

SRS::EPP::Proxy implements an XML to XML gateway between two contemporary protocols for domain name management; EPP as defined by RFC 3730 and later, and the SRS protocol used by the .nz registry.

This module implements the SSL listener; it accepts connections, forks a new child for each one, collects client certificate information about the SSL connection as recommended by RFC 3734, and then starts an Event loop (using Event) and passes control to the SRS::EPP::Session module.

Other modules of interest; ie the key modules in this stack are:

Moose

Almost every module on this list is written using Moose.

SRS::EPP::Session

Implements the session logic which manages connections, and "oversees" the general flow of converting incoming messages to messages which are sent to the back-end. Has slave classes for managing the various queues which can build up.

Net::SSLeay::OO

This module provides the interface to the OpenSSL library that this stack uses, and in particular is used by SRS::EPP::Session to gather information about the client certificate.

XML::Relax::Generate

Relax NG to Moose class component. The classes this module generates are used as basis for below classes.

XML::Relax::Marshall

XML to and from Moose data structure component. This module can create data structures which match the class structure made by XML::Relax::Generate

SRS::EPP::Message::*

(based on) XML::Relax::Generate conversions of the various XML Schema files in RFCs 3730 - 3733 (actually their later updates, RFC 4930 and above) to Moose classes. These are marshalled to and from XML using XML::Relax::Marshall, above.

SRS::Message::*

These classes are similar conversions, but for the SRS protocol messages. These are based on a conversion of the Relax schema which is used to generate the RFC (not yet assigned an IETF number).

Crypt::OpenPGP

An oldie but a goodie, this module is a nice pure perl implementation of PGP, which is used to sign requests and verify responses to and from the SRS back-end system.