$Id$ -*- Text -*- Python RPKI production tools. Requires Python 2.5. External Python packages required: - lxml, which in turn requires the libxml2 C libraries. http://codespeak.net/lxml/ FreeBSD: /usr/ports/devel/py-lxml - MySQLdb, which in turn requires MySQL client and server. I'm testing with MySQL 5.1. http://sourceforge.net/projects/mysql-python/ FreeBSD: /usr/ports/databases/py-MySQLdb - TLSLite, which pulls in other crypto packages. http://trevp.net/tlslite/ FreeBSD: /usr/ports/security/py-tlslite - Cryptlib, at the moment just to support TLSlite but may end up using it for other things later. http://www.cs.auckland.ac.nz/~pgut001/cryptlib/ FreeBSD: /usr/ports/security/cryptlib ...but the FreeBSD port doesn't (yet?) install the Python bindings, sigh, so at the moment you have to do that by hand: # cd /usr/ports/security/cryptlib # make install # cd work/bindings # python setup.py install # cd ../.. # make clean - Eventually I expect that this will require an event-handling package like Twisted, but I'm not there yet. - The testpoke tool (up-down protocol command line test client) and testbed tools also uses PyYAML. http://pyyaml.org/ FreeBSD: /usr/ports/devel/py-yaml We also use a hacked copy of the Python OpenSSL Wrappers (POW) package, but our copy has enough modifications that it's expanded in the Subversion tree. Depending on how this all works out, I may end up splitting the POW.pkix module out of the POW package and using it with Cryptlib, as the POW.pkix package is 98% about doing ASN.1 in pure Python and only 2% about any kind of crypto. Current TO DO list: - Need scripted tests that shrink and grow and shrink and shrink and grow and shrink and grow and grow and .... Initial tests with APNIC required doing this by hand, and there's a body of code that only gets exercised when the IRDB changes, so need scripted tests. testbed.py is the framework for this, no doubt will add more features later. Most urgent issues on this front at the moment are a) Coming up with some useful test scenarios (YAML for testbed.py) that test interesting combinations of events, and b) Analysis tools so that we can check whether the right things happened during the test. A first cut at (b) would just be tools to make the test results readable by humans, but need to automate eventually. Running rcynic on the output would also be useful. - Work on a common protocol dump format with APNIC and other implementors. Randy points out that it would be good if we could all read each other's dumps. "Obvious" format would be an OpenSSL-style PEM of the CMS, with a "text" portion (the place where "openssl x509 -text" would put a text dump of a cert) showing the wrapped XML. - Rewrite hooks that call CRL generation and publication to do so immediately rather than waiting for cron. Batching to handle all of a bunch of events at once would be nice, but start by getting it right, then worry about making it faster. - resource_set_notafter attribute added to RelaxNG but not yet to rpki.up_down.class_elt. Need to convert to and from Python datetime but maybe lxml already has code to help us with that. - Things implemented but not yet tested: - Client side of expiration now assumes that parent will reissue when its IRDB changes. - Parent side of revocation (child_cert objects) and CRL generation implemented. - Parent side of expiration implemented. - Child batch processing loop: regeneration or removal of expired certs based on what's in the IRDB. - Batch regeneration of CRLs and manifests for all CAs. - Protection against up-down operations specifying a class_name that belongs to some other self context. - Rewrote code that handles revoke on shrink to revoke -all- old certs for that key, not just most recent. Not certain, but this may have been the cause of a cert dropping not showing up in the CRL during testing with APNIC in Vancouver. - Implement remaining left-right control booleans -- among other reasons, these are the IRBE triggers for things like key rollover, which we need to test some of the stuff that's already done. - Child side of revocation...Common Management Tasks page in the APNIC Wiki shows some states where revocation is triggered by the child after a delay. Other text in Common Management Tasks suggests that ca_detail also needs deferred transitions from pending to active, although Randy and I don't entirely believe that this is necessary or even advisable. Revocation delay is enough to require a deferred state transition timestamp to ca_detail object. Model for this is an enumerated state value (which we already had) and a timestamp (which may be NULL) for next scheduled transition. At the moment we think that the state progression is linear, ie, there's no need for a next_state field. state := pending | active | deprecated timestamp := NULL |