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