00001 # $Id: __init__.py 1888 2008-06-16 22:22:19Z 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-key: 00523 # Name of file containing RSA key to use in 00524 # signing resource certificates. 00525 # 00526 # @li @c rpki-issuer: 00527 # Name of file containing self-signed root 00528 # resource certificate corresponding to 00529 # rpki-key. 00530 # 00531 # @li @c rpki-subject-filename: 00532 # Name of file that rootd should use to save the 00533 # one and only certificate it issues. 00534 # 00535 # @li @c rpki-pkcs10-filename: 00536 # Name of file that rootd should use when saving 00537 # a copy of the received PKCS #10 request for a 00538 # resource certificate. This is only used for 00539 # debugging. Default is not to save the PKCS 00540 # #10 request. 00541 # 00542 # 00543 # @section irdbd irdbd.py 00544 # 00545 # irdbd is a sample implemntation of the server side of the IRDB 00546 # callback subset of the left-right protocol. In production use this 00547 # service is a function of the IRBE stub; irdbd may be suitable for 00548 # production use in simple cases, but an IR with a complex IRDB may need 00549 # to extend or rewrite irdbd. 00550 # 00551 # irdbd requires a pre-populated database to represent the IR's 00552 # customers. irdbd expects this database to use the SQL schema defined 00553 # in rpkid/irdbd.sql. Once this database has been populated, the 00554 # IRBE stub needs to create the appropriate objects in rpkid's database 00555 # via the control subset of the left-right protocol, and store the 00556 # linkage IDs (foreign keys into rpkid's database, basicly) in the 00557 # IRDB. The irbe-setup.py program shows an example of how to do this. 00558 # 00559 # irdbd's default %config file is irdbd.conf, start irdbd with "-c 00560 # filename" to choose a different %config file. All options are in the 00561 # section "[irdbd]". Certificates, keys, and trust anchors may be in 00562 # either DER or PEM format. 00563 # 00564 # %Config file options: 00565 # 00566 # @li @c startup-message: 00567 # String to %log on startup, useful when 00568 # debugging a collection of irdbd instances at 00569 # once. 00570 # 00571 # @li @c sql-username: 00572 # Username to hand to MySQL when connecting to 00573 # irdbd's database. 00574 # 00575 # @li @c sql-database: 00576 # MySQL's database name for irdbd's database. 00577 # 00578 # @li @c sql-password: 00579 # Password to hand to MySQL when connecting to 00580 # irdbd's database. 00581 # 00582 # @li @c bpki-ta: 00583 # Name of file containing BPKI trust anchor. All 00584 # BPKI certificate validation in irdbd traces 00585 # back to this trust anchor. 00586 # 00587 # @li @c irdbd-cert: 00588 # Name of file containing irdbd's own BPKI 00589 # certificate. 00590 # 00591 # @li @c irdbd-key: 00592 # Name of file containing RSA key corresponding 00593 # to irdbd-cert. 00594 # 00595 # @li @c rpkid-cert: 00596 # Name of file containing certificate used the 00597 # one and only by rpkid instance authorized to 00598 # contact this irdbd instance. 00599 # 00600 # @li @c https-url: 00601 # Service URL for irdbd. Must be a %https:// URL. 00602 # 00603 # 00604 # @section irdbd_cli irbe-cli.py 00605 # 00606 # irbe-cli is a simple command line client for the control subsets of 00607 # the @link Left-right left-right @endlink and @link Publication 00608 # publication @endlink protocols. In production use this 00609 # functionality would be part of the IRBE stub. 00610 # 00611 # Basic configuration of irbe-cli is handled via a %config file. The 00612 # specific action or actions to be performed are specified on the 00613 # command line, and map closely to the protocols themselves. 00614 # 00615 # At present the user is assumed to be able to read the (XML) 00616 # left-right and publication protocol messages, and with one 00617 # exception, irdbd-cli makes no attempt to interpret the responses 00618 # other than to check for signature and syntax errors. The one 00619 # exception is that, if the @c --pem_out option is specified on the 00620 # command line, any PKCS \#10 requests received from rpkid will be 00621 # written in PEM format to that file; this makes it easier to hand 00622 # these requests off to the business PKI in order to issue signing 00623 # certs corresponding to newly generated business keys. 00624 # 00625 # @verbinclude irbe-cli.usage 00626 # 00627 # Global options (@c --config, @c --help, @c --pem_out) come first, 00628 # then zero or more commands (@c parent, @c repository, @c self, @c 00629 # child, @c route_origin, @c bsc, @c config, @c client), each followed 00630 # by its own set of options. The commands map to elements in the 00631 # protocols, and the command-specific options map to attributes or 00632 # subelements for those commands. 00633 # 00634 # @c --tag is an optional arbitrary tag (think IMAP) to simplify 00635 # matching up replies with batched queries. 00636 # 00637 # @c --*_id options refer to the primary keys of previously created 00638 # objects. 00639 # 00640 # The remaining options are specific to the particular commands, and 00641 # follow directly from the protocol specifications. 00642 # 00643 # A trailing "=" in the above option summary indicates that an option 00644 # takes a value, eg, "--action create" or "--action=create". Options 00645 # without a trailing "=" correspond to boolean control attributes. 00646 # 00647 # The default %config file for irbe-cli is irbe-cli.conf, start 00648 # irbe-cli with "-c filename" (or "--config filename") to choose a 00649 # different %config file. All options are in the section 00650 # "[irbe-cli]". Certificates, keys, and trust anchors may be in 00651 # either DER or PEM format. 00652 # 00653 # %Config file options: 00654 # 00655 # @li @c rpkid-bpki-ta: 00656 # Name of file containing BPKI trust anchor to 00657 # use when authenticating messages from rpkid. 00658 # 00659 # @li @c rpkid-irbe-cert: 00660 # Name of file containing BPKI certificate 00661 # irbe-cli should use when talking to rpkid. 00662 # 00663 # @li @c rpkid-irbe-key: 00664 # Name of file containing RSA key corresponding to 00665 # rpkid-irbe-cert. 00666 # 00667 # @li @c rpkid-cert: 00668 # Name of file containing rpkid's BPKI certificate. 00669 # 00670 # @li @c rpkid-url: 00671 # Service URL for rpkid. Must be a %https:// URL. 00672 # 00673 # @li @c pubd-bpki-ta: 00674 # Name of file containing BPKI trust anchor to 00675 # use when authenticating messages from pubd. 00676 # 00677 # @li @c pubd-irbe-cert: 00678 # Name of file containing BPKI certificate 00679 # irbe-cli should use when talking to pubd. 00680 # 00681 # @li @c pubd-irbe-key: 00682 # Name of file containing RSA key corresponding to 00683 # pubd-irbe-cert. 00684 # 00685 # @li @c pubd-cert: 00686 # Name of file containing pubd's BPKI certificate. 00687 # 00688 # @li @c pubd-url: 00689 # Service URL for pubd. Must be a %https:// URL. 00690 # 00691 # 00692 # 00693 # @section cross_certify cross-certify.py 00694 # 00695 # cross-certify.py is a small tool to extract certain fields from an 00696 # existing X.509 certificate and generate issue a new certificate that 00697 # can be used as part of a cross-certification chain. cross-certify 00698 # doesn't take a config file, all of its arguments are specified on 00699 # the command line. 00700 # 00701 # @verbatim 00702 # python cross-certify.py { -i | --in } input_cert 00703 # { -c | --ca } issuing_cert 00704 # { -k | --key } issuing_cert_key 00705 # { -s | --serial } serial_filename 00706 # [ { -h | --help } ] 00707 # [ { -o | --out } filename ] 00708 # [ { -l | --lifetime } timedelta ] 00709 # @endverbatim 00710 # 00711 # 00712 # @section irbe_setup irbe-setup.py config file 00713 # 00714 # @warning 00715 # irbe-setup is old code, not currently used, kept in case it is 00716 # useful at some later date. It may not work properly or at all. If 00717 # you don't understand what it does, you don't need it. You have been 00718 # warned. 00719 # 00720 # The default %config file is irbe.conf, start rpkid with "-c filename" 00721 # to choose a different %config file. Most options are in the section 00722 # "[irbe-cli]", but a few are in the section "[irdbd]". Certificates, 00723 # keys, and trust anchors may be in either DER or PEM format. 00724 # 00725 # Options in the "[irbe-cli]" section: 00726 # 00727 # @li @c bpki-ta: 00728 # Name of file containing BPKI trust anchor. 00729 # 00730 # @li @c irbe-cert: 00731 # Name of file containing BPKI certificate 00732 # irbe-setup should use. 00733 # 00734 # @li @c irbe-key: 00735 # Name of file containing RSA key corresponding 00736 # to irbe-cert. 00737 # 00738 # @li @c rpkid-cert: 00739 # Name of file containing rpkid's BPKI 00740 # certificate. 00741 # 00742 # @li @c https-url: 00743 # Service URL for rpkid. Must be a %https:// URL. 00744 # 00745 # Options in the "[irdbd]" section: 00746 # 00747 # @li @c sql-username: 00748 # Username to hand to MySQL when connecting to 00749 # irdbd's database. 00750 # 00751 # @li @c sql-database: 00752 # MySQL's database name for irdbd's database. 00753 # 00754 # @li @c sql-password: 00755 # Password to hand to MySQL when connecting to 00756 # irdbd's database. 00757 # 00758 # 00759 # @section cronjob cronjob.py 00760 # 00761 # This is a trivial program to trigger a cron run within rpkid. Once 00762 # rpkid has been converted to the planned event-driven model, this 00763 # function will be handled internally, but for now it has to be 00764 # triggered by an external program. For pseudo-production use one would 00765 # run this program under the system cron daemon. For scripted testing 00766 # it happens to be useful to be able to control when cron cycles occur, 00767 # so at the current stage of code development use of an external trigger 00768 # is a useful feature. 00769 # 00770 # The default %config file is cronjob.conf, start cronjob with "-c 00771 # filename" to choose a different %config file. All options are in the 00772 # section "[cronjob]". Certificates, keys, and trust anchors may be in 00773 # either DER or PEM format. 00774 # 00775 # %Config file options: 00776 # 00777 # @li @c bpki-ta: 00778 # Name of file containing BPKI trust anchor. 00779 # 00780 # @li @c irbe-cert: 00781 # Name of file containing cronjob.py's BPKI 00782 # certificate. 00783 # 00784 # @li @c https-key: 00785 # Name of file containing RSA key corresponding 00786 # to irbe-cert. 00787 # 00788 # @li @c rpkid-cert: 00789 # Name of file containing rpkid's BPKI certificate. 00790 # 00791 # @li @c https-url: 00792 # Service URL for rpkid. Must be a %https:// URL. 00793 # 00794 # 00795 # @section testbed testbed.py: 00796 # 00797 # testbed is a test harness to set up and run a collection of rpkid and 00798 # irdbd instances under scripted control. testbed is a very recent 00799 # addition to the toolset and is still evolving rapidly. 00800 # 00801 # Unlike the programs described above, testbed takes two configuration 00802 # files in different languages. The first configuration file uses the 00803 # same syntax as the above configuration files but is completely 00804 # optional. The second configuration file is the test script, which is 00805 # encoded using the YAML serialization language (see 00806 # http://www.yaml.org/ for more information on YAML). The YAML script 00807 # is not optional, as it describes the test layout. testbed is designed 00808 # to support running a fairly wide set of test configurations as canned 00809 # scripts without writing any new control code. The intent is to make 00810 # it possible to write meaningful regression tests. 00811 # 00812 # All of the options in in the first (optional) configuration file are 00813 # just overrides for wired-in default values. In most cases the 00814 # defaults will suffice, and the set of options is still in flux, so 00815 # only a few of the options are described here. The default name for 00816 # this configuration file is testbed.conf, run testbed with "-c 00817 # filename" to change it. 00818 # 00819 # testbed.conf options: 00820 # 00821 # @li @c testbed_dir: 00822 # Working directory into which testbed should write the 00823 # (many) files it generates. Default is "testbed.dir". 00824 # 00825 # @li @c irdb_db_pass: 00826 # MySQL password for the "irdb" user. Default is 00827 # "fnord". You may want to override this. 00828 # 00829 # @li @c rpki_db_pass: 00830 # MySQL password for the "rpki" user. Default is 00831 # "fnord". You may want to override this. 00832 # 00833 # @li @c rootd_sia: 00834 # rsync URI naming a (perhaps fictious) directory to use 00835 # as the id-ad-caRepository SIA value in the generated 00836 # root resource certificate. Default is 00837 # "rsync://wombat.invalid/". You may want to override 00838 # this if you intend to run an rsync server and test 00839 # against the generated results using rcynic. This 00840 # default will likely change if and when testbed learns 00841 # how to run rcynic itself as part of the test suite. 00842 # 00843 # The second configuration file is named testbed.yaml by default, run 00844 # testbed with "-y filename" to change it. The YAML file contains 00845 # multiple YAML "documents". The first document describes the initial 00846 # test layout and resource allocations, subsequent documents describe 00847 # modifications to the initial allocations and other parameters. 00848 # Resources listed in the initial layout are aggregated automatically, 00849 # so that a node in the resource hierarchy automatically receives the 00850 # resources it needs to issue whatever its children are listed as 00851 # holding. Actions in the subsequent documents are modifications to the 00852 # current resource set, modifications to validity dates or other 00853 # non-resource parameters, or special commands like "sleep". The 00854 # details are still evolving, but here's an example of current usage: 00855 # 00856 # @verbatim 00857 # name: RIR 00858 # valid_for: 2d 00859 # sia_base: "rsync://wombat.invalid/" 00860 # kids: 00861 # - name: LIR0 00862 # kids: 00863 # - name: Alice 00864 # ipv4: 192.0.2.1-192.0.2.33 00865 # asn: 64533 00866 # --- 00867 # - name: Alice 00868 # valid_add: 10 00869 # --- 00870 # - name: Alice 00871 # add_as: 33 00872 # valid_add: 2d 00873 # --- 00874 # - name: Alice 00875 # valid_sub: 2d 00876 # --- 00877 # - name: Alice 00878 # valid_for: 10d 00879 # @endverbatim 00880 # 00881 # This specifies an initial layout consisting of an RPKI engine named 00882 # "RIR", with one child "LIR0", which in turn has one child "Alice". 00883 # Alice has a set of assigned resources, and all resources in the system 00884 # are initially set to be valid for two days from the time at which the 00885 # test is started. The first subsequent document adds ten seconds to 00886 # the validity interval for Alice's resources and makes no other 00887 # modifications. The second subsequent document grants Alice additional 00888 # resources and adds another two days to the validity interval for 00889 # Alice's resources. The next document subtracts two days from the 00890 # validity interval for Alice's resources. The final document sets the 00891 # validity interval for Alice's resources to ten days. 00892 # 00893 # Operators in subsequent (update) documents: 00894 # 00895 # @li @c add_as, @c add_v4, @c add_v6: 00896 # These add ASN, IPv4, or IPv6 resources, respectively. 00897 # 00898 # @li @c sub_as, @c sub_v4, @c sub_v6: 00899 # These subtract resources. 00900 # 00901 # @li @c valid_until: 00902 # Set an absolute expiration date. 00903 # 00904 # @li @c valid_for: 00905 # Set a relative expiration date. 00906 # 00907 # @li @c valid_add, @c valid_sub: 00908 # Add to or subtract from validity interval. 00909 # 00910 # @li @c sleep [interval]: 00911 # Sleep for specified interval, or until testbed receives a SIGALRM signal. 00912 # 00913 # Absolute timestamps should be in the form shown (UTC timestamp format 00914 # as used in XML). 00915 # 00916 # Intervals (@c valid_add, @c valid_sub, @c valid_for, @c sleep) are either 00917 # integers, in which case they're interpreted as seconds, or are a 00918 # string of the form "wD xH yM zS" where w, x, y, and z are integers and 00919 # D, H, M, and S indicate days, hours, minutes, and seconds. In the 00920 # latter case all of the fields are optional, but at least one must be 00921 # specified. For example, "3D4H" means "three days plus four hours". 00922 # 00923 # 00924 # @section testpoke testpoke.py 00925 # 00926 # This is a command-line client for the up-down protocol. Unlike all of 00927 # the above programs, testpoke does not accept a %config file in 00928 # OpenSSL-compatable format at all. Instead, it is configured 00929 # exclusively by a YAML script. testpoke's design was constrained by a 00930 # desire to have it be compatable with APNIC's rpki_poke.pl tool, so 00931 # that the two tools could use a common configuration language to 00932 # simplify scripted testing. There are minor variations due to slightly 00933 # different feature sets, but YAML files intended for one program will 00934 # usually work with the other. 00935 # 00936 # README for APNIC's tool describing the input language can be found at 00937 # http://mirin.apnic.net/svn/rpki_engine/branches/gary-poker/client/poke/README 00938 # 00939 # testpoke.py takes a simplified command line and uses only one YAML 00940 # input file. 00941 # 00942 # @verbatim 00943 # Usage: python testpoke.py [ { -y | --yaml } configfile ] 00944 # [ { -r | --request } requestname ] 00945 # [ { -h | --help } ] 00946 # @endverbatim 00947 # 00948 # Default configuration file is testpoke.yaml, override with --yaml 00949 # option. 00950 # 00951 # The --request option specifies the specific command within the YAML 00952 # file to execute. 00953 # 00954 # Sample configuration file: 00955 # 00956 # @verbatim 00957 # --- 00958 # # Sample YAML configuration file for testpoke.py 00959 # 00960 # version: 1 00961 # posturl: https://localhost:4433/up-down/1 00962 # recipient-id: wombat 00963 # sender-id: "1" 00964 # 00965 # cms-cert-file: biz-certs/Frank-EE.cer 00966 # cms-key-file: biz-certs/Frank-EE.key 00967 # cms-ca-cert-file: biz-certs/Bob-Root.cer 00968 # cms-cert-chain-file: [ biz-certs/Frank-CA.cer ] 00969 # 00970 # ssl-cert-file: biz-certs/Frank-EE.cer 00971 # ssl-key-file: biz-certs/Frank-EE.key 00972 # ssl-ca-cert-file: biz-certs/Bob-Root.cer 00973 # 00974 # requests: 00975 # list: 00976 # type: list 00977 # issue: 00978 # type: issue 00979 # class: 1 00980 # sia: [ "rsync://bandicoot.invalid/some/where/" ] 00981 # revoke: 00982 # type: revoke 00983 # class: 1 00984 # ski: "CB5K6APY-4KcGAW9jaK_cVPXKX0" 00985 # @endverbatim 00986 # 00987 # testpoke adds one extension to the language described in APNIC's 00988 # README: the cms-cert-chain-* and ssl-cert-chain-* options, which allow 00989 # one to specify a chain of intermediate certificates to be presented in 00990 # the CMS or TLS protocol. APNIC's initial implementation required 00991 # direct knowledge of the issuing certificate (ie, it supported a 00992 # maximum chain length of one); subsequent APNIC code changes have 00993 # probably relaxed this restriction, and with luck APNIC has copied 00994 # testpoke's syntax to express chains of intermediate certificates. 00995 00996 ## @page Left-right Left-right protocol 00997 # 00998 # The left-right protocol is really two separate client/server 00999 # protocols over separate channels between the RPKI engine and the IR 01000 # back end (IRBE). The IRBE is the client for one of the 01001 # subprotocols, the RPKI engine is the client for the other. 01002 # 01003 # @section Terminology 01004 # 01005 # @li @em IRBE: Internet Registry Back End 01006 # 01007 # @li @em IRDB: Internet Registry Data Base 01008 # 01009 # @li @em BPKI: Business PKI 01010 # 01011 # @li @em RPKI: Resource PKI 01012 # 01013 # @section Operations initiated by the IRBE 01014 # 01015 # This part of the protcol uses a kind of message-passing. Each %object 01016 # that the RPKI engine knows about takes five messages: "create", "set", 01017 # "get", "list", and "destroy". Actions which are not just data 01018 # operations on %objects are handled via an SNMP-like mechanism, as if 01019 # they were fields to be set. For example, to generate a keypair one 01020 # "sets" the "generate-keypair" field of a BSC %object, even though there 01021 # is no such field in the %object itself as stored in SQL. This is a bit 01022 # of a kludge, but the reason for doing it as if these were variables 01023 # being set is to allow composite operations such as creating a BSC, 01024 # populating all of its data fields, and generating a keypair, all as a 01025 # single operation. With this model, that's trivial, otherwise it's at 01026 # least two round trips. 01027 # 01028 # Fields can be set in either "create" or "set" operations, the 01029 # difference just being whether the %object already exists. A "get" 01030 # operation returns all visible fields of the %object. A "list" 01031 # operation returns a %list containing what "get" would have returned on 01032 # each of those %objects. 01033 # 01034 # Left-right protocol %objects are encoded as signed CMS messages 01035 # containing XML as eContent and using an eContentType OID of @c id-ct-xml 01036 # (1.2.840.113549.1.9.16.1.28). These CMS messages are in turn passed 01037 # as the data for HTTPS POST operations, with an HTTP content type of 01038 # "application/x-rpki" for both the POST data and the response data. 01039 # 01040 # All operations allow an optional "tag" attribute which can be any 01041 # alphanumeric token. The main purpose of the tag attribute is to allow 01042 # batching of multiple requests into a single PDU. 01043 # 01044 # @subsection self_obj <self/> object 01045 # 01046 # A @c <self/> %object represents one virtual RPKI engine. In simple cases 01047 # where the RPKI engine operator operates the engine only on their own 01048 # behalf, there will only be one @c <self/> %object, representing the engine 01049 # operator's organization, but in environments where the engine operator 01050 # hosts other entities, there will be one @c @c <self/> %object per hosted 01051 # entity (probably including the engine operator's own organization, 01052 # considered as a hosted customer of itself). 01053 # 01054 # Some of the RPKI engine's configured parameters and data are shared by 01055 # all hosted entities, but most are tied to a specific @c <self/> %object. 01056 # Data which are shared by all hosted entities are referred to as 01057 # "per-engine" data, data which are specific to a particular @c <self/> 01058 # %object are "per-self" data. 01059 # 01060 # Since all other RPKI engine %objects refer to a @c <self/> %object via a 01061 # "self_id" value, one must create a @c <self/> %object before one can 01062 # usefully configure any other left-right protocol %objects. 01063 # 01064 # Every @c <self/> %object has a self_id attribute, which must be specified 01065 # for the "set", "get", and "destroy" actions. 01066 # 01067 # Payload data which can be configured in a @c <self/> %object: 01068 # 01069 # @li @c use_hsm (attribute): 01070 # Whether to use a Hardware Signing Module. At present this option 01071 # has no effect, as the implementation does not yet support HSMs. 01072 # 01073 # @li @c crl_interval (attribute): 01074 # Positive integer representing the planned lifetime of an RPKI CRL 01075 # for this @c <self/>, measured in seconds. 01076 # 01077 # @li @c regen_margin (attribute): 01078 # Positive integer representing how long before expiration of an 01079 # RPKI certificiate a new one should be generated, measured in 01080 # seconds. At present this only affects the one-off EE certificates 01081 # associated with ROAs. 01082 # 01083 # @li @c bpki_cert (element): 01084 # BPKI CA certificate for this @c <self/>. This is used as part of the 01085 # certificate chain when validating incoming TLS and CMS messages, 01086 # and should be the issuer of cross-certification BPKI certificates 01087 # used in @c <repository/>, @c <parent/>, and @c <child/> %objects. If the 01088 # bpki_glue certificate is in use (below), the bpki_cert certificate 01089 # should be issued by the bpki_glue certificate; otherwise, the 01090 # bpki_cert certificate should be issued by the per-engine bpki_ta 01091 # certificate. 01092 # 01093 # @li @c bpki_glue (element): 01094 # Another BPKI CA certificate for this @c <self/>, usually not needed. 01095 # Certain pathological cross-certification cases require a 01096 # two-certificate chain due to issuer name conflicts. If used, the 01097 # bpki_glue certificate should be the issuer of the bpki_cert 01098 # certificate and should be issued by the per-engine bpki_ta 01099 # certificate; if not needed, the bpki_glue certificate should be 01100 # left unset. 01101 # 01102 # Control attributes that can be set to "yes" to force actions: 01103 # 01104 # @li @c rekey: 01105 # Start a key rollover for every RPKI CA associated with every 01106 # @c <parent/> %object associated with this @c <self/> %object. This is the 01107 # first phase of a key rollover operation. 01108 # 01109 # @li @c revoke: 01110 # Revoke any remaining certificates for any expired key associated 01111 # with any RPKI CA for any @c <parent/> %object associated with this 01112 # @c <self/> %object. This is the second (cleanup) phase for a key 01113 # rollover operation; it's separate from the first phase to leave 01114 # time for new RPKI certificates to propegate and be installed. 01115 # 01116 # @li @c reissue: 01117 # Not implemented, may be removed from protocol. Original theory 01118 # was that this operation would force reissuance of any %object with 01119 # a changed key, but as that happens automatically as part of the 01120 # key rollover mechanism this operation seems unnecessary. 01121 # 01122 # @li @c run_now: 01123 # Force immediate processing for all tasks associated with this 01124 # @c <self/> %object that would ordinarily be performed under cron. Not 01125 # currently implemented. 01126 # 01127 # @li @c publish_world_now: 01128 # Force (re)publication of every publishable %object for this @c <self/> 01129 # %object. Not currently implemented. Intended to aid in recovery 01130 # if RPKI engine and publication engine somehow get out of sync. 01131 # 01132 # 01133 # @subsection bsc_obj <bsc/> object 01134 # 01135 # The @c <bsc/> ("business signing context") %object represents all the BPKI 01136 # data needed to sign outgoing CMS or HTTPS messages. Various other 01137 # %objects include pointers to a @c <bsc/> %object. Whether a particular 01138 # @c <self/> uses only one @c <bsc/> or multiple is a configuration decision 01139 # based on external requirements: the RPKI engine code doesn't care, it 01140 # just cares that, for any %object representing a relationship for which 01141 # it must sign messages, there be a @c <bsc/> %object that it can use to 01142 # produce that signature. 01143 # 01144 # Every @c <bsc/> %object has a bsc_id, which must be specified for the 01145 # "get", "set", and "destroy" actions. Every @c <bsc/> also has a self_id 01146 # attribute which indicates the @c <self/> %object with which this @c <bsc/> 01147 # %object is associated. 01148 # 01149 # Payload data which can be configured in a @c <isc/> %object: 01150 # 01151 # @li @c signing_cert (element): 01152 # BPKI certificate to use when generating a signature. 01153 # 01154 # @li @c signing_cert_crl (element): 01155 # CRL which would %list signing_cert if it had been revoked. 01156 # 01157 # Control attributes that can be set to "yes" to force actions: 01158 # 01159 # @li @c generate_keypair: 01160 # Generate a new BPKI keypair and return a PKCS #10 certificate 01161 # request. The resulting certificate, once issued, should be 01162 # configured as this @c <bsc/> %object's signing_cert. 01163 # 01164 # Additional attributes which may be specified when specifying 01165 # "generate_keypair": 01166 # 01167 # @li @c key_type: 01168 # Type of BPKI keypair to generate. "rsa" is both the default and, 01169 # at the moment, the only allowed value. 01170 # 01171 # @li @c hash_alg: 01172 # Cryptographic hash algorithm to use with this keypair. "sha256" 01173 # is both the default and, at the moment, the only allowed value. 01174 # 01175 # @li @c key_length: 01176 # Length in bits of the keypair to be generated. "2048" is both the 01177 # default and, at the moment, the only allowed value. 01178 # 01179 # Replies to "create" and "set" actions that specify "generate-keypair" 01180 # include a <bsc_pkcs10/> element, as do replies to "get" and "list" 01181 # actions for a @c <bsc/> %object for which a "generate-keypair" command has 01182 # been issued. The RPKI engine stores the PKCS #10 request, which 01183 # allows the IRBE to reuse the request if and when it needs to reissue 01184 # the corresponding BPKI signing certificate. 01185 # 01186 # @subsection parent_obj <parent/> object 01187 # 01188 # The @c <parent/> %object represents the RPKI engine's view of a particular 01189 # parent of the current @c <self/> %object in the up-down protocol. Due to 01190 # the way that the resource hierarchy works, a given @c <self/> may obtain 01191 # resources from multiple parents, but it will always have at least one; 01192 # in the case of IANA or an RIR, the parent RPKI engine may be a trivial 01193 # stub. 01194 # 01195 # Every @c <parent/> %object has a parent_id, which must be specified for 01196 # the "get", "set", and "destroy" actions. Every @c <parent/> also has a 01197 # self_id attribute which indicates the @c <self/> %object with which this 01198 # @c <parent/> %object is associated, a bsc_id attribute indicating the @c <bsc/> 01199 # %object to be used when signing messages sent to this parent, and a 01200 # repository_id indicating the @c <repository/> %object to be used when 01201 # publishing issued by the certificate issued by this parent. 01202 # 01203 # Payload data which can be configured in a @c <parent/> %object: 01204 # 01205 # @li @c peer_contact_uri (attribute): 01206 # HTTPS URI used to contact this parent. 01207 # 01208 # @li @c sia_base (attribute): 01209 # The leading portion of an rsync URI that the RPKI engine should 01210 # use when composing the publication URI for %objects issued by the 01211 # RPKI certificate issued by this parent. 01212 # 01213 # @li @c sender_name (attribute): 01214 # Sender name to use in the up-down protocol when talking to this 01215 # parent. The RPKI engine doesn't really care what this value is, 01216 # but other implementations of the up-down protocol do care. 01217 # 01218 # @li @c recipient_name (attribute): 01219 # Recipient name to use in the up-down protocol when talking to this 01220 # parent. The RPKI engine doesn't really care what this value is, 01221 # but other implementations of the up-down protocol do care. 01222 # 01223 # @li @c bpki_cms_cert (element): 01224 # BPKI CMS CA certificate for this @c <parent/>. This is used as part 01225 # of the certificate chain when validating incoming CMS messages If 01226 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01227 # certificate should be issued by the bpki_cms_glue certificate; 01228 # otherwise, the bpki_cms_cert certificate should be issued by the 01229 # bpki_cert certificate in the @c <self/> %object. 01230 # 01231 # @li @c bpki_cms_glue (element): 01232 # Another BPKI CMS CA certificate for this @c <parent/>, usually not 01233 # needed. Certain pathological cross-certification cases require a 01234 # two-certificate chain due to issuer name conflicts. If used, the 01235 # bpki_cms_glue certificate should be the issuer of the 01236 # bpki_cms_cert certificate and should be issued by the bpki_cert 01237 # certificate in the @c <self/> %object; if not needed, the 01238 # bpki_cms_glue certificate should be left unset. 01239 # 01240 # @li @c bpki_https_cert (element): 01241 # BPKI HTTPS CA certificate for this @c <parent/>. This is like the 01242 # bpki_cms_cert %object, only used for validating incoming TLS 01243 # messages rather than CMS. 01244 # 01245 # @li @c bpki_cms_glue (element): 01246 # Another BPKI HTTPS CA certificate for this @c <parent/>, usually not 01247 # needed. This is like the bpki_cms_glue certificate, only used for 01248 # validating incoming TLS messages rather than CMS. 01249 # 01250 # Control attributes that can be set to "yes" to force actions: 01251 # 01252 # @li @c rekey: 01253 # This is like the rekey command in the @c <self/> %object, but limited 01254 # to RPKI CAs under this parent. 01255 # 01256 # @li @c reissue: 01257 # This is like the reissue command in the @c <self/> %object, but limited 01258 # to RPKI CAs under this parent. 01259 # 01260 # @li @c revoke: 01261 # This is like the revoke command in the @c <self/> %object, but limited 01262 # to RPKI CAs under this parent. 01263 # 01264 # @subsection child_obj <child/> object 01265 # 01266 # The @c <child/> %object represents the RPKI engine's view of particular 01267 # child of the current @c <self/> in the up-down protocol. 01268 # 01269 # Every @c <child/> %object has a parent_id, which must be specified for the 01270 # "get", "set", and "destroy" actions. Every @c <child/> also has a 01271 # self_id attribute which indicates the @c <self/> %object with which this 01272 # @c <child/> %object is associated. 01273 # 01274 # Payload data which can be configured in a @c <child/> %object: 01275 # 01276 # @li @c bpki_cert (element): 01277 # BPKI CA certificate for this @c <child/>. This is used as part of 01278 # the certificate chain when validating incoming TLS and CMS 01279 # messages. If the bpki_glue certificate is in use (below), the 01280 # bpki_cert certificate should be issued by the bpki_glue 01281 # certificate; otherwise, the bpki_cert certificate should be issued 01282 # by the bpki_cert certificate in the @c <self/> %object. 01283 # 01284 # @li @c bpki_glue (element): 01285 # Another BPKI CA certificate for this @c <child/>, usually not needed. 01286 # Certain pathological cross-certification cases require a 01287 # two-certificate chain due to issuer name conflicts. If used, the 01288 # bpki_glue certificate should be the issuer of the bpki_cert 01289 # certificate and should be issued by the bpki_cert certificate in 01290 # the @c <self/> %object; if not needed, the bpki_glue certificate 01291 # should be left unset. 01292 # 01293 # Control attributes that can be set to "yes" to force actions: 01294 # 01295 # @li @c reissue: 01296 # Not implemented, may be removed from protocol. 01297 # 01298 # @subsection repository_obj <repository/> object 01299 # 01300 # The @c <repository/> %object represents the RPKI engine's view of a 01301 # particular publication repository used by the current @c <self/> %object. 01302 # 01303 # Every @c <repository/> %object has a repository_id, which must be 01304 # specified for the "get", "set", and "destroy" actions. Every 01305 # @c <repository/> also has a self_id attribute which indicates the @c <self/> 01306 # %object with which this @c <repository/> %object is associated. 01307 # 01308 # Payload data which can be configured in a @c <repository/> %object: 01309 # 01310 # @li @c peer_contact_uri (attribute): 01311 # HTTPS URI used to contact this repository. 01312 # 01313 # @li @c bpki_cms_cert (element): 01314 # BPKI CMS CA certificate for this @c <repository/>. This is used as part 01315 # of the certificate chain when validating incoming CMS messages If 01316 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01317 # certificate should be issued by the bpki_cms_glue certificate; 01318 # otherwise, the bpki_cms_cert certificate should be issued by the 01319 # bpki_cert certificate in the @c <self/> %object. 01320 # 01321 # @li @c bpki_cms_glue (element): 01322 # Another BPKI CMS CA certificate for this @c <repository/>, usually not 01323 # needed. Certain pathological cross-certification cases require a 01324 # two-certificate chain due to issuer name conflicts. If used, the 01325 # bpki_cms_glue certificate should be the issuer of the 01326 # bpki_cms_cert certificate and should be issued by the bpki_cert 01327 # certificate in the @c <self/> %object; if not needed, the 01328 # bpki_cms_glue certificate should be left unset. 01329 # 01330 # @li @c bpki_https_cert (element): 01331 # BPKI HTTPS CA certificate for this @c <repository/>. This is like the 01332 # bpki_cms_cert %object, only used for validating incoming TLS 01333 # messages rather than CMS. 01334 # 01335 # @li @c bpki_cms_glue (element): 01336 # Another BPKI HTTPS CA certificate for this @c <repository/>, usually not 01337 # needed. This is like the bpki_cms_glue certificate, only used for 01338 # validating incoming TLS messages rather than CMS. 01339 # 01340 # At present there are no control attributes for @c <repository/> %objects. 01341 # 01342 # @subsection route_origin_obj <route_origin/> object 01343 # 01344 # The @c <route_origin/> %object is a kind of prototype for a ROA. It 01345 # contains all the information needed to generate a ROA once the RPKI 01346 # engine obtains the appropriate RPKI certificates from its parent(s). 01347 # 01348 # Note that a @c <route_origin/> %object represents a ROA to be generated on 01349 # behalf of @c <self/>, not on behalf of a @c <child/>. Thus, a hosted entity 01350 # that has no children but which does need to generate ROAs would be 01351 # represented by a hosted @c <self/> with no @c <child/> %objects but one or 01352 # more @c <route_origin/> %objects. While lumping ROA generation in with 01353 # the other RPKI engine activities may seem a little odd at first, it's 01354 # a natural consequence of the design requirement that the RPKI daemon 01355 # never transmit private keys across the network in any form; given this 01356 # requirement, the RPKI engine that holds the private keys for an RPKI 01357 # certificate must also be the engine which generates any ROAs that 01358 # derive from that RPKI certificate. 01359 # 01360 # The precise content of the @c <route_origin/> has changed over time as 01361 # the underlying ROA specification has changed. The current 01362 # implementation as of this writing matches what we expect to see in 01363 # draft-ietf-sidr-roa-format-03, once it is issued. In particular, note 01364 # that the exactMatch boolean from the -02 draft has been replaced by 01365 # the prefix and maxLength encoding used in the -03 draft. 01366 # 01367 # Payload data which can be configured in a @c <route_origin/> %object: 01368 # 01369 # @li @c as_number (attribute): 01370 # Autonomous System Number (ASN) to place in the generated ROA. A 01371 # single ROA can only grant authorization to a single ASN; multiple 01372 # ASNs require multiple ROAs, thus multiple @c <route_origin/> %objects. 01373 # 01374 # @li @c ipv4 (attribute): 01375 # %List of IPv4 prefix and maxLength values, see below for format. 01376 # 01377 # @li @c ipv6 (attribute): 01378 # %List of IPv6 prefix and maxLength values, see below for format. 01379 # 01380 # Control attributes that can be set to "yes" to force actions: 01381 # 01382 # @li @c suppress_publication: 01383 # Not implemented, may be removed from protocol. 01384 # 01385 # The lists of IPv4 and IPv6 prefix and maxLength values are represented 01386 # as comma-separated text strings, with no whitespace permitted. Each 01387 # entry in such a string represents a single prefix/maxLength pair. 01388 # 01389 # ABNF for these address lists: 01390 # 01391 # @verbatim 01392 # 01393 # <ROAIPAddress> ::= <address> "/" <prefixlen> [ "-" <max_prefixlen> ] 01394 # ; Where <max_prefixlen> defaults to the same 01395 # ; value as <prefixlen>. 01396 # 01397 # <ROAIPAddressList> ::= <ROAIPAddress> *( "," <ROAIPAddress> ) 01398 # 01399 # @endverbatim 01400 # 01401 # For example, @c "10.0.1.0/24-32,10.0.2.0/24", which is a shorthand 01402 # form of @c "10.0.1.0/24-32,10.0.2.0/24-24". 01403 # 01404 # @section irdb_queries Operations initiated by the RPKI engine 01405 # 01406 # The left-right protocol also includes queries from the RPKI engine 01407 # back to the IRDB. These queries do not follow the message-passing 01408 # pattern used in the IRBE-initiated part of the protocol. Instead, 01409 # there's a single query back to the IRDB, with a corresponding 01410 # response. The CMS and HTTPS encoding are the same as in the rest of 01411 # the protocol, but the BPKI certificates will be different as the 01412 # back-queries and responses form a separate communication channel. 01413 # 01414 # @subsection list_resources_msg <list_resources/> messages 01415 # 01416 # The @c <list_resources/> query and response allow the RPKI engine to ask 01417 # the IRDB for information about resources assigned to a particular 01418 # child. The query must include both a @c "self_id" attribute naming 01419 # the @c <self/> that is making the request and also a @c "child_id" 01420 # attribute naming the child that is the subject of the query. The 01421 # query and response also allow an optional @c "tag" attribute of the 01422 # same form used elsewhere in this protocol, to allow batching. 01423 # 01424 # A @c <list_resources/> response includes the following attributes, along 01425 # with the @c tag (if specified), @c self_id, and @c child_id copied 01426 # from the request: 01427 # 01428 # @li @c valid_until: 01429 # A timestamp indicating the date and time at which certificates 01430 # generated by the RPKI engine for these data should expire. The 01431 # timestamp is expressed as an XML @c xsd:dateTime, must be 01432 # expressed in UTC, and must carry the "Z" suffix indicating UTC. 01433 # 01434 # @li @c subject_name: 01435 # An optional text string naming the child. Not currently used. 01436 # 01437 # @li @c asn: 01438 # A %list of autonomous sequence numbers, expressed as a 01439 # comma-separated sequence of decimal integers with no whitespace. 01440 # 01441 # @li @c ipv4: 01442 # A %list of IPv4 address prefixes and ranges, expressed as a 01443 # comma-separated %list of prefixes and ranges with no whitespace. 01444 # See below for format details. 01445 # 01446 # @li @c ipv6: 01447 # A %list of IPv6 address prefixes and ranges, expressed as a 01448 # comma-separated %list of prefixes and ranges with no whitespace. 01449 # See below for format details. 01450 # 01451 # Entries in a %list of address prefixes and ranges can be either 01452 # prefixes, which are written in the usual address/prefixlen notation, 01453 # or ranges, which are expressed as a pair of addresses denoting the 01454 # beginning and end of the range, written in ascending order separated 01455 # by a single "-" character. This format is superficially similar to 01456 # the format used for prefix and maxLength values in the @c <route_origin/> 01457 # %object, but the semantics differ: note in particular that 01458 # @c <route_origin/> %objects don't allow ranges, while @c <list_resources/> 01459 # messages don't allow a maxLength specification. 01460 # 01461 # @section left_right_error_handling Error handling 01462 # 01463 # Error in this protocol are handled at two levels. 01464 # 01465 # Since all messages in this protocol are conveyed over HTTPS 01466 # connections, basic errors are indicated via the HTTP response code. 01467 # 4xx and 5xx responses indicate that something bad happened. Errors 01468 # that make it impossible to decode a query or encode a response are 01469 # handled in this way. 01470 # 01471 # Where possible, errors will result in a @c <report_error/> message which 01472 # takes the place of the expected protocol response message. 01473 # @c <report_error/> messages are CMS-signed XML messages like the rest of 01474 # this protocol, and thus can be archived to provide an audit trail. 01475 # 01476 # @c <report_error/> messages only appear in replies, never in queries. 01477 # The @c <report_error/> message can appear on either the "forward" (IRBE 01478 # as client of RPKI engine) or "back" (RPKI engine as client of IRDB) 01479 # communication channel. 01480 # 01481 # The @c <report_error/> message includes an optional @c "tag" attribute to 01482 # assist in matching the error with a particular query when using 01483 # batching, and also includes a @c "self_id" attribute indicating the 01484 # @c <self/> that issued the error. 01485 # 01486 # The error itself is conveyed in the @c error_code (attribute). The 01487 # value of this attribute is a token indicating the specific error that 01488 # occurred. At present this will be the name of a Python exception; the 01489 # production version of this protocol will nail down the allowed error 01490 # tokens here, probably in the RelaxNG schema. 01491 # 01492 # The body of the @c <report_error/> element itself is an optional text 01493 # string; if present, this is debugging information. At present this 01494 # capabilty is not used, debugging information goes to syslog. 01495 01496 ## @page Publication Publication protocol 01497 # 01498 # The %publication protocol is really two separate client/server 01499 # protocols, between different parties. The first is a configuration 01500 # protocol for an IRBE to use to configure a %publication engine, 01501 # the second is the interface by which authorized clients request 01502 # %publication of specific objects. 01503 # 01504 # Much of the architecture of the %publication protocol is borrowed 01505 # from the @link Left-right left-right protocol: @endlink like the 01506 # left-right protocol, the %publication protocol uses CMS-wrapped XML 01507 # over HTTPS with the same eContentType OID and the same HTTPS 01508 # content-type, and the overall style of the XML messages is very 01509 # similar to the left-right protocol. All operations allow an 01510 # optional "tag" attribute to allow batching. 01511 # 01512 # The %publication engine operates a single HTTPS server which serves 01513 # both of these subprotocols. The two subprotocols share a single 01514 # server port, but use distinct URLs to allow demultiplexing. 01515 # 01516 # @section Terminology 01517 # 01518 # @li @em IRBE: Internet Registry Back End 01519 # 01520 # @li @em IRDB: Internet Registry Data Base 01521 # 01522 # @li @em BPKI: Business PKI 01523 # 01524 # @li @em RPKI: Resource PKI 01525 # 01526 # @section Publication-control Publication control subprotocol 01527 # 01528 # The control subprotocol reuses the message-passing design of the 01529 # left-right protocol. Configured objects support the "create", "set", 01530 # "get", "list", and "destroy" actions, or a subset thereof when the 01531 # full set of actions doesn't make sense. 01532 # 01533 # @subsection config_obj <config/> object 01534 # 01535 # The <config/> %object allows configuration of data that apply to the 01536 # entire %publication server rather than a particular client. 01537 # 01538 # There is exactly one <config/> %object in the %publication server, and 01539 # it only supports the "set" and "get" actions -- it cannot be created 01540 # or destroyed. 01541 # 01542 # Payload data which can be configured in a <config/> %object: 01543 # 01544 # @li @c bpki_crl (element): 01545 # This is the BPKI CRL used by the %publication server when 01546 # signing the CMS wrapper on responses in the %publication 01547 # subprotocol. As the CRL must be updated at regular intervals, 01548 # it's not practical to restart the %publication server when the 01549 # BPKI CRL needs to be updated. The BPKI model doesn't require 01550 # use of a BPKI CRL between the IRBE and the %publication server, 01551 # so we can use the %publication control subprotocol to update the 01552 # BPKI CRL. 01553 # 01554 # @subsection client_obj <client/> object 01555 # 01556 # The <client/> %object represents one client authorized to use the 01557 # %publication server. 01558 # 01559 # The <client/> %object supports the full set of "create", "set", "get", 01560 # "list", and "destroy" actions. Each client has a "client_id" 01561 # attribute, which is used in responses and must be specified in "set", 01562 # "get", or "destroy" actions. 01563 # 01564 # Payload data which can be configured in a <client/> %object: 01565 # 01566 # @li @c base_uri (attribute): 01567 # This is the base URI below which this client is allowed to publish 01568 # data. The %publication server may impose additional constraints in 01569 # the case of a child publishing beneath its parent. 01570 # 01571 # @li @c bpki_cert (element): 01572 # BPKI CA certificate for this <client/>. This is used as part of 01573 # the certificate chain when validating incoming TLS and CMS 01574 # messages. If the bpki_glue certificate is in use (below), the 01575 # bpki_cert certificate should be issued by the bpki_glue 01576 # certificate; otherwise, the bpki_cert certificate should be issued 01577 # by the %publication engine's bpki_ta certificate. 01578 # 01579 # @li @c bpki_glue (element): 01580 # Another BPKI CA certificate for this <client/>, usually not 01581 # needed. Certain pathological cross-certification cases require a 01582 # two-certificate chain due to issuer name conflicts. If used, the 01583 # bpki_glue certificate should be the issuer of the bpki_cert 01584 # certificate and should be issued by the %publication engine's 01585 # bpki_ta certificate; if not needed, the bpki_glue certificate 01586 # should be left unset. 01587 # 01588 # @section Publication-publication Publication subprotocol 01589 # 01590 # The %publication subprotocol is structured somewhat differently from 01591 # the %publication control protocol. Objects in the %publication 01592 # subprotocol represent objects to be published or objects to be 01593 # withdrawn from %publication. Each kind of %object supports two actions: 01594 # "publish" and "withdraw". In each case the XML element representing 01595 # hte %object to be published or withdrawn has a "uri" attribute which 01596 # contains the %publication URI. For "publish" actions, the XML element 01597 # body contains the DER %object to be published, encoded in Base64; for 01598 # "withdraw" actions, the XML element body is empty. 01599 # 01600 # In theory, the detailed access control for each kind of %object might 01601 # be different. In practice, as of this writing, access control for all 01602 # objects is a simple check that the client's @c "base_uri" is a leading 01603 # substring of the %publication URI. Details of why access control might 01604 # need to become more complicated are discussed in a later section. 01605 # 01606 # @subsection certificate_obj <certificate/> object 01607 # 01608 # The <certificate/> %object represents an RPKI certificate to be 01609 # published or withdrawn. 01610 # 01611 # @subsection crl_obj <crl/> object 01612 # 01613 # The <crl/> %object represents an RPKI CRL to be published or withdrawn. 01614 # 01615 # @subsection manifest_obj <manifest/> object 01616 # 01617 # The <manifest/> %object represents an RPKI %publication %manifest to be 01618 # published or withdrawn. 01619 # 01620 # Note that part of the reason for the batching support in the 01621 # %publication protocol is because @em every %publication or withdrawal 01622 # action requires a new %manifest, thus every %publication or withdrawal 01623 # action will involve at least two objects. 01624 # 01625 # @subsection roa_obj <roa/> object 01626 # 01627 # The <roa/> %object represents a ROA to be published or withdrawn. 01628 # 01629 # @section publication_error_handling Error handling 01630 # 01631 # Error in this protocol are handled at two levels. 01632 # 01633 # Since all messages in this protocol are conveyed over HTTPS 01634 # connections, basic errors are indicated via the HTTP response code. 01635 # 4xx and 5xx responses indicate that something bad happened. Errors 01636 # that make it impossible to decode a query or encode a response are 01637 # handled in this way. 01638 # 01639 # Where possible, errors will result in a <report_error/> message which 01640 # takes the place of the expected protocol response message. 01641 # <report_error/> messages are CMS-signed XML messages like the rest of 01642 # this protocol, and thus can be archived to provide an audit trail. 01643 # 01644 # <report_error/> messages only appear in replies, never in 01645 # queries. The <report_error/> message can appear in both the 01646 # control and publication subprotocols. 01647 # 01648 # The <report_error/> message includes an optional @c "tag" attribute to 01649 # assist in matching the error with a particular query when using 01650 # batching. 01651 # 01652 # The error itself is conveyed in the @c error_code (attribute). The 01653 # value of this attribute is a token indicating the specific error that 01654 # occurred. At present this will be the name of a Python exception; the 01655 # production version of this protocol will nail down the allowed error 01656 # tokens here, probably in the RelaxNG schema. 01657 # 01658 # The body of the <report_error/> element itself is an optional text 01659 # string; if present, this is debugging information. At present this 01660 # capabilty is not used, debugging information goes to syslog. 01661 # 01662 # @section publication_access_control Additional access control considerations. 01663 # 01664 # As detailed above, the %publication protocol is trivially simple. This 01665 # glosses over two bits of potential complexity: 01666 # 01667 # @li In the case where parent and child are sharing a repository, we'd 01668 # like to nest child under parent, because testing has demonstrated 01669 # that even on relatively slow hardware the delays involved in 01670 # setting up separate rsync connections tend to dominate 01671 # synchronization time for relying parties. 01672 # 01673 # @li The repository operator might also want to do some checks to 01674 # assure itself that what it's about to allow the RPKI engine to 01675 # publish is not dangerous toxic waste. 01676 # 01677 # The up-down protocol includes a mechanism by which a parent can 01678 # suggest a %publication URI to each of its children. The children are 01679 # not required to accept this hint, and the children must make separate 01680 # arrangements with the repository operator (who might or might not be 01681 # the same as the entity that hosts the children's RPKI engine 01682 # operations) to use the suggested %publication point, but if everything 01683 # works out, this allows children to nest cleanly under their parents 01684 # %publication points, which helps reduce synchronization time for 01685 # relying parties. 01686 # 01687 # In this case, one could argue that the %publication server is 01688 # responsible for preventing one of its clients (the child in the above 01689 # description) from stomping on data published by another of its clients 01690 # (the parent in the above description). This goes beyond the basic 01691 # access check and requires the %publication server to determine whether 01692 # the parent has given its consent for the child to publish under the 01693 # parent. Since the RPKI certificate profile requires the child's 01694 # %publication point to be indicated in an SIA extension in a certificate 01695 # issued by the parent to the child, the %publication engine can infer 01696 # this permission from the parent's issuance of a certificate to the 01697 # child. Since, by definition, the parent also uses this %publication 01698 # server, this is an easy check, as the %publication server should 01699 # already have the parent's certificate available by the time it needs 01700 # to check the child's certificate. 01701 # 01702 # The previous paragraph only covers a "publish" action for a 01703 # <certificate/> %object. For "publish" actions on other 01704 # objects, the %publication server would need to trace permission back 01705 # to the certificate issued by the parent; for "withdraw" actions, 01706 # the %publication server would have to perform the same checks it 01707 # would perform for a "publish" action, using the current published 01708 # data before withdrawing it. The latter in turn implies an ordering 01709 # constraint on "withdraw" actions in order to preserve the data 01710 # necessary for these access control decisions; as this may prove 01711 # impractical, the %publication server may probably need to make 01712 # periodic sweeps over its published data looking for orphaned 01713 # objects, but that's probably a good idea anyway. 01714 # 01715 # Note that, in this %publication model, any agreement that the 01716 # repository makes to publish the RPKI engine's output is conditional 01717 # upon the %object to be published passing whatever access control checks 01718 # the %publication server imposes. 01719 01720 ## @page rpkid-sql rpkid SQL schema 01721 # 01722 # @dotfile rpkid.dot "Diagram of rpkid.sql" 01723 # 01724 # @verbinclude rpkid.sql 01725 01726 ## @page pubd-sql pubd SQL Schema 01727 # 01728 # @dotfile pubd.dot "Diagram of pubd.sql" 01729 # 01730 # @verbinclude pubd.sql 01731 01732 ## @page irdbd-sql irdbd SQL Schema 01733 # 01734 # @dotfile irdbd.dot "Diagram of irdbd.sql" 01735 # 01736 # @verbinclude irdbd.sql 01737 01738 ## @page bpki-digraph rpkid BPKI Diagram 01739 # 01740 # @dot 01741 # // Color code: 01742 # // Black: Hosting entity 01743 # // Blue: Hosted entity 01744 # // Red: Cross-certified peer 01745 # // 01746 # // Shape code: 01747 # // Octagon: TA 01748 # // Diamond: CA 01749 # // Record: EE 01750 # 01751 # digraph bpki_symmetric { 01752 # splines = true; ratio = fill; 01753 # 01754 # // Hosting entity 01755 # node [ color = black, shape = record ]; 01756 # TA [ shape = octagon ]; 01757 # rpkid [ label = "rpkid|{HTTPS server|HTTPS left-right client|CMS left-right}" ]; 01758 # irdbd [ label = "irdbd|{HTTPS left-right server|CMS left-right}" ]; 01759 # irbe [ label = "IRBE|{HTTPS left-right client|CMS left-right}" ]; 01760 # 01761 # // Hosted entities 01762 # node [ color = blue, fontcolor = blue ]; 01763 # Alice_CA [ shape = diamond ]; 01764 # Alice_EE [ label = "Alice\nBSC EE|{HTTPS up-down client|CMS up-down}" ]; 01765 # Ellen_CA [ shape = diamond ]; 01766 # Ellen_EE [ label = "Ellen\nBSC EE|{HTTPS up-down client|CMS up-down}" ]; 01767 # 01768 # // Peers 01769 # node [ color = red, fontcolor = red, shape = diamond ]; 01770 # Bob_CA; 01771 # Carol_CA; 01772 # Dave_CA; 01773 # Frank_CA; 01774 # Ginny_CA; 01775 # Harry_CA; 01776 # node [ shape = record ]; 01777 # Bob_EE [ label = "Bob\nEE|{HTTPS up-down|CMS up-down}" ]; 01778 # Carol_EE [ label = "Carol\nEE|{HTTPS up-down|CMS up-down}" ]; 01779 # Dave_EE [ label = "Dave\nEE|{HTTPS up-down|CMS up-down}" ]; 01780 # Frank_EE [ label = "Frank\nEE|{HTTPS up-down|CMS up-down}" ]; 01781 # Ginny_EE [ label = "Ginny\nEE|{HTTPS up-down|CMS up-down}" ]; 01782 # Harry_EE [ label = "Bob\nEE|{HTTPS up-down|CMS up-down}" ]; 01783 # 01784 # edge [ color = black, style = solid ]; 01785 # TA -> Alice_CA; 01786 # TA -> Ellen_CA; 01787 # 01788 # edge [ color = black, style = dotted ]; 01789 # TA -> rpkid; 01790 # TA -> irdbd; 01791 # TA -> irbe; 01792 # 01793 # edge [ color = blue, style = solid ]; 01794 # Alice_CA -> Bob_CA; 01795 # Alice_CA -> Carol_CA; 01796 # Alice_CA -> Dave_CA; 01797 # Ellen_CA -> Frank_CA; 01798 # Ellen_CA -> Ginny_CA; 01799 # Ellen_CA -> Harry_CA; 01800 # 01801 # edge [ color = blue, style = dotted ]; 01802 # Alice_CA -> Alice_EE; 01803 # Ellen_CA -> Ellen_EE; 01804 # 01805 # edge [ color = red, style = solid ]; 01806 # Bob_CA -> Bob_EE; 01807 # Carol_CA -> Carol_EE; 01808 # Dave_CA -> Dave_EE; 01809 # Frank_CA -> Frank_EE; 01810 # Ginny_CA -> Ginny_EE; 01811 # Harry_CA -> Harry_EE; 01812 # } 01813 # @enddot 01814 # 01815 # Black objects belong to the hosting entity, blue objects belong to 01816 # the hosted entities, red objects are cross-certified objects from 01817 # peers. The arrows indicate certificate issuance: solid arrows are 01818 # the ones that this RPKI engine will care about during certificate 01819 # validation, dotted arrows show the origin of EE certificates this 01820 # engine uses to sign things. 01821 # 01822 # There's one nasty bit here: it's not possible to use exactly the 01823 # same BPKI keys and certificates for HTTPS and CMS. The reason for 01824 # this is simple: each hosted entity has its own BPKI, as does the 01825 # hosting entity, but the HTTPS listener is shared. The only ways to 01826 # avoid this would be to use separate listeners for each hosted 01827 # entity, which scales poorly, or to rely on the TLS "Server Name 01828 # Indication" extension (RFC 4366 3.1) which is not yet widely 01829 # implemented. 01830 # 01831 # The certificate tree looks complicated, but the set of certificates 01832 # needed to build a particular validation chain is obvious, again 01833 # excepting the HTTPS server case, where client certificate is the 01834 # first hint that the engine has of the client's identity, so the 01835 # server must be prepared to accept any current client certificate.