00001 # $Id: __init__.py 2348 2009-04-19 22:16:39Z sra $ 00002 00003 # Copyright (C) 2009 Internet Systems Consortium ("ISC") 00004 # 00005 # Permission to use, copy, modify, and distribute this software for any 00006 # purpose with or without fee is hereby granted, provided that the above 00007 # copyright notice and this permission notice appear in all copies. 00008 # 00009 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 00010 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00011 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 00012 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00013 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00014 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00015 # PERFORMANCE OF THIS SOFTWARE. 00016 00017 # Portions copyright (C) 2007--2008 American Registry for Internet Numbers ("ARIN") 00018 # 00019 # Permission to use, copy, modify, and distribute this software for any 00020 # purpose with or without fee is hereby granted, provided that the above 00021 # copyright notice and this permission notice appear in all copies. 00022 # 00023 # THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH 00024 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00025 # AND FITNESS. IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT, 00026 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00027 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00028 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00029 # PERFORMANCE OF THIS SOFTWARE. 00030 00031 00032 # This file exists to tell Python that this the content of this 00033 # directory constitute a Python package. Since we're not doing 00034 # anything exotic, this file doesn't need to contain any code, but 00035 # since its existance defines the package, it's as sensible a place as 00036 # any to put the Doxygen mainpage. 00037 00038 # The "usage" text for irbe_cli in the OPERATIONS section is generated 00039 # automatically by running the program with its --help command. 00040 # Should do the same with the other programs. Don't yet have a sane 00041 # way to automate options in config files, though. Would be nice. 00042 00043 ## @mainpage RPKI Engine Reference Manual 00044 # 00045 # This collection of Python modules implements a prototype of the 00046 # RPKI Engine. This is a work in progress. 00047 # 00048 # See http://viewvc.hactrn.net/subvert-rpki.hactrn.net/ for code, 00049 # design documents, a text mirror of portions of APNIC's Wiki, etc. 00050 # 00051 # The RPKI Engine is an implementation of the production-side tools 00052 # for generating certificates, CRLs, and ROAs. The 00053 # <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rcynic/">relying party tools</a> 00054 # are a separate (and much simpler) package. 00055 # 00056 # The Subversion repository for the entire project is available for 00057 # (read-only) anonymous access at http://subvert-rpki.hactrn.net/. 00058 # 00059 # The documentation you're reading is generated automatically by 00060 # Doxygen from comments and documentation in 00061 # <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rpkid/rpki/">the code</a>. 00062 # 00063 # Besides the automatically-generated code documentation, this manual 00064 # also includes documentation of the overall package: 00065 # 00066 # @li The @subpage Installation "installation instructions" 00067 # @li The @subpage Operation "operation instructions" 00068 # @li A description of the @subpage Left-right "left-right protocol" 00069 # @li A description of the @subpage Publication "publication protocol" 00070 # @li A description of the @subpage bpki-model "BPKI model" 00071 # used to secure the up-down, left-right, and %publication protocols 00072 # @li A description of the several @subpage sql-schemas "SQL database schemas" 00073 # @li Some suggestions for @subpage further-reading "further reading" 00074 # 00075 # This work was funded from 2006 through 2008 by <a 00076 # href="http://www.arin.net/">ARIN</a>, in collaboration with the 00077 # other Regional Internet Registries. Current work is funded by DHS. 00078 00079 ## @page further-reading Further Reading 00080 # 00081 # If you're interested in this package you might also be interested 00082 # in: 00083 # 00084 # @li <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rcynic/">The rcynic validation tool</a> 00085 # @li <a href="http://www.hactrn.net/opaque/rcynic.html">A live sample of rcynic's summary output</a> 00086 # @li <a href="http://mirin.apnic.net/resourcecerts/wiki/">APNIC's Wiki</a> 00087 # @li <a href="http://mirin.apnic.net/trac/">APNIC's project Trac instance</a> 00088 00089 ## @page Installation Installation Guide 00090 # 00091 # Preliminary installation instructions for rpkid et al. These are the 00092 # production-side RPKI tools, for Internet Registries (RIRs, LIRs, etc). 00093 # See the "rcynic" program for relying party tools. 00094 # 00095 # rpkid is a set of Python modules supporting generation and maintenance 00096 # of resource certificates. Most of the code is in the rpkid/rpki/ 00097 # directory. rpkid itself is a relatively small program that calls the 00098 # library modules. There are several other programs that make use of 00099 # the same libraries, as well as a collection of test programs. 00100 # 00101 # At present the package is intended to be run out of its build 00102 # directory. Setting up proper installation in a system area using the 00103 # Python distutils package would likely not be very hard but has not yet 00104 # been done. 00105 # 00106 # Note that initial development of this code has been on FreeBSD, so 00107 # installation will probably be easiest on FreeBSD. 00108 # 00109 # Before attempting to build the package, you need to install any 00110 # missing prerequisites. Note that the Python code requires Python 00111 # version 2.5. rpkid et al are mostly self-contained, but do require 00112 # a small number of external packages to run. 00113 # 00114 # <ul> 00115 # <li> 00116 # <a href="http://codespeak.net/lxml/">http://codespeak.net/lxml/</a>. 00117 # lxml in turn requires the Gnome LibXML2 C libraries. 00118 # <ul> 00119 # <li>FreeBSD: /usr/ports/devel/py-lxml</li> 00120 # <li>Fedora: python-lxml.i386</li> 00121 # </ul> 00122 # </li> 00123 # <li> 00124 # <a href="http://sourceforge.net/projects/mysql-python/">http://sourceforge.net/projects/mysql-python/</a>. 00125 # MySQLdb in turn requires MySQL client and server. rpkid et al have 00126 # been tested with MySQL 5.0 and 5.1. 00127 # <ul> 00128 # <li>FreeBSD: /usr/ports/databases/py-MySQLdb</li> 00129 # <li>Fedora: MySQL-python.i386</li> 00130 # </ul> 00131 # </li> 00132 # <li> 00133 # <a href="http://trevp.net/tlslite/">http://trevp.net/tlslite/</a>. 00134 # TLSLite pulls in other crypto packages. 00135 # <ul> 00136 # <li>FreeBSD: /usr/ports/security/py-tlslite</li> 00137 # </ul> 00138 # </li> 00139 # </ul> 00140 # 00141 # rpkid et al also make heavy use of a modified copy of the Python 00142 # OpenSSL Wrappers (POW) package, but this copy has enough modifications 00143 # and additions that it's included in the subversion tree. 00144 # 00145 # The next step is to build the OpenSSL and POW binaries. At present 00146 # the OpenSSL code is just a copy of the stock OpenSSL 0.9.8g release, 00147 # compiled with special options to enable RFC 3779 support that ISC 00148 # wrote under previous contract to ARIN. The POW (Python OpenSSL 00149 # Wrapper) library is an extended copy of the stock POW release. 00150 # 00151 # To build these, cd to the top-level directory in the distribution and 00152 # type "make". 00153 # 00154 # @verbatim 00155 # $ cd $top 00156 # $ make 00157 # @endverbatim 00158 # 00159 # This should automatically build everything, in the right order, 00160 # including staticly linking the POW extension module with the OpenSSL 00161 # library to provide RFC 3779 support. 00162 # 00163 # You will also need a MySQL installation. This code was developed 00164 # using MySQL 5.1 and has been tested with MySQL 5.0 and 5.1. 00165 # 00166 # The architecture is intended to support hardware signing modules 00167 # (HSMs), but the code to support them has not been written. 00168 # 00169 # At this point, you should have all the necessary software installed. 00170 # You will probably want to test it. All tests should be run from the 00171 # rpkid/ directory. The test suite requires a few more external 00172 # packages, only one of which is Python code. 00173 # 00174 # <ul> 00175 # <li> 00176 # <a href="http://pyyaml.org/">http://pyyaml.org/</a>. 00177 # testpoke.py (an up-down protocol command line test client) and 00178 # testbed.py (a test harness) use PyYAML. 00179 # <ul> 00180 # <li>FreeBSD: /usr/ports/devel/py-yaml</li> 00181 # </ul> 00182 # </li> 00183 # <li> 00184 # <a href="http://xmlsoft.org/XSLT/">http://xmlsoft.org/XSLT/</a>. 00185 # Some of the test code uses xsltproc, from the Gnome LibXSLT 00186 # package. 00187 # <ul> 00188 # <li>FreeBSD: /usr/ports/textproc/libxslt</li> 00189 # </ul> 00190 # </li> 00191 # <li> 00192 # <a href="http://w3m.sourceforge.net/">http://w3m.sourceforge.net/</a>. 00193 # testbed.py uses w3m to display the summary output from rcynic. 00194 # Nothing terrible will happen if w3m isn't available, testbed.py 00195 # will just complain about it being missing and won't display 00196 # rcynic's output. 00197 # <ul> 00198 # <li>FreeBSD: /usr/ports/www/w3m</li> 00199 # </ul> 00200 # </li> 00201 # </ul> 00202 # 00203 # Some of the tests require MySQL databases to store their data. To set 00204 # up all the databases that the tests will need, run the SQL commands in 00205 # rpkid/testbed.sql. The MySQL command line client is usually the 00206 # easiest way to do this, eg: 00207 # 00208 # @verbatim 00209 # $ cd $top/rpkid 00210 # $ mysql -u root -p <testbed.sql 00211 # @endverbatim 00212 # 00213 # To run the tests, run "make all-tests": 00214 # 00215 # @verbatim 00216 # $ cd $top/rpkid 00217 # $ make all-tests 00218 # @endverbatim 00219 # 00220 # If nothing explodes, your installation is probably ok. Any Python 00221 # backtraces in the output indicate a problem. 00222 # 00223 # There's a last set of tools that only developers should need, as 00224 # they're only used when modifying schemas or regenerating the 00225 # documentation. These tools are listed here for completeness. 00226 # 00227 # <ul> 00228 # <li> 00229 # <a href="http://www.doxygen.org/">http://www.doxygen.org/</a>. 00230 # Doxygen in turn pulls in several other tools, notably Graphviz, 00231 # pdfLaTeX, and Ghostscript. 00232 # <ul> 00233 # <li>FreeBSD: /usr/ports/devel/doxygen</li> 00234 # </ul> 00235 # </li> 00236 # <li> 00237 # <a href="http://lynx.isc.org/current/">http://lynx.isc.org/current/</a>. 00238 # The documentation build process uses xsltproc and Lynx to dump 00239 # flat text versions of a few critical documentation pages. 00240 # <ul> 00241 # <li>FreeBSD: /usr/ports/www/lynx</li> 00242 # </ul> 00243 # </li> 00244 # <li> 00245 # <a href="http://www.thaiopensource.com/relaxng/trang.html">http://www.thaiopensource.com/relaxng/trang.html</a>. 00246 # Trang is used to convert RelaxNG schemas from the human-readable 00247 # "compact" form to the XML form that LibXML2 understands. Trang in 00248 # turn requires Java. 00249 # <ul> 00250 # <li>FreeBSD: /usr/ports/textproc/trang</li> 00251 # </ul> 00252 # </li> 00253 # <li> 00254 # <a href="http://search.cpan.org/dist/SQL-Translator/">http://search.cpan.org/dist/SQL-Translator/</a>. 00255 # SQL-Translator, also known as "SQL Fairy", includes code to parse 00256 # an SQL schema and dump a description of it as Graphviz input. 00257 # SQL Fairy in turn requires Perl. 00258 # </li> 00259 # </ul> 00260 00261 ## @page Operation Operation Guide 00262 # 00263 # Preliminary operation instructions for rpkid et al. These are the 00264 # production-side RPKI tools, for Internet Registries (RIRs, LIRs, etc). 00265 # See rcynic/README for relying party tools. 00266 # 00267 # @warning 00268 # rpkid is still in development, and the code changes more often than 00269 # the hand-maintained portions of this documentation. The following 00270 # text was reasonably accurate at the time it was written but may be 00271 # obsolete by the time you read it. 00272 # 00273 # At present the package is intended to be run out of the @c rpkid/ 00274 # directory. 00275 # 00276 # In addition to the library routines in the @c rpkid/rpki/ directory, 00277 # the package includes the following programs: 00278 # 00279 # @li @c rpkid.py: 00280 # The main RPKI engine daemon. 00281 # 00282 # @li @c pubd.py: 00283 # The publication engine daemon. 00284 # 00285 # @li @c rootd.py: 00286 # A separate daemon for handling the root of an RPKI 00287 # certificate tree. This is essentially a stripped down 00288 # version of rpkid with no SQL database, no left-right 00289 # protocol implementation, and only the parent side of 00290 # the up-down protocol. It's separate because the root 00291 # is a special case in several ways and it was simpler 00292 # to keep the special cases out of the main daemon. 00293 # 00294 # @li @c irdbd.py: 00295 # A sample implementation of an IR database daemon. 00296 # rpkid calls into this to perform lookups via the 00297 # left-right protocol. 00298 # 00299 # @li @c irbe_cli.py: 00300 # A command-line client for the left-right control 00301 # protocol. 00302 # 00303 # @li @c cross_certify.py: 00304 # A BPKI cross-certification tool. 00305 # 00306 # @li @c irbe-setup.py: 00307 # An example of a script to set up the mappings between 00308 # the IRDB and rpkid's own database, using the 00309 # left-right control protocol. 00310 # 00311 # @li @c cronjob.py: 00312 # A trivial HTTP client used to drive rpkid cron events. 00313 # 00314 # @li @c testbed.py: 00315 # A test tool for running a collection of rpkid and irdb 00316 # instances under common control, driven by a unified 00317 # test script. 00318 # 00319 # @li @c testpoke.py: 00320 # A simple client for the up-down protocol, mostly 00321 # compatable with APNIC's rpki_poke.pl tool. 00322 # 00323 # Most of these programs take configuration files in a common format 00324 # similar to that used by the OpenSSL command line tool. The test 00325 # programs also take input in YAML format to drive the tests. Runs of 00326 # the testbed.py test tool will generate a fairly complete set 00327 # configuration files which may be useful as examples. 00328 # 00329 # Basic operation consists of creating the appropriate MySQL databases, 00330 # starting rpkid, pubd, rootd, and irdbd, using the left-right control 00331 # protocol to set up rpkid's internal state, and setting up a cron job 00332 # to invoke rpkid's cron action at regular intervals. All other 00333 # operations should occur either as a result of cron events or as a 00334 # result of incoming left-right and up-down protocol requests. 00335 # 00336 # Note that the full event-driven model for rpkid hasn't yet been 00337 # implemented. The design is intended to allow an arbitrary number of 00338 # hosted RPKI engines to run in a single rpkid instance, but without the 00339 # event-driven tasking model one must set up a separate rpkid instance 00340 # for each hosted RPKI engine. 00341 # 00342 # At present the daemon programs all run in foreground, that is, if one 00343 # wants them to run in background one must do so manually, eg, using 00344 # Bourne shell syntax: 00345 # 00346 # @verbatim 00347 # $ python whatever.py & 00348 # $ echo >whatever.pid "$!" 00349 # @endverbatim 00350 # 00351 # All of the daemons use syslog. At present they all set LOG_PERROR, so 00352 # all logging also goes to stderr. 00353 # 00354 # 00355 # @section rpkid rpkid.py 00356 # 00357 # rpkid is the main RPKI engine daemon. Configuration of rpkid is a 00358 # two step process: a %config file to bootstrap rpkid to the point 00359 # where it can speak using the @link Left-right left-right protocol, 00360 # @endlink followed by dynamic configuration via the left-right 00361 # protocol. In production use the latter stage would be handled by 00362 # the IRBE stub; for test and develoment purposes it's handled by the 00363 # irbe_cli.py command line interface or by the testbed.py test 00364 # framework. 00365 # 00366 # rpkid stores dynamic data in an SQL database, which must have been 00367 # created for it, as explained in the @link Installation installation 00368 # guide. @endlink 00369 # 00370 # The default %config file is rpkid.conf, start rpkid with "-c filename" 00371 # to choose a different %config file. All options are in the section 00372 # "[rpkid]". Certificates, keys, and trust anchors may be in either DER 00373 # or PEM format. 00374 # 00375 # %Config file options: 00376 # 00377 # @li @c startup-message: 00378 # String to %log on startup, useful when 00379 # debugging a collection of rpkid instances at 00380 # once. 00381 # 00382 # @li @c sql-username: 00383 # Username to hand to MySQL when connecting to 00384 # rpkid's database. 00385 # 00386 # @li @c sql-database: 00387 # MySQL's database name for rpkid's database. 00388 # 00389 # @li @c sql-password: 00390 # Password to hand to MySQL when connecting to 00391 # rpkid's database. 00392 # 00393 # @li @c bpki-ta: 00394 # Name of file containing BPKI trust anchor. 00395 # All BPKI certificate verification within rpkid 00396 # traces back to this trust anchor. 00397 # 00398 # @li @c rpkid-cert: 00399 # Name of file containing rpkid's own BPKI EE 00400 # certificate. 00401 # 00402 # @li @c rpkid-key: 00403 # Name of file containing RSA key corresponding 00404 # to rpkid-cert. 00405 # 00406 # @li @c irbe-cert: 00407 # Name of file containing BPKI certificate used 00408 # by IRBE when talking to rpkid. 00409 # 00410 # @li @c irdb-cert: 00411 # Name of file containing BPKI certificate used 00412 # by irdbd. 00413 # 00414 # @li @c irdb-url: 00415 # Service URL for irdbd. Must be a %https:// URL. 00416 # 00417 # @li @c server-host: 00418 # Hostname or IP address on which to listen for 00419 # HTTPS connections. Current default is 00420 # INADDR_ANY (IPv4 0.0.0.0); this will need to 00421 # be hacked to support IPv6 for production. 00422 # 00423 # @li @c server-port: 00424 # TCP port on which to listen for HTTPS 00425 # connections. 00426 # 00427 # 00428 # @section pubd pubd.py 00429 # 00430 # pubd is the publication daemon. It implements the server side of 00431 # the publication protocol, and is used by rpkid to publish the 00432 # certificates and other objects that rpkid generates. 00433 # 00434 # pubd is separate from rpkid for two reasons: 00435 # 00436 # @li The hosting model allows entities which choose to run their own 00437 # copies of rpkid to publish their output under a common 00438 # publication point. In general, encouraging shared publication 00439 # services where practical is a good thing for relying parties, 00440 # as it will speed up rcynic synchronization time. 00441 # 00442 # @li The publication server has to run on (or at least close to) the 00443 # publication point itself, which in turn must be on a publically 00444 # reachable server to be useful. rpkid, on the other hand, need 00445 # only be reachable by the IRBE and its children in the RPKI tree. 00446 # rpkid is a much more complex piece of software than pubd, so in 00447 # some situations it might make sense to wrap tighter firewall 00448 # constraints around rpkid than would be practical if rpkid and 00449 # pubd were a single program. 00450 # 00451 # pubd stores dynamic data in an SQL database, which must have been 00452 # created for it, as explained in the installation guide. pubd also 00453 # stores the published objects themselves as disk files in a 00454 # configurable location which should correspond to an appropriate 00455 # module definition in rsync.conf. 00456 # 00457 # The default %config file is pubd.conf, start pubd with "-c 00458 # filename" to choose a different %config file. ALl options are in 00459 # the section "[pubd]". Certifiates, keys, and trust anchors may be 00460 # either DER or PEM format. 00461 # 00462 # %Config file options: 00463 # 00464 # @li @c sql-username: 00465 # Username to hand to MySQL when connecting to 00466 # pubd's database. 00467 # 00468 # @li @c sql-database: 00469 # MySQL's database name for pubd's database. 00470 # 00471 # @li @c sql-password: 00472 # Password to hand to MySQL when connecting to 00473 # pubd's database. 00474 # 00475 # @li @c bpki-ta: 00476 # Name of file containing master BPKI trust 00477 # anchor for pubd. All BPKI validation in pubd 00478 # traces back to this trust anchor. 00479 # 00480 # @li @c irbe-cert: 00481 # Name of file containing BPKI certificate used 00482 # by IRBE when talking to pubd. 00483 # 00484 # @li @c pubd-cert: 00485 # Name of file containing BPKI certificate used 00486 # by pubd. 00487 # 00488 # @li @c pubd-key: 00489 # Name of file containing RSA key corresponding 00490 # to @c pubd-cert. 00491 # 00492 # @li @c server-host: 00493 # Hostname or IP address on which to listen for 00494 # HTTPS connections. Current default is 00495 # INADDR_ANY (IPv4 0.0.0.0); this will need to 00496 # be hacked to support IPv6 for production. 00497 # 00498 # @li @c server-port: 00499 # TCP port on which to listen for HTTPS 00500 # connections. 00501 # 00502 # @li @c publication-base: 00503 # Path to base of filesystem tree where pubd 00504 # should store publishable objects. Default is 00505 # "publication/". 00506 # 00507 # 00508 # @section rootd rootd.py 00509 # 00510 # rootd is a stripped down implmenetation of (only) the server side of 00511 # the up-down protocol. It's a separate program because the root 00512 # certificate of an RPKI certificate tree requires special handling and 00513 # may also require a special handling policy. rootd is a simple 00514 # implementation intended for test use, it's not suitable for use in a 00515 # production system. All configuration comes via the %config file. 00516 # 00517 # The default %config file is rootd.conf, start rootd with "-c filename" 00518 # to choose a different %config file. All options are in the section 00519 # "[rootd]". Certificates, keys, and trust anchors may be in either DER 00520 # or PEM format. 00521 # 00522 # %Config file options: 00523 # 00524 # @li @c bpki-ta: 00525 # Name of file containing BPKI trust anchor. All 00526 # BPKI certificate validation in rootd traces 00527 # back to this trust anchor. 00528 # 00529 # @li @c rootd-bpki-cert: 00530 # Name of file containing rootd's own BPKI 00531 # certificate. 00532 # 00533 # @li @c rootd-bpki-key: 00534 # Name of file containing RSA key corresponding to 00535 # rootd-bpki-cert. 00536 # 00537 # @li @c rootd-bpki-crl: 00538 # Name of file containing BPKI CRL that would 00539 # cover rootd-bpki-cert had it been revoked. 00540 # 00541 # @li @c child-bpki-cert: 00542 # Name of file containing BPKI certificate for 00543 # rootd's one and only child (RPKI engine to 00544 # which rootd issues an RPKI certificate). 00545 # 00546 # @li @c server-host: 00547 # Hostname or IP address on which to listen for 00548 # HTTPS connections. Default is localhost. 00549 # 00550 # @li @c server-port: 00551 # TCP port on which to listen for HTTPS 00552 # connections. 00553 # 00554 # @li @c rpki-root-key: 00555 # Name of file containing RSA key to use in 00556 # signing resource certificates. 00557 # 00558 # @li @c rpki-root-cert: 00559 # Name of file containing self-signed root 00560 # resource certificate corresponding to 00561 # rpki-root-key. 00562 # 00563 # @li @c rpki-root-dir: 00564 # Name of directory where rootd should write 00565 # RPKI subject certificate, manifest, and CRL. 00566 # 00567 # @li @c rpki-subject-cert: 00568 # Name of file that rootd should use to save the 00569 # one and only certificate it issues. 00570 # Default is "Subroot.cer". 00571 # 00572 # @li @c rpki-root-crl: 00573 # Name of file to which rootd should save its 00574 # RPKI CRL. Default is "Root.crl". 00575 # 00576 # @li @c rpki-root-manifest: 00577 # Name of file to which rootd should save its 00578 # RPKI manifest. Default is "Root.mnf". 00579 # 00580 # @li @c rpki-subject-pkcs10: 00581 # Name of file that rootd should use when saving 00582 # a copy of the received PKCS #10 request for a 00583 # resource certificate. This is only used for 00584 # debugging. Default is not to save the PKCS 00585 # #10 request. 00586 # 00587 # 00588 # @section irdbd irdbd.py 00589 # 00590 # irdbd is a sample implemntation of the server side of the IRDB 00591 # callback subset of the left-right protocol. In production use this 00592 # service is a function of the IRBE stub; irdbd may be suitable for 00593 # production use in simple cases, but an IR with a complex IRDB may need 00594 # to extend or rewrite irdbd. 00595 # 00596 # irdbd requires a pre-populated database to represent the IR's 00597 # customers. irdbd expects this database to use the SQL schema defined 00598 # in rpkid/irdbd.sql. Once this database has been populated, the 00599 # IRBE stub needs to create the appropriate objects in rpkid's database 00600 # via the control subset of the left-right protocol, and store the 00601 # linkage IDs (foreign keys into rpkid's database, basicly) in the 00602 # IRDB. The irbe-setup.py program shows an example of how to do this. 00603 # 00604 # irdbd's default %config file is irdbd.conf, start irdbd with "-c 00605 # filename" to choose a different %config file. All options are in the 00606 # section "[irdbd]". Certificates, keys, and trust anchors may be in 00607 # either DER or PEM format. 00608 # 00609 # %Config file options: 00610 # 00611 # @li @c startup-message: 00612 # String to %log on startup, useful when 00613 # debugging a collection of irdbd instances at 00614 # once. 00615 # 00616 # @li @c sql-username: 00617 # Username to hand to MySQL when connecting to 00618 # irdbd's database. 00619 # 00620 # @li @c sql-database: 00621 # MySQL's database name for irdbd's database. 00622 # 00623 # @li @c sql-password: 00624 # Password to hand to MySQL when connecting to 00625 # irdbd's database. 00626 # 00627 # @li @c bpki-ta: 00628 # Name of file containing BPKI trust anchor. All 00629 # BPKI certificate validation in irdbd traces 00630 # back to this trust anchor. 00631 # 00632 # @li @c irdbd-cert: 00633 # Name of file containing irdbd's own BPKI 00634 # certificate. 00635 # 00636 # @li @c irdbd-key: 00637 # Name of file containing RSA key corresponding 00638 # to irdbd-cert. 00639 # 00640 # @li @c rpkid-cert: 00641 # Name of file containing certificate used the 00642 # one and only by rpkid instance authorized to 00643 # contact this irdbd instance. 00644 # 00645 # @li @c https-url: 00646 # Service URL for irdbd. Must be a %https:// URL. 00647 # 00648 # 00649 # @section irdbd_cli irbe_cli.py 00650 # 00651 # irbe_cli is a simple command line client for the control subsets of 00652 # the @link Left-right left-right @endlink and @link Publication 00653 # publication @endlink protocols. In production use this 00654 # functionality would be part of the IRBE stub. 00655 # 00656 # Basic configuration of irbe_cli is handled via a %config file. The 00657 # specific action or actions to be performed are specified on the 00658 # command line, and map closely to the protocols themselves. 00659 # 00660 # At present the user is assumed to be able to read the (XML) 00661 # left-right and publication protocol messages, and with one 00662 # exception, irdbd-cli makes no attempt to interpret the responses 00663 # other than to check for signature and syntax errors. The one 00664 # exception is that, if the @c --pem_out option is specified on the 00665 # command line, any PKCS \#10 requests received from rpkid will be 00666 # written in PEM format to that file; this makes it easier to hand 00667 # these requests off to the business PKI (BPKI in order to issue signing 00668 # certs corresponding to newly generated business keys. 00669 # 00670 # @verbinclude irbe_cli.usage 00671 # 00672 # Global options (@c --config, @c --help, @c --pem_out) come first, 00673 # then zero or more commands (@c parent, @c repository, @c self, @c 00674 # child, @c route_origin, @c bsc, @c config, @c client), each followed 00675 # by its own set of options. The commands map to elements in the 00676 # protocols, and the command-specific options map to attributes or 00677 # subelements for those commands. 00678 # 00679 # @c --tag is an optional arbitrary tag (think IMAP) to simplify 00680 # matching up replies with batched queries. 00681 # 00682 # @c --*_id options refer to the primary keys of previously created 00683 # objects. 00684 # 00685 # The remaining options are specific to the particular commands, and 00686 # follow directly from the protocol specifications. 00687 # 00688 # A trailing "=" in the above option summary indicates that an option 00689 # takes a value, eg, "--action create" or "--action=create". Options 00690 # without a trailing "=" correspond to boolean control attributes. 00691 # 00692 # The default %config file for irbe_cli is irbe_cli.conf, start 00693 # irbe_cli with "-c filename" (or "--config filename") to choose a 00694 # different %config file. All options are in the section 00695 # "[irbe_cli]". Certificates, keys, and trust anchors may be in 00696 # either DER or PEM format. 00697 # 00698 # %Config file options: 00699 # 00700 # @li @c rpkid-bpki-ta: 00701 # Name of file containing BPKI trust anchor to 00702 # use when authenticating messages from rpkid. 00703 # 00704 # @li @c rpkid-irbe-cert: 00705 # Name of file containing BPKI certificate 00706 # irbe_cli should use when talking to rpkid. 00707 # 00708 # @li @c rpkid-irbe-key: 00709 # Name of file containing RSA key corresponding to 00710 # rpkid-irbe-cert. 00711 # 00712 # @li @c rpkid-cert: 00713 # Name of file containing rpkid's BPKI certificate. 00714 # 00715 # @li @c rpkid-url: 00716 # Service URL for rpkid. Must be a %https:// URL. 00717 # 00718 # @li @c pubd-bpki-ta: 00719 # Name of file containing BPKI trust anchor to 00720 # use when authenticating messages from pubd. 00721 # 00722 # @li @c pubd-irbe-cert: 00723 # Name of file containing BPKI certificate 00724 # irbe_cli should use when talking to pubd. 00725 # 00726 # @li @c pubd-irbe-key: 00727 # Name of file containing RSA key corresponding to 00728 # pubd-irbe-cert. 00729 # 00730 # @li @c pubd-cert: 00731 # Name of file containing pubd's BPKI certificate. 00732 # 00733 # @li @c pubd-url: 00734 # Service URL for pubd. Must be a %https:// URL. 00735 # 00736 # 00737 # 00738 # @section cross_certify cross_certify.py 00739 # 00740 # cross_certify.py is a small tool to extract certain fields from an 00741 # existing X.509 certificate and generate issue a new certificate that 00742 # can be used as part of a cross-certification chain. cross_certify 00743 # doesn't take a config file, all of its arguments are specified on 00744 # the command line. 00745 # 00746 # @verbatim 00747 # python cross_certify.py { -i | --in } input_cert 00748 # { -c | --ca } issuing_cert 00749 # { -k | --key } issuing_cert_key 00750 # { -s | --serial } serial_filename 00751 # [ { -h | --help } ] 00752 # [ { -o | --out } filename ] 00753 # [ { -l | --lifetime } timedelta ] 00754 # @endverbatim 00755 # 00756 # 00757 # @section irbe_setup irbe-setup.py config file 00758 # 00759 # @warning 00760 # irbe-setup is old code, not currently used, kept in case it is 00761 # useful at some later date. It may not work properly or at all. If 00762 # you don't understand what it does, you don't need it. You have been 00763 # warned. 00764 # 00765 # The default %config file is irbe.conf, start rpkid with "-c filename" 00766 # to choose a different %config file. Most options are in the section 00767 # "[irbe_cli]", but a few are in the section "[irdbd]". Certificates, 00768 # keys, and trust anchors may be in either DER or PEM format. 00769 # 00770 # Options in the "[irbe_cli]" section: 00771 # 00772 # @li @c bpki-ta: 00773 # Name of file containing BPKI trust anchor. 00774 # 00775 # @li @c irbe-cert: 00776 # Name of file containing BPKI certificate 00777 # irbe-setup should use. 00778 # 00779 # @li @c irbe-key: 00780 # Name of file containing RSA key corresponding 00781 # to irbe-cert. 00782 # 00783 # @li @c rpkid-cert: 00784 # Name of file containing rpkid's BPKI 00785 # certificate. 00786 # 00787 # @li @c https-url: 00788 # Service URL for rpkid. Must be a %https:// URL. 00789 # 00790 # Options in the "[irdbd]" section: 00791 # 00792 # @li @c sql-username: 00793 # Username to hand to MySQL when connecting to 00794 # irdbd's database. 00795 # 00796 # @li @c sql-database: 00797 # MySQL's database name for irdbd's database. 00798 # 00799 # @li @c sql-password: 00800 # Password to hand to MySQL when connecting to 00801 # irdbd's database. 00802 # 00803 # 00804 # @section cronjob cronjob.py 00805 # 00806 # This is a trivial program to trigger a cron run within rpkid. Once 00807 # rpkid has been converted to the planned event-driven model, this 00808 # function will be handled internally, but for now it has to be 00809 # triggered by an external program. For pseudo-production use one would 00810 # run this program under the system cron daemon. For scripted testing 00811 # it happens to be useful to be able to control when cron cycles occur, 00812 # so at the current stage of code development use of an external trigger 00813 # is a useful feature. 00814 # 00815 # The default %config file is cronjob.conf, start cronjob with "-c 00816 # filename" to choose a different %config file. All options are in the 00817 # section "[cronjob]". Certificates, keys, and trust anchors may be in 00818 # either DER or PEM format. 00819 # 00820 # %Config file options: 00821 # 00822 # @li @c bpki-ta: 00823 # Name of file containing BPKI trust anchor. 00824 # 00825 # @li @c irbe-cert: 00826 # Name of file containing cronjob.py's BPKI 00827 # certificate. 00828 # 00829 # @li @c https-key: 00830 # Name of file containing RSA key corresponding 00831 # to irbe-cert. 00832 # 00833 # @li @c rpkid-cert: 00834 # Name of file containing rpkid's BPKI certificate. 00835 # 00836 # @li @c https-url: 00837 # Service URL for rpkid. Must be a %https:// URL. 00838 # 00839 # 00840 # @section testbed testbed.py: 00841 # 00842 # testbed is a test harness to set up and run a collection of rpkid and 00843 # irdbd instances under scripted control. testbed is a very recent 00844 # addition to the toolset and is still evolving rapidly. 00845 # 00846 # Unlike the programs described above, testbed takes two configuration 00847 # files in different languages. The first configuration file uses the 00848 # same syntax as the above configuration files but is completely 00849 # optional. The second configuration file is the test script, which is 00850 # encoded using the YAML serialization language (see 00851 # http://www.yaml.org/ for more information on YAML). The YAML script 00852 # is not optional, as it describes the test layout. testbed is designed 00853 # to support running a fairly wide set of test configurations as canned 00854 # scripts without writing any new control code. The intent is to make 00855 # it possible to write meaningful regression tests. 00856 # 00857 # All of the options in in the first (optional) configuration file are 00858 # just overrides for wired-in default values. In most cases the 00859 # defaults will suffice, and the set of options is still in flux, so 00860 # only a few of the options are described here. The default name for 00861 # this configuration file is testbed.conf, run testbed with "-c 00862 # filename" to change it. 00863 # 00864 # testbed.conf options: 00865 # 00866 # @li @c testbed_dir: 00867 # Working directory into which testbed should write the 00868 # (many) files it generates. Default is "testbed.dir". 00869 # 00870 # @li @c irdb_db_pass: 00871 # MySQL password for the "irdb" user. Default is 00872 # "fnord". You may want to override this. 00873 # 00874 # @li @c rpki_db_pass: 00875 # MySQL password for the "rpki" user. Default is 00876 # "fnord". You may want to override this. 00877 # 00878 # @li @c rootd_sia: 00879 # rsync URI naming a (perhaps fictious) directory to use 00880 # as the id-ad-caRepository SIA value in the generated 00881 # root resource certificate. Default is 00882 # "rsync://wombat.invalid/". You may want to override 00883 # this if you intend to run an rsync server and test 00884 # against the generated results using rcynic. This 00885 # default will likely change if and when testbed learns 00886 # how to run rcynic itself as part of the test suite. 00887 # 00888 # The second configuration file is named testbed.yaml by default, run 00889 # testbed with "-y filename" to change it. The YAML file contains 00890 # multiple YAML "documents". The first document describes the initial 00891 # test layout and resource allocations, subsequent documents describe 00892 # modifications to the initial allocations and other parameters. 00893 # Resources listed in the initial layout are aggregated automatically, 00894 # so that a node in the resource hierarchy automatically receives the 00895 # resources it needs to issue whatever its children are listed as 00896 # holding. Actions in the subsequent documents are modifications to the 00897 # current resource set, modifications to validity dates or other 00898 # non-resource parameters, or special commands like "sleep". The 00899 # details are still evolving, but here's an example of current usage: 00900 # 00901 # @verbatim 00902 # name: RIR 00903 # valid_for: 2d 00904 # sia_base: "rsync://wombat.invalid/" 00905 # kids: 00906 # - name: LIR0 00907 # kids: 00908 # - name: Alice 00909 # ipv4: 192.0.2.1-192.0.2.33 00910 # asn: 64533 00911 # --- 00912 # - name: Alice 00913 # valid_add: 10 00914 # --- 00915 # - name: Alice 00916 # add_as: 33 00917 # valid_add: 2d 00918 # --- 00919 # - name: Alice 00920 # valid_sub: 2d 00921 # --- 00922 # - name: Alice 00923 # valid_for: 10d 00924 # @endverbatim 00925 # 00926 # This specifies an initial layout consisting of an RPKI engine named 00927 # "RIR", with one child "LIR0", which in turn has one child "Alice". 00928 # Alice has a set of assigned resources, and all resources in the system 00929 # are initially set to be valid for two days from the time at which the 00930 # test is started. The first subsequent document adds ten seconds to 00931 # the validity interval for Alice's resources and makes no other 00932 # modifications. The second subsequent document grants Alice additional 00933 # resources and adds another two days to the validity interval for 00934 # Alice's resources. The next document subtracts two days from the 00935 # validity interval for Alice's resources. The final document sets the 00936 # validity interval for Alice's resources to ten days. 00937 # 00938 # Operators in subsequent (update) documents: 00939 # 00940 # @li @c add_as, @c add_v4, @c add_v6: 00941 # These add ASN, IPv4, or IPv6 resources, respectively. 00942 # 00943 # @li @c sub_as, @c sub_v4, @c sub_v6: 00944 # These subtract resources. 00945 # 00946 # @li @c valid_until: 00947 # Set an absolute expiration date. 00948 # 00949 # @li @c valid_for: 00950 # Set a relative expiration date. 00951 # 00952 # @li @c valid_add, @c valid_sub: 00953 # Add to or subtract from validity interval. 00954 # 00955 # @li @c sleep [interval]: 00956 # Sleep for specified interval, or until testbed receives a SIGALRM signal. 00957 # 00958 # Absolute timestamps should be in the form shown (UTC timestamp format 00959 # as used in XML). 00960 # 00961 # Intervals (@c valid_add, @c valid_sub, @c valid_for, @c sleep) are either 00962 # integers, in which case they're interpreted as seconds, or are a 00963 # string of the form "wD xH yM zS" where w, x, y, and z are integers and 00964 # D, H, M, and S indicate days, hours, minutes, and seconds. In the 00965 # latter case all of the fields are optional, but at least one must be 00966 # specified. For example, "3D4H" means "three days plus four hours". 00967 # 00968 # 00969 # @section testpoke testpoke.py 00970 # 00971 # This is a command-line client for the up-down protocol. Unlike all of 00972 # the above programs, testpoke does not accept a %config file in 00973 # OpenSSL-compatable format at all. Instead, it is configured 00974 # exclusively by a YAML script. testpoke's design was constrained by a 00975 # desire to have it be compatable with APNIC's rpki_poke.pl tool, so 00976 # that the two tools could use a common configuration language to 00977 # simplify scripted testing. There are minor variations due to slightly 00978 # different feature sets, but YAML files intended for one program will 00979 # usually work with the other. 00980 # 00981 # README for APNIC's tool describing the input language can be found at 00982 # <a href="http://mirin.apnic.net/svn/rpki_engine/branches/gary-poker/client/poke/README"> 00983 # http://mirin.apnic.net/svn/rpki_engine/branches/gary-poker/client/poke/README</a>. 00984 # 00985 # testpoke.py takes a simplified command line and uses only one YAML 00986 # input file. 00987 # 00988 # @verbatim 00989 # Usage: python testpoke.py [ { -y | --yaml } configfile ] 00990 # [ { -r | --request } requestname ] 00991 # [ { -h | --help } ] 00992 # @endverbatim 00993 # 00994 # Default configuration file is testpoke.yaml, override with --yaml 00995 # option. 00996 # 00997 # The --request option specifies the specific command within the YAML 00998 # file to execute. 00999 # 01000 # Sample configuration file: 01001 # 01002 # @verbatim 01003 # --- 01004 # # Sample YAML configuration file for testpoke.py 01005 # 01006 # version: 1 01007 # posturl: https://localhost:4433/up-down/1 01008 # recipient-id: wombat 01009 # sender-id: "1" 01010 # 01011 # cms-cert-file: biz-certs/Frank-EE.cer 01012 # cms-key-file: biz-certs/Frank-EE.key 01013 # cms-ca-cert-file: biz-certs/Bob-Root.cer 01014 # cms-cert-chain-file: [ biz-certs/Frank-CA.cer ] 01015 # 01016 # ssl-cert-file: biz-certs/Frank-EE.cer 01017 # ssl-key-file: biz-certs/Frank-EE.key 01018 # ssl-ca-cert-file: biz-certs/Bob-Root.cer 01019 # 01020 # requests: 01021 # list: 01022 # type: list 01023 # issue: 01024 # type: issue 01025 # class: 1 01026 # sia: [ "rsync://bandicoot.invalid/some/where/" ] 01027 # revoke: 01028 # type: revoke 01029 # class: 1 01030 # ski: "CB5K6APY-4KcGAW9jaK_cVPXKX0" 01031 # @endverbatim 01032 # 01033 # testpoke adds one extension to the language described in APNIC's 01034 # README: the cms-cert-chain-* and ssl-cert-chain-* options, which allow 01035 # one to specify a chain of intermediate certificates to be presented in 01036 # the CMS or TLS protocol. APNIC's initial implementation required 01037 # direct knowledge of the issuing certificate (ie, it supported a 01038 # maximum chain length of one); subsequent APNIC code changes have 01039 # probably relaxed this restriction, and with luck APNIC has copied 01040 # testpoke's syntax to express chains of intermediate certificates. 01041 01042 ## @page Left-right Left-right protocol 01043 # 01044 # The left-right protocol is really two separate client/server 01045 # protocols over separate channels between the RPKI engine and the IR 01046 # back end (IRBE). The IRBE is the client for one of the 01047 # subprotocols, the RPKI engine is the client for the other. 01048 # 01049 # @section Terminology 01050 # 01051 # @li @em IRBE: Internet Registry Back End 01052 # 01053 # @li @em IRDB: Internet Registry Data Base 01054 # 01055 # @li @em BPKI: Business PKI 01056 # 01057 # @li @em RPKI: Resource PKI 01058 # 01059 # @section Operations initiated by the IRBE 01060 # 01061 # This part of the protcol uses a kind of message-passing. Each %object 01062 # that the RPKI engine knows about takes five messages: "create", "set", 01063 # "get", "list", and "destroy". Actions which are not just data 01064 # operations on %objects are handled via an SNMP-like mechanism, as if 01065 # they were fields to be set. For example, to generate a keypair one 01066 # "sets" the "generate-keypair" field of a BSC %object, even though there 01067 # is no such field in the %object itself as stored in SQL. This is a bit 01068 # of a kludge, but the reason for doing it as if these were variables 01069 # being set is to allow composite operations such as creating a BSC, 01070 # populating all of its data fields, and generating a keypair, all as a 01071 # single operation. With this model, that's trivial, otherwise it's at 01072 # least two round trips. 01073 # 01074 # Fields can be set in either "create" or "set" operations, the 01075 # difference just being whether the %object already exists. A "get" 01076 # operation returns all visible fields of the %object. A "list" 01077 # operation returns a %list containing what "get" would have returned on 01078 # each of those %objects. 01079 # 01080 # Left-right protocol %objects are encoded as signed CMS messages 01081 # containing XML as eContent and using an eContentType OID of @c id-ct-xml 01082 # (1.2.840.113549.1.9.16.1.28). These CMS messages are in turn passed 01083 # as the data for HTTPS POST operations, with an HTTP content type of 01084 # "application/x-rpki" for both the POST data and the response data. 01085 # 01086 # All operations allow an optional "tag" attribute which can be any 01087 # alphanumeric token. The main purpose of the tag attribute is to allow 01088 # batching of multiple requests into a single PDU. 01089 # 01090 # @subsection self_obj <self/> object 01091 # 01092 # A @c <self/> %object represents one virtual RPKI engine. In simple cases 01093 # where the RPKI engine operator operates the engine only on their own 01094 # behalf, there will only be one @c <self/> %object, representing the engine 01095 # operator's organization, but in environments where the engine operator 01096 # hosts other entities, there will be one @c @c <self/> %object per hosted 01097 # entity (probably including the engine operator's own organization, 01098 # considered as a hosted customer of itself). 01099 # 01100 # Some of the RPKI engine's configured parameters and data are shared by 01101 # all hosted entities, but most are tied to a specific @c <self/> %object. 01102 # Data which are shared by all hosted entities are referred to as 01103 # "per-engine" data, data which are specific to a particular @c <self/> 01104 # %object are "per-self" data. 01105 # 01106 # Since all other RPKI engine %objects refer to a @c <self/> %object via a 01107 # "self_id" value, one must create a @c <self/> %object before one can 01108 # usefully configure any other left-right protocol %objects. 01109 # 01110 # Every @c <self/> %object has a self_id attribute, which must be specified 01111 # for the "set", "get", and "destroy" actions. 01112 # 01113 # Payload data which can be configured in a @c <self/> %object: 01114 # 01115 # @li @c use_hsm (attribute): 01116 # Whether to use a Hardware Signing Module. At present this option 01117 # has no effect, as the implementation does not yet support HSMs. 01118 # 01119 # @li @c crl_interval (attribute): 01120 # Positive integer representing the planned lifetime of an RPKI CRL 01121 # for this @c <self/>, measured in seconds. 01122 # 01123 # @li @c regen_margin (attribute): 01124 # Positive integer representing how long before expiration of an 01125 # RPKI certificiate a new one should be generated, measured in 01126 # seconds. At present this only affects the one-off EE certificates 01127 # associated with ROAs. 01128 # 01129 # @li @c bpki_cert (element): 01130 # BPKI CA certificate for this @c <self/>. This is used as part of the 01131 # certificate chain when validating incoming TLS and CMS messages, 01132 # and should be the issuer of cross-certification BPKI certificates 01133 # used in @c <repository/>, @c <parent/>, and @c <child/> %objects. If the 01134 # bpki_glue certificate is in use (below), the bpki_cert certificate 01135 # should be issued by the bpki_glue certificate; otherwise, the 01136 # bpki_cert certificate should be issued by the per-engine bpki_ta 01137 # certificate. 01138 # 01139 # @li @c bpki_glue (element): 01140 # Another BPKI CA certificate for this @c <self/>, usually not needed. 01141 # Certain pathological cross-certification cases require a 01142 # two-certificate chain due to issuer name conflicts. If used, the 01143 # bpki_glue certificate should be the issuer of the bpki_cert 01144 # certificate and should be issued by the per-engine bpki_ta 01145 # certificate; if not needed, the bpki_glue certificate should be 01146 # left unset. 01147 # 01148 # Control attributes that can be set to "yes" to force actions: 01149 # 01150 # @li @c rekey: 01151 # Start a key rollover for every RPKI CA associated with every 01152 # @c <parent/> %object associated with this @c <self/> %object. This is the 01153 # first phase of a key rollover operation. 01154 # 01155 # @li @c revoke: 01156 # Revoke any remaining certificates for any expired key associated 01157 # with any RPKI CA for any @c <parent/> %object associated with this 01158 # @c <self/> %object. This is the second (cleanup) phase for a key 01159 # rollover operation; it's separate from the first phase to leave 01160 # time for new RPKI certificates to propegate and be installed. 01161 # 01162 # @li @c reissue: 01163 # Not implemented, may be removed from protocol. Original theory 01164 # was that this operation would force reissuance of any %object with 01165 # a changed key, but as that happens automatically as part of the 01166 # key rollover mechanism this operation seems unnecessary. 01167 # 01168 # @li @c run_now: 01169 # Force immediate processing for all tasks associated with this 01170 # @c <self/> %object that would ordinarily be performed under cron. Not 01171 # currently implemented. 01172 # 01173 # @li @c publish_world_now: 01174 # Force (re)publication of every publishable %object for this @c <self/> 01175 # %object. Not currently implemented. Intended to aid in recovery 01176 # if RPKI engine and publication engine somehow get out of sync. 01177 # 01178 # 01179 # @subsection bsc_obj <bsc/> object 01180 # 01181 # The @c <bsc/> ("business signing context") %object represents all the BPKI 01182 # data needed to sign outgoing CMS or HTTPS messages. Various other 01183 # %objects include pointers to a @c <bsc/> %object. Whether a particular 01184 # @c <self/> uses only one @c <bsc/> or multiple is a configuration decision 01185 # based on external requirements: the RPKI engine code doesn't care, it 01186 # just cares that, for any %object representing a relationship for which 01187 # it must sign messages, there be a @c <bsc/> %object that it can use to 01188 # produce that signature. 01189 # 01190 # Every @c <bsc/> %object has a bsc_id, which must be specified for the 01191 # "get", "set", and "destroy" actions. Every @c <bsc/> also has a self_id 01192 # attribute which indicates the @c <self/> %object with which this @c <bsc/> 01193 # %object is associated. 01194 # 01195 # Payload data which can be configured in a @c <isc/> %object: 01196 # 01197 # @li @c signing_cert (element): 01198 # BPKI certificate to use when generating a signature. 01199 # 01200 # @li @c signing_cert_crl (element): 01201 # CRL which would %list signing_cert if it had been revoked. 01202 # 01203 # Control attributes that can be set to "yes" to force actions: 01204 # 01205 # @li @c generate_keypair: 01206 # Generate a new BPKI keypair and return a PKCS #10 certificate 01207 # request. The resulting certificate, once issued, should be 01208 # configured as this @c <bsc/> %object's signing_cert. 01209 # 01210 # Additional attributes which may be specified when specifying 01211 # "generate_keypair": 01212 # 01213 # @li @c key_type: 01214 # Type of BPKI keypair to generate. "rsa" is both the default and, 01215 # at the moment, the only allowed value. 01216 # 01217 # @li @c hash_alg: 01218 # Cryptographic hash algorithm to use with this keypair. "sha256" 01219 # is both the default and, at the moment, the only allowed value. 01220 # 01221 # @li @c key_length: 01222 # Length in bits of the keypair to be generated. "2048" is both the 01223 # default and, at the moment, the only allowed value. 01224 # 01225 # Replies to "create" and "set" actions that specify "generate-keypair" 01226 # include a <bsc_pkcs10/> element, as do replies to "get" and "list" 01227 # actions for a @c <bsc/> %object for which a "generate-keypair" command has 01228 # been issued. The RPKI engine stores the PKCS #10 request, which 01229 # allows the IRBE to reuse the request if and when it needs to reissue 01230 # the corresponding BPKI signing certificate. 01231 # 01232 # @subsection parent_obj <parent/> object 01233 # 01234 # The @c <parent/> %object represents the RPKI engine's view of a particular 01235 # parent of the current @c <self/> %object in the up-down protocol. Due to 01236 # the way that the resource hierarchy works, a given @c <self/> may obtain 01237 # resources from multiple parents, but it will always have at least one; 01238 # in the case of IANA or an RIR, the parent RPKI engine may be a trivial 01239 # stub. 01240 # 01241 # Every @c <parent/> %object has a parent_id, which must be specified for 01242 # the "get", "set", and "destroy" actions. Every @c <parent/> also has a 01243 # self_id attribute which indicates the @c <self/> %object with which this 01244 # @c <parent/> %object is associated, a bsc_id attribute indicating the @c <bsc/> 01245 # %object to be used when signing messages sent to this parent, and a 01246 # repository_id indicating the @c <repository/> %object to be used when 01247 # publishing issued by the certificate issued by this parent. 01248 # 01249 # Payload data which can be configured in a @c <parent/> %object: 01250 # 01251 # @li @c peer_contact_uri (attribute): 01252 # HTTPS URI used to contact this parent. 01253 # 01254 # @li @c sia_base (attribute): 01255 # The leading portion of an rsync URI that the RPKI engine should 01256 # use when composing the publication URI for %objects issued by the 01257 # RPKI certificate issued by this parent. 01258 # 01259 # @li @c sender_name (attribute): 01260 # Sender name to use in the up-down protocol when talking to this 01261 # parent. The RPKI engine doesn't really care what this value is, 01262 # but other implementations of the up-down protocol do care. 01263 # 01264 # @li @c recipient_name (attribute): 01265 # Recipient name to use in the up-down protocol when talking to this 01266 # parent. The RPKI engine doesn't really care what this value is, 01267 # but other implementations of the up-down protocol do care. 01268 # 01269 # @li @c bpki_cms_cert (element): 01270 # BPKI CMS CA certificate for this @c <parent/>. This is used as part 01271 # of the certificate chain when validating incoming CMS messages If 01272 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01273 # certificate should be issued by the bpki_cms_glue certificate; 01274 # otherwise, the bpki_cms_cert certificate should be issued by the 01275 # bpki_cert certificate in the @c <self/> %object. 01276 # 01277 # @li @c bpki_cms_glue (element): 01278 # Another BPKI CMS CA certificate for this @c <parent/>, usually not 01279 # needed. Certain pathological cross-certification cases require a 01280 # two-certificate chain due to issuer name conflicts. If used, the 01281 # bpki_cms_glue certificate should be the issuer of the 01282 # bpki_cms_cert certificate and should be issued by the bpki_cert 01283 # certificate in the @c <self/> %object; if not needed, the 01284 # bpki_cms_glue certificate should be left unset. 01285 # 01286 # @li @c bpki_https_cert (element): 01287 # BPKI HTTPS CA certificate for this @c <parent/>. This is like the 01288 # bpki_cms_cert %object, only used for validating incoming TLS 01289 # messages rather than CMS. 01290 # 01291 # @li @c bpki_cms_glue (element): 01292 # Another BPKI HTTPS CA certificate for this @c <parent/>, usually not 01293 # needed. This is like the bpki_cms_glue certificate, only used for 01294 # validating incoming TLS messages rather than CMS. 01295 # 01296 # Control attributes that can be set to "yes" to force actions: 01297 # 01298 # @li @c rekey: 01299 # This is like the rekey command in the @c <self/> %object, but limited 01300 # to RPKI CAs under this parent. 01301 # 01302 # @li @c reissue: 01303 # This is like the reissue command in the @c <self/> %object, but limited 01304 # to RPKI CAs under this parent. 01305 # 01306 # @li @c revoke: 01307 # This is like the revoke command in the @c <self/> %object, but limited 01308 # to RPKI CAs under this parent. 01309 # 01310 # @subsection child_obj <child/> object 01311 # 01312 # The @c <child/> %object represents the RPKI engine's view of particular 01313 # child of the current @c <self/> in the up-down protocol. 01314 # 01315 # Every @c <child/> %object has a parent_id, which must be specified for the 01316 # "get", "set", and "destroy" actions. Every @c <child/> also has a 01317 # self_id attribute which indicates the @c <self/> %object with which this 01318 # @c <child/> %object is associated. 01319 # 01320 # Payload data which can be configured in a @c <child/> %object: 01321 # 01322 # @li @c bpki_cert (element): 01323 # BPKI CA certificate for this @c <child/>. This is used as part of 01324 # the certificate chain when validating incoming TLS and CMS 01325 # messages. If the bpki_glue certificate is in use (below), the 01326 # bpki_cert certificate should be issued by the bpki_glue 01327 # certificate; otherwise, the bpki_cert certificate should be issued 01328 # by the bpki_cert certificate in the @c <self/> %object. 01329 # 01330 # @li @c bpki_glue (element): 01331 # Another BPKI CA certificate for this @c <child/>, usually not needed. 01332 # Certain pathological cross-certification cases require a 01333 # two-certificate chain due to issuer name conflicts. If used, the 01334 # bpki_glue certificate should be the issuer of the bpki_cert 01335 # certificate and should be issued by the bpki_cert certificate in 01336 # the @c <self/> %object; if not needed, the bpki_glue certificate 01337 # should be left unset. 01338 # 01339 # Control attributes that can be set to "yes" to force actions: 01340 # 01341 # @li @c reissue: 01342 # Not implemented, may be removed from protocol. 01343 # 01344 # @subsection repository_obj <repository/> object 01345 # 01346 # The @c <repository/> %object represents the RPKI engine's view of a 01347 # particular publication repository used by the current @c <self/> %object. 01348 # 01349 # Every @c <repository/> %object has a repository_id, which must be 01350 # specified for the "get", "set", and "destroy" actions. Every 01351 # @c <repository/> also has a self_id attribute which indicates the @c <self/> 01352 # %object with which this @c <repository/> %object is associated. 01353 # 01354 # Payload data which can be configured in a @c <repository/> %object: 01355 # 01356 # @li @c peer_contact_uri (attribute): 01357 # HTTPS URI used to contact this repository. 01358 # 01359 # @li @c bpki_cms_cert (element): 01360 # BPKI CMS CA certificate for this @c <repository/>. This is used as part 01361 # of the certificate chain when validating incoming CMS messages If 01362 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01363 # certificate should be issued by the bpki_cms_glue certificate; 01364 # otherwise, the bpki_cms_cert certificate should be issued by the 01365 # bpki_cert certificate in the @c <self/> %object. 01366 # 01367 # @li @c bpki_cms_glue (element): 01368 # Another BPKI CMS CA certificate for this @c <repository/>, usually not 01369 # needed. Certain pathological cross-certification cases require a 01370 # two-certificate chain due to issuer name conflicts. If used, the 01371 # bpki_cms_glue certificate should be the issuer of the 01372 # bpki_cms_cert certificate and should be issued by the bpki_cert 01373 # certificate in the @c <self/> %object; if not needed, the 01374 # bpki_cms_glue certificate should be left unset. 01375 # 01376 # @li @c bpki_https_cert (element): 01377 # BPKI HTTPS CA certificate for this @c <repository/>. This is like the 01378 # bpki_cms_cert %object, only used for validating incoming TLS 01379 # messages rather than CMS. 01380 # 01381 # @li @c bpki_cms_glue (element): 01382 # Another BPKI HTTPS CA certificate for this @c <repository/>, usually not 01383 # needed. This is like the bpki_cms_glue certificate, only used for 01384 # validating incoming TLS messages rather than CMS. 01385 # 01386 # At present there are no control attributes for @c <repository/> %objects. 01387 # 01388 # @subsection route_origin_obj <route_origin/> object 01389 # 01390 # The @c <route_origin/> %object is a kind of prototype for a ROA. It 01391 # contains all the information needed to generate a ROA once the RPKI 01392 # engine obtains the appropriate RPKI certificates from its parent(s). 01393 # 01394 # Note that a @c <route_origin/> %object represents a ROA to be generated on 01395 # behalf of @c <self/>, not on behalf of a @c <child/>. Thus, a hosted entity 01396 # that has no children but which does need to generate ROAs would be 01397 # represented by a hosted @c <self/> with no @c <child/> %objects but one or 01398 # more @c <route_origin/> %objects. While lumping ROA generation in with 01399 # the other RPKI engine activities may seem a little odd at first, it's 01400 # a natural consequence of the design requirement that the RPKI daemon 01401 # never transmit private keys across the network in any form; given this 01402 # requirement, the RPKI engine that holds the private keys for an RPKI 01403 # certificate must also be the engine which generates any ROAs that 01404 # derive from that RPKI certificate. 01405 # 01406 # The precise content of the @c <route_origin/> has changed over time as 01407 # the underlying ROA specification has changed. The current 01408 # implementation as of this writing matches what we expect to see in 01409 # draft-ietf-sidr-roa-format-03, once it is issued. In particular, note 01410 # that the exactMatch boolean from the -02 draft has been replaced by 01411 # the prefix and maxLength encoding used in the -03 draft. 01412 # 01413 # Payload data which can be configured in a @c <route_origin/> %object: 01414 # 01415 # @li @c as_number (attribute): 01416 # Autonomous System Number (ASN) to place in the generated ROA. A 01417 # single ROA can only grant authorization to a single ASN; multiple 01418 # ASNs require multiple ROAs, thus multiple @c <route_origin/> %objects. 01419 # 01420 # @li @c ipv4 (attribute): 01421 # %List of IPv4 prefix and maxLength values, see below for format. 01422 # 01423 # @li @c ipv6 (attribute): 01424 # %List of IPv6 prefix and maxLength values, see below for format. 01425 # 01426 # Control attributes that can be set to "yes" to force actions: 01427 # 01428 # @li @c suppress_publication: 01429 # Not implemented, may be removed from protocol. 01430 # 01431 # The lists of IPv4 and IPv6 prefix and maxLength values are represented 01432 # as comma-separated text strings, with no whitespace permitted. Each 01433 # entry in such a string represents a single prefix/maxLength pair. 01434 # 01435 # ABNF for these address lists: 01436 # 01437 # @verbatim 01438 # 01439 # <ROAIPAddress> ::= <address> "/" <prefixlen> [ "-" <max_prefixlen> ] 01440 # ; Where <max_prefixlen> defaults to the same 01441 # ; value as <prefixlen>. 01442 # 01443 # <ROAIPAddressList> ::= <ROAIPAddress> *( "," <ROAIPAddress> ) 01444 # 01445 # @endverbatim 01446 # 01447 # For example, @c "10.0.1.0/24-32,10.0.2.0/24", which is a shorthand 01448 # form of @c "10.0.1.0/24-32,10.0.2.0/24-24". 01449 # 01450 # @section irdb_queries Operations initiated by the RPKI engine 01451 # 01452 # The left-right protocol also includes queries from the RPKI engine 01453 # back to the IRDB. These queries do not follow the message-passing 01454 # pattern used in the IRBE-initiated part of the protocol. Instead, 01455 # there's a single query back to the IRDB, with a corresponding 01456 # response. The CMS and HTTPS encoding are the same as in the rest of 01457 # the protocol, but the BPKI certificates will be different as the 01458 # back-queries and responses form a separate communication channel. 01459 # 01460 # @subsection list_resources_msg <list_resources/> messages 01461 # 01462 # The @c <list_resources/> query and response allow the RPKI engine to ask 01463 # the IRDB for information about resources assigned to a particular 01464 # child. The query must include both a @c "self_id" attribute naming 01465 # the @c <self/> that is making the request and also a @c "child_id" 01466 # attribute naming the child that is the subject of the query. The 01467 # query and response also allow an optional @c "tag" attribute of the 01468 # same form used elsewhere in this protocol, to allow batching. 01469 # 01470 # A @c <list_resources/> response includes the following attributes, along 01471 # with the @c tag (if specified), @c self_id, and @c child_id copied 01472 # from the request: 01473 # 01474 # @li @c valid_until: 01475 # A timestamp indicating the date and time at which certificates 01476 # generated by the RPKI engine for these data should expire. The 01477 # timestamp is expressed as an XML @c xsd:dateTime, must be 01478 # expressed in UTC, and must carry the "Z" suffix indicating UTC. 01479 # 01480 # @li @c subject_name: 01481 # An optional text string naming the child. Not currently used. 01482 # 01483 # @li @c asn: 01484 # A %list of autonomous sequence numbers, expressed as a 01485 # comma-separated sequence of decimal integers with no whitespace. 01486 # 01487 # @li @c ipv4: 01488 # A %list of IPv4 address prefixes and ranges, expressed as a 01489 # comma-separated %list of prefixes and ranges with no whitespace. 01490 # See below for format details. 01491 # 01492 # @li @c ipv6: 01493 # A %list of IPv6 address prefixes and ranges, expressed as a 01494 # comma-separated %list of prefixes and ranges with no whitespace. 01495 # See below for format details. 01496 # 01497 # Entries in a %list of address prefixes and ranges can be either 01498 # prefixes, which are written in the usual address/prefixlen notation, 01499 # or ranges, which are expressed as a pair of addresses denoting the 01500 # beginning and end of the range, written in ascending order separated 01501 # by a single "-" character. This format is superficially similar to 01502 # the format used for prefix and maxLength values in the @c <route_origin/> 01503 # %object, but the semantics differ: note in particular that 01504 # @c <route_origin/> %objects don't allow ranges, while @c <list_resources/> 01505 # messages don't allow a maxLength specification. 01506 # 01507 # @section left_right_error_handling Error handling 01508 # 01509 # Error in this protocol are handled at two levels. 01510 # 01511 # Since all messages in this protocol are conveyed over HTTPS 01512 # connections, basic errors are indicated via the HTTP response code. 01513 # 4xx and 5xx responses indicate that something bad happened. Errors 01514 # that make it impossible to decode a query or encode a response are 01515 # handled in this way. 01516 # 01517 # Where possible, errors will result in a @c <report_error/> message which 01518 # takes the place of the expected protocol response message. 01519 # @c <report_error/> messages are CMS-signed XML messages like the rest of 01520 # this protocol, and thus can be archived to provide an audit trail. 01521 # 01522 # @c <report_error/> messages only appear in replies, never in queries. 01523 # The @c <report_error/> message can appear on either the "forward" (IRBE 01524 # as client of RPKI engine) or "back" (RPKI engine as client of IRDB) 01525 # communication channel. 01526 # 01527 # The @c <report_error/> message includes an optional @c "tag" attribute to 01528 # assist in matching the error with a particular query when using 01529 # batching, and also includes a @c "self_id" attribute indicating the 01530 # @c <self/> that issued the error. 01531 # 01532 # The error itself is conveyed in the @c error_code (attribute). The 01533 # value of this attribute is a token indicating the specific error that 01534 # occurred. At present this will be the name of a Python exception; the 01535 # production version of this protocol will nail down the allowed error 01536 # tokens here, probably in the RelaxNG schema. 01537 # 01538 # The body of the @c <report_error/> element itself is an optional text 01539 # string; if present, this is debugging information. At present this 01540 # capabilty is not used, debugging information goes to syslog. 01541 01542 ## @page Publication Publication protocol 01543 # 01544 # The %publication protocol is really two separate client/server 01545 # protocols, between different parties. The first is a configuration 01546 # protocol for an IRBE to use to configure a %publication engine, 01547 # the second is the interface by which authorized clients request 01548 # %publication of specific objects. 01549 # 01550 # Much of the architecture of the %publication protocol is borrowed 01551 # from the @link Left-right left-right protocol: @endlink like the 01552 # left-right protocol, the %publication protocol uses CMS-wrapped XML 01553 # over HTTPS with the same eContentType OID and the same HTTPS 01554 # content-type, and the overall style of the XML messages is very 01555 # similar to the left-right protocol. All operations allow an 01556 # optional "tag" attribute to allow batching. 01557 # 01558 # The %publication engine operates a single HTTPS server which serves 01559 # both of these subprotocols. The two subprotocols share a single 01560 # server port, but use distinct URLs to allow demultiplexing. 01561 # 01562 # @section Terminology 01563 # 01564 # @li @em IRBE: Internet Registry Back End 01565 # 01566 # @li @em IRDB: Internet Registry Data Base 01567 # 01568 # @li @em BPKI: Business PKI 01569 # 01570 # @li @em RPKI: Resource PKI 01571 # 01572 # @section Publication-control Publication control subprotocol 01573 # 01574 # The control subprotocol reuses the message-passing design of the 01575 # left-right protocol. Configured objects support the "create", "set", 01576 # "get", "list", and "destroy" actions, or a subset thereof when the 01577 # full set of actions doesn't make sense. 01578 # 01579 # @subsection config_obj <config/> object 01580 # 01581 # The <config/> %object allows configuration of data that apply to the 01582 # entire %publication server rather than a particular client. 01583 # 01584 # There is exactly one <config/> %object in the %publication server, and 01585 # it only supports the "set" and "get" actions -- it cannot be created 01586 # or destroyed. 01587 # 01588 # Payload data which can be configured in a <config/> %object: 01589 # 01590 # @li @c bpki_crl (element): 01591 # This is the BPKI CRL used by the %publication server when 01592 # signing the CMS wrapper on responses in the %publication 01593 # subprotocol. As the CRL must be updated at regular intervals, 01594 # it's not practical to restart the %publication server when the 01595 # BPKI CRL needs to be updated. The BPKI model doesn't require 01596 # use of a BPKI CRL between the IRBE and the %publication server, 01597 # so we can use the %publication control subprotocol to update the 01598 # BPKI CRL. 01599 # 01600 # @subsection client_obj <client/> object 01601 # 01602 # The <client/> %object represents one client authorized to use the 01603 # %publication server. 01604 # 01605 # The <client/> %object supports the full set of "create", "set", "get", 01606 # "list", and "destroy" actions. Each client has a "client_id" 01607 # attribute, which is used in responses and must be specified in "set", 01608 # "get", or "destroy" actions. 01609 # 01610 # Payload data which can be configured in a <client/> %object: 01611 # 01612 # @li @c base_uri (attribute): 01613 # This is the base URI below which this client is allowed to publish 01614 # data. The %publication server may impose additional constraints in 01615 # the case of a child publishing beneath its parent. 01616 # 01617 # @li @c bpki_cert (element): 01618 # BPKI CA certificate for this <client/>. This is used as part of 01619 # the certificate chain when validating incoming TLS and CMS 01620 # messages. If the bpki_glue certificate is in use (below), the 01621 # bpki_cert certificate should be issued by the bpki_glue 01622 # certificate; otherwise, the bpki_cert certificate should be issued 01623 # by the %publication engine's bpki_ta certificate. 01624 # 01625 # @li @c bpki_glue (element): 01626 # Another BPKI CA certificate for this <client/>, usually not 01627 # needed. Certain pathological cross-certification cases require a 01628 # two-certificate chain due to issuer name conflicts. If used, the 01629 # bpki_glue certificate should be the issuer of the bpki_cert 01630 # certificate and should be issued by the %publication engine's 01631 # bpki_ta certificate; if not needed, the bpki_glue certificate 01632 # should be left unset. 01633 # 01634 # @section Publication-publication Publication subprotocol 01635 # 01636 # The %publication subprotocol is structured somewhat differently from 01637 # the %publication control protocol. Objects in the %publication 01638 # subprotocol represent objects to be published or objects to be 01639 # withdrawn from %publication. Each kind of %object supports two actions: 01640 # "publish" and "withdraw". In each case the XML element representing 01641 # hte %object to be published or withdrawn has a "uri" attribute which 01642 # contains the %publication URI. For "publish" actions, the XML element 01643 # body contains the DER %object to be published, encoded in Base64; for 01644 # "withdraw" actions, the XML element body is empty. 01645 # 01646 # In theory, the detailed access control for each kind of %object might 01647 # be different. In practice, as of this writing, access control for all 01648 # objects is a simple check that the client's @c "base_uri" is a leading 01649 # substring of the %publication URI. Details of why access control might 01650 # need to become more complicated are discussed in a later section. 01651 # 01652 # @subsection certificate_obj <certificate/> object 01653 # 01654 # The <certificate/> %object represents an RPKI certificate to be 01655 # published or withdrawn. 01656 # 01657 # @subsection crl_obj <crl/> object 01658 # 01659 # The <crl/> %object represents an RPKI CRL to be published or withdrawn. 01660 # 01661 # @subsection manifest_obj <manifest/> object 01662 # 01663 # The <manifest/> %object represents an RPKI %publication %manifest to be 01664 # published or withdrawn. 01665 # 01666 # Note that part of the reason for the batching support in the 01667 # %publication protocol is because @em every %publication or withdrawal 01668 # action requires a new %manifest, thus every %publication or withdrawal 01669 # action will involve at least two objects. 01670 # 01671 # @subsection roa_obj <roa/> object 01672 # 01673 # The <roa/> %object represents a ROA to be published or withdrawn. 01674 # 01675 # @section publication_error_handling Error handling 01676 # 01677 # Error in this protocol are handled at two levels. 01678 # 01679 # Since all messages in this protocol are conveyed over HTTPS 01680 # connections, basic errors are indicated via the HTTP response code. 01681 # 4xx and 5xx responses indicate that something bad happened. Errors 01682 # that make it impossible to decode a query or encode a response are 01683 # handled in this way. 01684 # 01685 # Where possible, errors will result in a <report_error/> message which 01686 # takes the place of the expected protocol response message. 01687 # <report_error/> messages are CMS-signed XML messages like the rest of 01688 # this protocol, and thus can be archived to provide an audit trail. 01689 # 01690 # <report_error/> messages only appear in replies, never in 01691 # queries. The <report_error/> message can appear in both the 01692 # control and publication subprotocols. 01693 # 01694 # The <report_error/> message includes an optional @c "tag" attribute to 01695 # assist in matching the error with a particular query when using 01696 # batching. 01697 # 01698 # The error itself is conveyed in the @c error_code (attribute). The 01699 # value of this attribute is a token indicating the specific error that 01700 # occurred. At present this will be the name of a Python exception; the 01701 # production version of this protocol will nail down the allowed error 01702 # tokens here, probably in the RelaxNG schema. 01703 # 01704 # The body of the <report_error/> element itself is an optional text 01705 # string; if present, this is debugging information. At present this 01706 # capabilty is not used, debugging information goes to syslog. 01707 # 01708 # @section publication_access_control Additional access control considerations. 01709 # 01710 # As detailed above, the %publication protocol is trivially simple. This 01711 # glosses over two bits of potential complexity: 01712 # 01713 # @li In the case where parent and child are sharing a repository, we'd 01714 # like to nest child under parent, because testing has demonstrated 01715 # that even on relatively slow hardware the delays involved in 01716 # setting up separate rsync connections tend to dominate 01717 # synchronization time for relying parties. 01718 # 01719 # @li The repository operator might also want to do some checks to 01720 # assure itself that what it's about to allow the RPKI engine to 01721 # publish is not dangerous toxic waste. 01722 # 01723 # The up-down protocol includes a mechanism by which a parent can 01724 # suggest a %publication URI to each of its children. The children are 01725 # not required to accept this hint, and the children must make separate 01726 # arrangements with the repository operator (who might or might not be 01727 # the same as the entity that hosts the children's RPKI engine 01728 # operations) to use the suggested %publication point, but if everything 01729 # works out, this allows children to nest cleanly under their parents 01730 # %publication points, which helps reduce synchronization time for 01731 # relying parties. 01732 # 01733 # In this case, one could argue that the %publication server is 01734 # responsible for preventing one of its clients (the child in the above 01735 # description) from stomping on data published by another of its clients 01736 # (the parent in the above description). This goes beyond the basic 01737 # access check and requires the %publication server to determine whether 01738 # the parent has given its consent for the child to publish under the 01739 # parent. Since the RPKI certificate profile requires the child's 01740 # %publication point to be indicated in an SIA extension in a certificate 01741 # issued by the parent to the child, the %publication engine can infer 01742 # this permission from the parent's issuance of a certificate to the 01743 # child. Since, by definition, the parent also uses this %publication 01744 # server, this is an easy check, as the %publication server should 01745 # already have the parent's certificate available by the time it needs 01746 # to check the child's certificate. 01747 # 01748 # The previous paragraph only covers a "publish" action for a 01749 # <certificate/> %object. For "publish" actions on other 01750 # objects, the %publication server would need to trace permission back 01751 # to the certificate issued by the parent; for "withdraw" actions, 01752 # the %publication server would have to perform the same checks it 01753 # would perform for a "publish" action, using the current published 01754 # data before withdrawing it. The latter in turn implies an ordering 01755 # constraint on "withdraw" actions in order to preserve the data 01756 # necessary for these access control decisions; as this may prove 01757 # impractical, the %publication server may probably need to make 01758 # periodic sweeps over its published data looking for orphaned 01759 # objects, but that's probably a good idea anyway. 01760 # 01761 # Note that, in this %publication model, any agreement that the 01762 # repository makes to publish the RPKI engine's output is conditional 01763 # upon the %object to be published passing whatever access control checks 01764 # the %publication server imposes. 01765 01766 ## @page sql-schemas SQL database schemas 01767 # 01768 # @li @subpage rpkid-sql "rpkid database schema" 01769 # @li @subpage pubd-sql "pubd database schema" 01770 # @li @subpage irdbd-sql "irdbd database schema" 01771 01772 ## @page rpkid-sql rpkid SQL schema 01773 # 01774 # @dotfile rpkid.dot "Diagram of rpkid.sql" 01775 # 01776 # @verbinclude rpkid.sql 01777 01778 ## @page pubd-sql pubd SQL Schema 01779 # 01780 # @dotfile pubd.dot "Diagram of pubd.sql" 01781 # 01782 # @verbinclude pubd.sql 01783 01784 ## @page irdbd-sql irdbd SQL Schema 01785 # 01786 # @dotfile irdbd.dot "Diagram of irdbd.sql" 01787 # 01788 # @verbinclude irdbd.sql 01789 01790 ## @page bpki-model BPKI model 01791 # 01792 # The "business PKI" (BPKI) is the PKI used to authenticate 01793 # communication on the up-down, left-right, and %publication protocols. 01794 # BPKI certificates are @em not resource PKI (RPKI) certificates. The 01795 # BPKI is a separate PKI that represents relationships between the 01796 # various entities involved in the production side of the RPKI system. 01797 # In most cases the BPKI tree will follow existing business 01798 # relationships, hence the name "BPKI". 01799 # 01800 # Setup of the BPKI is handled by the back end; for the most part, 01801 # rpkid and pubd just use the result. The one place where the engines 01802 # are directly involved in creation of new BPKI certificates is in the 01803 # production of end-entity certificates for use by the engines. 01804 # 01805 # There are a few design principals that underly the chosen BPKI model: 01806 # @li Each engine should rely on a single BPKI trust anchor which is 01807 # controlled by the back end entity that runs the engine; all 01808 # other trust material should be cross-certified into the engine's 01809 # BPKI tree. 01810 # @li Private keys must never transit the network. 01811 # @li Except for end entity certificates, the engine should only have 01812 # access to the BPKI certificates; in particular, the private key 01813 # for the BPKI trust anchor should not be accessible to the engine. 01814 # @li The number of BPKI keys and certificates that the engine has to 01815 # manage should be no larger than is necessary. 01816 # 01817 # rpkid's hosting model adds an additional constraint: rpkid's BPKI 01818 # trust anchor belongs to the entity operating rpkid, but the entities 01819 # hosted by rpkid should have control of their own BPKI private keys. 01820 # This implies the need for an additional layer of BPKI certificate 01821 # hierarchy within rpkid. 01822 # 01823 # Here is a simplified picture of what the BPKI might look like for an 01824 # rpkid operator that hosts two entities, "Alice" and "Ellen": 01825 # 01826 # @dot 01827 # // Color code: 01828 # // Black: Hosting entity 01829 # // Blue: Hosted entity 01830 # // Red: Cross-certified peer 01831 # // 01832 # // Shape code: 01833 # // Octagon: TA 01834 # // Diamond: CA 01835 # // Record: EE 01836 # 01837 # digraph bpki_rpkid { 01838 # splines = true; 01839 # size = "14,14"; 01840 # node [ fontname = Times, fontsize = 9 ]; 01841 # 01842 # // Hosting entity 01843 # node [ color = black, shape = record ]; 01844 # TA [ shape = octagon, label = "BPKI TA" ]; 01845 # rpkid [ label = "rpkid|{HTTPS server|HTTPS left-right client|CMS left-right}" ]; 01846 # irdbd [ label = "irdbd|{HTTPS left-right server|CMS left-right}" ]; 01847 # irbe [ label = "IRBE|{HTTPS left-right client|CMS left-right}" ]; 01848 # 01849 # // Hosted entities 01850 # node [ color = blue, fontcolor = blue ]; 01851 # Alice_CA [ shape = diamond ]; 01852 # Alice_EE [ label = "Alice\nBSC EE|{HTTPS up-down client|CMS up-down}" ]; 01853 # Ellen_CA [ shape = diamond ]; 01854 # Ellen_EE [ label = "Ellen\nBSC EE|{HTTPS up-down client|CMS up-down}" ]; 01855 # 01856 # // Peers 01857 # node [ color = red, fontcolor = red, shape = diamond ]; 01858 # Bob_CA; 01859 # Carol_CA; 01860 # Dave_CA; 01861 # Frank_CA; 01862 # Ginny_CA; 01863 # Harry_CA; 01864 # node [ shape = record ]; 01865 # Bob_EE [ label = "Bob\nEE|{HTTPS up-down|CMS up-down}" ]; 01866 # Carol_EE [ label = "Carol\nEE|{HTTPS up-down|CMS up-down}" ]; 01867 # Dave_EE [ label = "Dave\nEE|{HTTPS up-down|CMS up-down}" ]; 01868 # Frank_EE [ label = "Frank\nEE|{HTTPS up-down|CMS up-down}" ]; 01869 # Ginny_EE [ label = "Ginny\nEE|{HTTPS up-down|CMS up-down}" ]; 01870 # Harry_EE [ label = "Bob\nEE|{HTTPS up-down|CMS up-down}" ]; 01871 # 01872 # edge [ color = black, style = solid ]; 01873 # TA -> Alice_CA; 01874 # TA -> Ellen_CA; 01875 # 01876 # edge [ color = black, style = dotted ]; 01877 # TA -> rpkid; 01878 # TA -> irdbd; 01879 # TA -> irbe; 01880 # 01881 # edge [ color = blue, style = solid ]; 01882 # Alice_CA -> Bob_CA; 01883 # Alice_CA -> Carol_CA; 01884 # Alice_CA -> Dave_CA; 01885 # Ellen_CA -> Frank_CA; 01886 # Ellen_CA -> Ginny_CA; 01887 # Ellen_CA -> Harry_CA; 01888 # 01889 # edge [ color = blue, style = dotted ]; 01890 # Alice_CA -> Alice_EE; 01891 # Ellen_CA -> Ellen_EE; 01892 # 01893 # edge [ color = red, style = solid ]; 01894 # Bob_CA -> Bob_EE; 01895 # Carol_CA -> Carol_EE; 01896 # Dave_CA -> Dave_EE; 01897 # Frank_CA -> Frank_EE; 01898 # Ginny_CA -> Ginny_EE; 01899 # Harry_CA -> Harry_EE; 01900 # } 01901 # @enddot 01902 # 01903 # Black objects belong to the hosting entity, blue objects belong to 01904 # the hosted entities, red objects are cross-certified objects from 01905 # the hosted entities' peers. The arrows indicate certificate 01906 # issuance: solid arrows are the ones that rpkid will care about 01907 # during certificate validation, dotted arrows show the origin of the 01908 # EE certificates that rpkid uses to sign CMS and TLS messages. 01909 # 01910 # There's one nasty bit where the model had to bend to fit the current 01911 # state of the underlying protocols: it's not possible to use exactly 01912 # the same BPKI keys and certificates for HTTPS and CMS. The reason 01913 # for this is simple: each hosted entity has its own BPKI, as does the 01914 # hosting entity, but the HTTPS listener is shared. The only ways to 01915 # avoid sharing the HTTPS server certificate would be to use separate 01916 # listeners for each hosted entity, which scales poorly, or to rely on 01917 # the TLS "Server Name Indication" extension (RFC 4366 3.1) which is 01918 # not yet widely implemented. 01919 # 01920 # The certificate tree looks complicated, but the set of certificates 01921 # needed to build any particular validation chain is obvious, again 01922 # excepting the HTTPS server case, where the client certificate is the 01923 # first hint that the engine has of the client's identity, so the 01924 # server must be prepared to accept any current client certificate. 01925 # 01926 # Detailed instructions on how to build a BPKI are beyond the scope of 01927 # this document, but one can handle simple cases using the OpenSSL 01928 # command line tool and cross_certify.py; the latter is a tool 01929 # designed specifically for the purpose of generating the 01930 # cross-certification certificates needed to splice foreign trust 01931 # material into a BPKI tree. 01932 # 01933 # The BPKI tree for a pubd instance is similar to to the BPKI tree for 01934 # an rpkid instance, but is a bit simpler, as pubd does not provide 01935 # hosting in the same sense that rpkid does: pubd is a relatively 01936 # simple server that publishes objects as instructed by its clients. 01937 # 01938 # Here's a simplified picture of what the BPKI might look like for a 01939 # pubd operator that serves two clients, "Alice" and "Bob": 01940 # 01941 # @dot 01942 # // Color code: 01943 # // Black: Operating entity 01944 # // Red: Cross-certified client 01945 # // 01946 # // Shape code: 01947 # // Octagon: TA 01948 # // Diamond: CA 01949 # // Record: EE 01950 # 01951 # digraph bpki_pubd { 01952 # splines = true; 01953 # size = "14,14"; 01954 # node [ fontname = Times, fontsize = 9 ]; 01955 # 01956 # // Operating entity 01957 # node [ color = black, fontcolor = black, shape = record ]; 01958 # TA [ shape = octagon, label = "BPKI TA" ]; 01959 # pubd [ label = "pubd|{HTTPS server|CMS}" ]; 01960 # ctl [ label = "Control|{HTTPS client|CMS}" ]; 01961 # 01962 # // Clients 01963 # node [ color = red, fontcolor = red, shape = diamond ]; 01964 # Alice_CA; 01965 # Bob_CA; 01966 # node [ color = red, fontcolor = red, shape = record ]; 01967 # Alice_EE [ label = "Alice\nEE|{HTTPS client|CMS}" ]; 01968 # Bob_EE [ label = "Bob\nEE|{HTTPS client|CMS}" ]; 01969 # 01970 # edge [ color = black, style = dotted ]; 01971 # TA -> pubd; 01972 # TA -> ctl; 01973 # 01974 # edge [ color = black, style = solid ]; 01975 # TA -> Alice_CA; 01976 # TA -> Bob_CA; 01977 # 01978 # edge [ color = red, style = solid ]; 01979 # Alice_CA -> Alice_EE; 01980 # Bob_CA -> Bob_EE; 01981 # } 01982 # @enddot 01983 # 01984 # While it is likely that RIRs (at least) will operate both rpkid and 01985 # pubd instances, the two functions are conceptually separate. As far 01986 # as pubd is concerned, it doesn't matter who operates the rpkid 01987 # instance: pubd just has clients, each of which has trust material 01988 # that has been cross-certified into pubd's BPKI. Similarly, rpkid 01989 # doesn't really care who operates a pubd instance that it's been 01990 # configured to use, it just treats that pubd as a foreign BPKI whose 01991 # trust material has to be cross-certified into its own BPKI. Cross 01992 # certification itself is done by the back end operator, using 01993 # cross_certify or some equivalent tool; the resulting BPKI 01994 # certificates are configured into rpkid and pubd via the left-right 01995 # protocol and the control subprotocol of the publication protocol, 01996 # respectively. 01997 # 01998 # Because the BPKI tree is almost entirely controlled by the operating 01999 # entity, CRLs are not necessary for most of the BPKI. The one 02000 # exception to this is the EE certificates issued under the 02001 # cross-certification points. These EE certificates are generated by 02002 # the peer, not the local operator, and thus require CRLs. Because of 02003 # this, both rpkid and pubd require regular updates of certain BPKI 02004 # CRLs, again via the left-right and publication control protocols. 02005 # 02006 # Because the left-right protocol and the publication control 02007 # subprotocol are used to configure BPKI certificates and CRLs, they 02008 # cannot themselves use certificates and CRLs configured in this way. 02009 # This is why the configuration files for rpkid and pubd require 02010 # static configuration of the left-right and publication control 02011 # certificates. 02012 02013 # Local Variables: 02014 # compile-command: "cd .. && make doc" 02015 # End: