domreg/registrar a lightweight domain registration system tom jennings mru 22 March 2005 domreg is a very lightweight domain registration and management system, to handle new registrations, modify existing or delete existing domains. With a web interface for registrants, and web/email interface for registrars, it provides a simple but complete system for managing outstanding/in-process registrations. The goal is a minimal but fully-functional, extremely robust, and exhaustively error-checked system using all open source components. domreg requires an externally-provided RPSL-interfaced registry for each tld. domreg consists of three active components: domreg registrant (user) web interface code registrar registrar (manager) web interface code mailack RPSL/email interface browser interfaces registrant registrar | ^ | ^ | | | | | | | | v | v | registrant ----> cgi/domreg --+------> cgi/registrar ------> ^ | ^ REGISTRY | | | +--------+ +------------- | <------------------ PUBLIC --------->|<---- REGISTRAR ----> | A registrant uses cgi/domreg to fill forms with data sufficient for the task (eg. new domain). The domreg code ensures integrity. Once the all of the data has been gathered and checked, and the registrant clicks SUBMIT, the registration becomes visible to the registrant. At that point the registrant is given a persistent URL that provides registration status; registration data cannot be modified by the registrant. The registrar (person) uses cgi/registrar to manage domregs sucessfully submitted by the registrant. Domregs can be reviewed, edited, submitted onward to the registry, or bounced back to the registrant for corrections. Submissions to the registry are done via email. mailack processes incoming mail from the registry, looking for success/fail replies on outstanding domregs; the result of these replies is stored in the small database of outstanding registrations. (This is NOT a registry database.) TECHNICAL OVERVIEW domreg uses only common tools and components (Perl, Apache, CGI, sql, email). It performs very thorough data integrity checks on both contact and DNS data. All serverside CGI, not javascript etc, because: 2. no browser dependency (other than HTML...) 3. client-side checking does not remove need for server-side check 4. Single control over field-format error emssages COMPONENTS The system consists of the following functional components. A detailed list of components, and installation instructions, is FIXME elsewhere. cgi/domreg This is the main registrant interface. It uses Apache UNIQUE_ID to identify the user and index the local database of in-progress registrations. It presents the registrant with a sequence of CGI forms, soliciting the data required to complete a registration, performs integrity checks on form and nameserver data. Details of the precise checks informed is covered in detail FIXME. cgi/registrant This is the main registrar interface. It tracks the registrar web connection using UNIQUE_ID after a login/password pair. cgi/registrar's main page is a summary of domregs that reached the SUBMIT state. Selecting a domreg gives a page of tools to manage the registration; edit, delete, bounce-back, or submit to the registry. Responses from the registry are logged and visible. mailack This is a filter that receives incoming mail from RPSL-interfaced registries, passed to it via procmail or other mechanism, based upon a fabricated Subject: line. It parses selected message contents and puts the results into the domreg/registrant database. configuration There is a text config file that controls most everything, including a table of domains and associated registries. about the local database At the heart of domreg/registrar system is a small sql database, one record per outstanding registration. registrants build a registration, one field at a time, using the domreg CGI forms. A STATE field tracks progress of the record/registration throughout its life. Before registrant submission, records are indexed to the registrants web ID, only. After submission they become visible to the registrar. Before submission, records are deleted if they "age out" before the registrant submits them. The database is periodically purged of deleted records. domreg is implemented with: apache and CGI, perl5, as few Perl packages as possible, a filter inserted in the email stream (eg. via procmail) and optionally mySQL and https.