00001 ## @file 00002 # @details 00003 # Documentation sourc, expressed as Python comments to make Doxygen happy. 00004 # 00005 # $Id: __doc__.py.in 3221 2010-04-20 21:14:18Z sra $ 00006 # 00007 # Copyright (C) 2009-2010 Internet Systems Consortium ("ISC") 00008 # 00009 # Permission to use, copy, modify, and distribute this software for any 00010 # purpose with or without fee is hereby granted, provided that the above 00011 # copyright notice and this permission notice appear in all copies. 00012 # 00013 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 00014 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00015 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 00016 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00017 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00018 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00019 # PERFORMANCE OF THIS SOFTWARE. 00020 # 00021 # Portions copyright (C) 2007--2008 American Registry for Internet Numbers ("ARIN") 00022 # 00023 # Permission to use, copy, modify, and distribute this software for any 00024 # purpose with or without fee is hereby granted, provided that the above 00025 # copyright notice and this permission notice appear in all copies. 00026 # 00027 # THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH 00028 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00029 # AND FITNESS. IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT, 00030 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00031 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00032 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00033 # PERFORMANCE OF THIS SOFTWARE. 00034 00035 ## @mainpage RPKI Engine Reference Manual 00036 # 00037 # This collection of Python modules implements a prototype of the 00038 # RPKI Engine. This is a work in progress. 00039 # 00040 # See http://viewvc.hactrn.net/subvert-rpki.hactrn.net/ for code and 00041 # design documents. 00042 # 00043 # The RPKI Engine is an implementation of the production-side tools 00044 # for generating certificates, CRLs, and ROAs. The 00045 # <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rcynic/">relying party tools</a> 00046 # are a separate (and much simpler) package. 00047 # 00048 # The Subversion repository for the entire project is available for 00049 # (read-only) anonymous access at http://subvert-rpki.hactrn.net/. 00050 # 00051 # The documentation you're reading is generated automatically by 00052 # Doxygen from comments and documentation in 00053 # <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rpkid/rpki/">the code</a>. 00054 # 00055 # Besides the automatically-generated code documentation, this manual 00056 # also includes documentation of the overall package: 00057 # 00058 # @li @subpage Overview "Overview of the tools" 00059 # 00060 # @li @subpage Installation "Installation instructions" 00061 # 00062 # @li @subpage Configuration "Configuration instructions" 00063 # 00064 # @li @subpage MySQL-Setup "MySQL setup instructions" 00065 # 00066 # @li The @subpage myrpki "myrpki tool" 00067 # 00068 # @li A description of the @subpage Left-Right "left-right protocol" 00069 # 00070 # @li A description of the @subpage Publication "publication protocol" 00071 # 00072 # @li A description of the @subpage bpki-model "BPKI model" 00073 # used to secure the up-down, left-right, and %publication protocols 00074 # 00075 # @li A description of the several @subpage sql-schemas "SQL database schemas" 00076 # 00077 # This work was funded from 2006 through 2008 by <a 00078 # href="http://www.arin.net/">ARIN</a>, in collaboration with the 00079 # other Regional Internet Registries. Current work is funded by DHS. 00080 00081 ## @page Overview Overview 00082 # 00083 # @section Terminology Terminology 00084 # 00085 # A few special terms that appear often enough in code or 00086 # documentation that they need explaining. 00087 # 00088 # @todo 00089 # These explanations should be fleshed out properly. 00090 # 00091 # @par IRBE: 00092 # Internet Registry Back End. 00093 # 00094 # @par IRDB: 00095 # Internet Registry Data Base. 00096 # 00097 # @par BPKI: 00098 # Business PKI. 00099 # 00100 # @par RPKI: 00101 # Resource PKI. 00102 # 00103 # 00104 # @section Programs Programs 00105 # 00106 # At present the package is intended to be run out of the @c rpkid/ 00107 # directory. 00108 # 00109 # In addition to the library routines in the @c rpkid/rpki/ directory, 00110 # the package includes the following programs: 00111 # 00112 # @li @ref rpkid "@c rpkid": 00113 # The main RPKI engine daemon. 00114 # 00115 # @li @ref pubd "@c pubd": 00116 # The publication engine daemon. 00117 # 00118 # @li @ref rootd "@c rootd" 00119 # A separate daemon for handling the root of an RPKI 00120 # certificate tree. This is essentially a stripped down 00121 # version of rpkid with no SQL database, no left-right 00122 # protocol implementation, and only the parent side of 00123 # the up-down protocol. It's separate because the root 00124 # is a special case in several ways and it was simpler 00125 # to keep the special cases out of the main daemon. 00126 # 00127 # @li @ref irdbd "@c irdbd": 00128 # A sample implementation of an IR database daemon. 00129 # rpkid calls into this to perform lookups via the 00130 # left-right protocol. 00131 # 00132 # @li @ref smoketest "@c smoketest": 00133 # A test tool for running a collection of rpkid and irdb 00134 # instances under common control, driven by a unified 00135 # test script. 00136 # 00137 # @li @ref yamltest "@c yamltest": 00138 # Another test tool which takes the same input format as 00139 # @c smoketest.py, but with slightly different purpose. 00140 # @c smoketest.py is intended to support regression tests, 00141 # while @c yamltest.py is intended for automated testing 00142 # of something closer to a real operational environment. 00143 # There's a fair amount of code duplication between the 00144 # two, and at some point they will probably be merged 00145 # into a single program that supports both modes of 00146 # operation. 00147 # 00148 # Most of these programs take configuration files in a common format 00149 # similar to that used by the OpenSSL command line tool. The test 00150 # programs also take input in YAML format to drive the tests. Runs of 00151 # the @c yamltest test tool will generate a fairly complete set 00152 # configuration files which may be useful as examples. 00153 # 00154 # Basic operation consists of creating the appropriate MySQL databases 00155 # (see @ref MySQL-Setup "MySQL Setup"), configuring relationships 00156 # between parents and children and between publication clients and 00157 # repositories (see @ref MyRPKI "The myrpki tool"), starting @c rpkid, 00158 # @c pubd, @c rootd, and @c irdbd, and using the left-right and 00159 # publication control protocols (see @ref MyRPKI "The myrpki tool") to 00160 # set up rpkid's and pubd's internal state. All other operations 00161 # should occur either as a result of cron events or as a result of 00162 # incoming left-right and up-down protocol requests. 00163 # 00164 # The core programs are all event-driven, and are (in theory) capable 00165 # of supporting an arbitrary number of hosted RPKI engines to run in a 00166 # single rpkid instance, up to the performance limits of the underlying 00167 # hardware. 00168 # 00169 # At present the daemon programs all run in foreground, that is, the 00170 # daemons themselves make no attempt to put themselves in background. 00171 # The easiest way to run the servers is to run the @c start_servers 00172 # script, which examines your @c myrpki.conf file and starts the 00173 # appropriate servers in background using @c myrpki.conf as the 00174 # configuration file for each server as well. 00175 # 00176 # If you prefer, you can run each server by hand instead of using the 00177 # script, eg, using Bourne shell syntax to run rpkid in background: 00178 # 00179 # @verbatim 00180 # $ python rpkid.py & 00181 # $ echo >rpkid.pid "$!" 00182 # @endverbatim 00183 # 00184 # All of the daemons use syslog by default. You can change this by 00185 # running either the servers themselves or the @c start_servers script 00186 # with the "-d" option. Used as an argument to a server directly, 00187 # "-d" causes that server to log to @c stderr instead of to syslog. 00188 # Used as an argument to @c start_servers, "-d" starts each of the 00189 # servers with "-d" while redirecting @c stderr from each server to a 00190 # separate log file. This is intended primarily for debugging. 00191 # 00192 # Some of the options that the several daemons take are common to all 00193 # daemons. Which daemon they affect depends only on which sections of 00194 # which config files they are in. See 00195 # @ref CommonOptions "Common Options" 00196 # for details. 00197 # 00198 # @subsection rpkid rpkid 00199 # 00200 # rpkid is the main RPKI engine daemon. Configuration of rpkid is a 00201 # two step process: a %config file to bootstrap rpkid to the point 00202 # where it can speak using the @ref Left-Right "left-right protocol", 00203 # followed by dynamic configuration via the left-right protocol. The 00204 # latter stage is handled by the @c myrpki tool. 00205 # 00206 # rpkid stores dynamic data in an SQL database, which must have been 00207 # created for it, as explained in the 00208 # @ref Installation "Installation Guide". 00209 # 00210 # 00211 # @subsection pubd pubd 00212 # 00213 # pubd is the publication daemon. It implements the server side of 00214 # the publication protocol, and is used by rpkid to publish the 00215 # certificates and other objects that rpkid generates. 00216 # 00217 # pubd is separate from rpkid for two reasons: 00218 # 00219 # @li The hosting model allows entities which choose to run their own 00220 # copies of rpkid to publish their output under a common 00221 # publication point. In general, encouraging shared publication 00222 # services where practical is a good thing for relying parties, 00223 # as it will speed up rcynic synchronization time. 00224 # 00225 # @li The publication server has to run on (or at least close to) the 00226 # publication point itself, which in turn must be on a publically 00227 # reachable server to be useful. rpkid, on the other hand, need 00228 # only be reachable by the IRBE and its children in the RPKI tree. 00229 # rpkid is a much more complex piece of software than pubd, so in 00230 # some situations it might make sense to wrap tighter firewall 00231 # constraints around rpkid than would be practical if rpkid and 00232 # pubd were a single program. 00233 # 00234 # pubd stores dynamic data in an SQL database, which must have been 00235 # created for it, as explained in the 00236 # @ref Installation "Installation Guide". pubd also 00237 # stores the published objects themselves as disk files in a 00238 # configurable location which should correspond to an appropriate 00239 # module definition in rsync.conf; see the 00240 # @ref Configuration "Configuration Guide" 00241 # for details. 00242 # 00243 # 00244 # @subsection rootd rootd 00245 # 00246 # rootd is a stripped down implmenetation of (only) the server side of 00247 # the up-down protocol. It's a separate program because the root 00248 # certificate of an RPKI certificate tree requires special handling 00249 # and may also require a special handling policy. rootd is a simple 00250 # implementation intended for test use, it's not suitable for use in a 00251 # production system. All configuration comes via the %config file; 00252 # see the 00253 # @ref Configuration "Configuration Guide" 00254 # for details. 00255 # 00256 # 00257 # @subsection irdbd irdbd 00258 # 00259 # irdbd is a sample implemntation of the server side of the IRDB 00260 # callback subset of the left-right protocol. In production use this 00261 # service is a function of the IRBE stub; irdbd may be suitable for 00262 # production use in simple cases, but an IR with a complex IRDB may need 00263 # to extend or rewrite irdbd. 00264 # 00265 # irdbd requires a pre-populated database to represent the IR's 00266 # customers. irdbd expects this database to use 00267 # @ref irdbd-sql "the SQL schema defined in rpkid/irdbd.sql". 00268 # Once this database has been populated, the IRBE stub needs to create 00269 # the appropriate objects in rpkid's database via the control subset 00270 # of the left-right protocol, and store the linkage handles (foreign 00271 # keys into rpkid's database) in the IRDB. See the 00272 # @ref Installation "Installation Guide" 00273 # and the 00274 # @ref MySQL-Setup "MySQL setup instructions" 00275 # for details. 00276 # 00277 # 00278 # @subsection smoketest smoketest 00279 # 00280 # smoketest is a test harness to set up and run a collection of rpkid and 00281 # irdbd instances under scripted control. 00282 # 00283 # Unlike the programs described above, smoketest takes two configuration 00284 # files in different languages. The first configuration file uses the 00285 # same syntax as the above configuration files but is completely 00286 # optional. The second configuration file is the test script, which is 00287 # encoded using the YAML serialization language (see 00288 # http://www.yaml.org/ for more information on YAML). The YAML script 00289 # is not optional, as it describes the test layout. smoketest is designed 00290 # to support running a fairly wide set of test configurations as canned 00291 # scripts without writing any new control code. The intent is to make 00292 # it possible to write meaningful regression tests. 00293 # 00294 # See @ref smoketestconf "smoketest.conf" for what can go into the 00295 # (optional) first configuration file. 00296 # 00297 # See @ref smoketestyaml "smoketest.yaml" for what goes into the 00298 # (required) second configuration file. 00299 # 00300 # 00301 # @subsection yamltest yamltest 00302 # 00303 # yamltest is another test harness to set up and run a collection of 00304 # rpkid and irdbd instances under scripted control. It is similar in 00305 # many ways to @ref smoketest "@c smoketest", and in fact uses the 00306 # same YAML test description language, but its purpose is different: 00307 # @c smoketest runs a particular test scenario through a series of 00308 # changes, then shuts it down; @c yamltest, on the other hand, sets up 00309 # a test network using the same tools that a real user would 00310 # (principally the @c myrpki tool), and leaves the test running 00311 # indefinitely. 00312 # 00313 # @c yamltest grew out of @c smoketest and the two probably should be 00314 # merged back into a single tool which supports both kinds of testing. 00315 # 00316 # 00317 # @section further-reading Further Reading 00318 # 00319 # If you're interested in this package you might also be interested 00320 # in: 00321 # 00322 # @li <a href="http://viewvc.hactrn.net/subvert-rpki.hactrn.net/rcynic/">The rcynic validation tool</a> 00323 # 00324 # @li <a href="http://www.hactrn.net/opaque/rcynic.html">A live sample of rcynic's summary output</a> 00325 00326 ## @page Installation Installation Guide 00327 # 00328 # Installation instructions for rpkid et al. These are the 00329 # production-side RPKI tools, for Internet Registries (RIRs, LIRs, 00330 # etc). See the "rcynic" program for relying party tools. 00331 # 00332 # rpkid is a set of Python modules supporting generation and maintenance 00333 # of resource certificates. Most of the code is in the rpkid/rpki/ 00334 # directory. rpkid itself is a relatively small program that calls the 00335 # library modules. There are several other programs that make use of 00336 # the same libraries, as well as a collection of test programs. 00337 # 00338 # At present the package is intended to be run out of its build 00339 # directory. Setting up proper installation in a system area using the 00340 # Python distutils package would likely not be very hard but has not yet 00341 # been done. 00342 # 00343 # Note that initial development of this code has been on FreeBSD, so 00344 # installation will probably be easiest on FreeBSD. 00345 # 00346 # Before attempting to build the package, you need to install any 00347 # missing prerequisites. Note that the Python code requires Python 00348 # version 2.5 or 2.6. rpkid et al are mostly self-contained, but do 00349 # require a small number of external packages to run. 00350 # 00351 # <ul> 00352 # <li> 00353 # If your Python installation does not already include the sources 00354 # files needed to compile new Python extension modules, you will 00355 # need to install whatever package does include those source 00356 # files. The need for and name of this package varies from system 00357 # to system. On FreeBSD, the base Python interpreter package 00358 # includes the development sources; on at least some Linux 00359 # distributions, you have to install a separate "python-devel" 00360 # package or something similar. If you get compilation errors 00361 # trying to build the POW code (below) and the error message says 00362 # something about the file "Python.h" being missing, this is 00363 # almost certainly your problem. 00364 # </li> 00365 # 00366 # <li> 00367 # <a href="http://codespeak.net/lxml/">http://codespeak.net/lxml/</a>, 00368 # a Pythonic interface to the Gnome LibXML2 libraries. 00369 # lxml in turn requires the LibXML2 C libraries. 00370 # <ul> 00371 # <li>FreeBSD: /usr/ports/devel/py-lxml</li> 00372 # <li>Fedora: python-lxml.i386</li> 00373 # <li>Ubuntu: python-lxml</li> 00374 # </ul> 00375 # </li> 00376 # 00377 # <li> 00378 # <a href="http://sourceforge.net/projects/mysql-python/">http://sourceforge.net/projects/mysql-python/</a>, 00379 # the Python "db" interface to MySQL. MySQLdb in turn requires MySQL client and server. rpkid et al have 00380 # been tested with MySQL 5.0 and 5.1. 00381 # <ul> 00382 # <li>FreeBSD: /usr/ports/databases/py-MySQLdb</li> 00383 # <li>Fedora: MySQL-python.i386</li> 00384 # <li>Ubuntu: python-mysqldb</li> 00385 # </ul> 00386 # </li> 00387 # </ul> 00388 # 00389 # rpkid et al also make heavy use of a modified copy of the Python 00390 # OpenSSL Wrappers (POW) package, but this copy has enough modifications 00391 # and additions that it's included in the subversion tree. 00392 # 00393 # The next step is to build the OpenSSL and POW binaries. At present 00394 # the OpenSSL code is just a snapshot of the OpenSSL development 00395 # sources, compiled with special options to enable RFC 3779 support 00396 # that ISC wrote under previous contract to ARIN. The POW (Python 00397 # OpenSSL Wrapper) library is an extended copy of the stock POW 00398 # release. 00399 # 00400 # To build these, cd to the top-level directory in the distribution and 00401 # type "make". 00402 # 00403 # @verbatim 00404 # $ cd $top 00405 # $ make 00406 # @endverbatim 00407 # 00408 # This should automatically build everything, in the right order, 00409 # including staticly linking the POW extension module with the OpenSSL 00410 # library to provide RFC 3779 support. If you get errors building 00411 # POW, see the above discussion of Python development sources. 00412 # 00413 # The architecture is intended to support hardware signing modules 00414 # (HSMs), but the code to support them has not been written. 00415 # 00416 # At this point, you should have all the necessary software installed 00417 # to run the core programs, but you will probably want to test it. 00418 # The test suite requires a few more external packages, only one of 00419 # which is Python code. 00420 # 00421 # <ul> 00422 # <li> 00423 # <a href="http://pyyaml.org/">http://pyyaml.org/</a>. 00424 # Several of the test programs use PyYAML to parse a YAML 00425 # description of a simulated allocation hierarchy to test. 00426 # <ul> 00427 # <li>FreeBSD: /usr/ports/devel/py-yaml</li> 00428 # <li>Ubuntu: python-yaml</li> 00429 # </ul> 00430 # </li> 00431 # 00432 # <li> 00433 # <a href="http://xmlsoft.org/XSLT/">http://xmlsoft.org/XSLT/</a>. 00434 # Some of the test code uses xsltproc, from the Gnome LibXSLT 00435 # package. 00436 # <ul> 00437 # <li>FreeBSD: /usr/ports/textproc/libxslt</li> 00438 # <li>Ubuntu: xsltproc</li> 00439 # </ul> 00440 # </li> 00441 # </ul> 00442 # 00443 # All tests should be run from the rpkid/ directories. 00444 # 00445 # Some of the tests require MySQL databases to store their data. To set 00446 # up all the databases that the tests will need, run the SQL commands in 00447 # rpkid/smoketest.setup.sql. The MySQL command line client is usually the 00448 # easiest way to do this, eg: 00449 # 00450 # @verbatim 00451 # $ cd $top/rpkid 00452 # $ mysql -u root -p <smoketest.setup.sql 00453 # @endverbatim 00454 # 00455 # To run the tests, run "make all-tests": 00456 # 00457 # @verbatim 00458 # $ cd $top/rpkid 00459 # $ make all-tests 00460 # @endverbatim 00461 # 00462 # If nothing explodes, your installation is probably ok. Any Python 00463 # backtraces in the output indicate a problem. 00464 # 00465 # There's a last set of tools that only developers should need, as 00466 # they're only used when modifying schemas or regenerating the 00467 # documentation. These tools are listed here for completeness. 00468 # 00469 # <ul> 00470 # <li> 00471 # <a href="http://www.doxygen.org/">http://www.doxygen.org/</a>. 00472 # Doxygen in turn pulls in several other tools, notably Graphviz, 00473 # pdfLaTeX, and Ghostscript. 00474 # <ul> 00475 # <li>FreeBSD: /usr/ports/devel/doxygen</li> 00476 # <li>Ubuntu: doxygen</li> 00477 # </ul> 00478 # </li> 00479 # 00480 # <li> 00481 # <a href="http://www.mbayer.de/html2text/">http://www.mbayer.de/html2text/</a>. 00482 # The documentation build process uses xsltproc and html2text to dump 00483 # flat text versions of a few critical documentation pages. 00484 # <ul> 00485 # <li>FreeBSD: /usr/ports/textproc/html2text</li> 00486 # </ul> 00487 # </li> 00488 # 00489 # <li> 00490 # <a href="http://www.thaiopensource.com/relaxng/trang.html">http://www.thaiopensource.com/relaxng/trang.html</a>. 00491 # Trang is used to convert RelaxNG schemas from the human-readable 00492 # "compact" form to the XML form that LibXML2 understands. Trang in 00493 # turn requires Java. 00494 # <ul> 00495 # <li>FreeBSD: /usr/ports/textproc/trang</li> 00496 # </ul> 00497 # </li> 00498 # 00499 # <li> 00500 # <a href="http://search.cpan.org/dist/SQL-Translator/">http://search.cpan.org/dist/SQL-Translator/</a>. 00501 # SQL-Translator, also known as "SQL Fairy", includes code to parse 00502 # an SQL schema and dump a description of it as Graphviz input. 00503 # SQL Fairy in turn requires Perl. 00504 # <ul> 00505 # <li>FreeBSD: /usr/ports/databases/p5-SQL-Translator</li> 00506 # </ul> 00507 # </li> 00508 # </ul> 00509 # 00510 # Once you've finished with installation, the next thing you should 00511 # read is the @ref Configuration "Configuration Guide". 00512 00513 ## @page Configuration Configuration Guide 00514 # 00515 # This section describes the configuration file syntax and settings. 00516 # 00517 # Each of the programs that make up the RPKI tookit can potentially 00518 # take its own configuration file, but for most uses this is 00519 # unnecessarily complicated. The recommended approach is to use a 00520 # single configuration file, and to put all of the parameters that a 00521 # normal user might need to change into a single section of that 00522 # configuration file, then reference these common settings from the 00523 # program-specific sections of the configuration file via macro 00524 # expansion. The configuration file parser supports a limited version 00525 # of the macro facility used in OpenSSL's configuration parser. An 00526 # expression such as @verbatim foo = ${bar::baz} @endverbatim sets foo 00527 # to the value of the @c baz variable from section @c bar. The section 00528 # name @c ENV is special: it refers to environment variables. 00529 # 00530 # @section myrpkiconf myrpki.conf 00531 # 00532 # The default name for the shared configuration file is @c myrpki.conf. 00533 # 00534 # @dontinclude myrpki.conf 00535 # @skipline [myrpki] 00536 # 00537 # The @c [myrpki] section of @c myrpki.conf contains all the 00538 # parameters that you really need to configure. 00539 # 00540 # @skip # 00541 # @until = 00542 # 00543 # Every resource-holding or server-operating entity needs a "handle", 00544 # which is just an identifier by which the entity calls itself. 00545 # Handles do not need to be globally unique, but should be chosen with 00546 # an eye towards debugging operational problems: it's best if you use 00547 # a handle that your parents and children will recognize as being you. 00548 # 00549 # @skip # 00550 # @until bpki/servers 00551 # 00552 # The myrpki tool requires filenames for several input data files, the 00553 # "business PKI" databases used to secure CMS and TLS communications, 00554 # and the XML intermediate format that it uses. Rather than 00555 # hardwiring the names into the code, they're configured here. You 00556 # can change the names if you must, but the defaults should be fine in 00557 # most cases. 00558 # 00559 # @skip # 00560 # @until irdbd_server_port 00561 # 00562 # If you're hosting RPKI service for others, or are self-hosting, you 00563 # want this on. If somebody else is running rpkid on your behalf and 00564 # you're just shipping them your @c myrpki.xml file, you can turn this 00565 # off. 00566 # 00567 # If you're running @c rpkid at all, you'll need to set at least the 00568 # @c rpkid_server_host parameter here. You may be able to use the 00569 # default port numbers, or may need to pick different ones. Unless 00570 # you plan to run @c irdbd on a different machine from @c rpkid, you 00571 # should leave @c irdbd_server_host alone. 00572 # 00573 # @skip # 00574 # @until pubd_contact_info 00575 # 00576 # The myrpki tool will attempt to negotiate publication service for 00577 # you with whatever publication service your parent is using, if you 00578 # let it, so in most cases you should not need to run @c pubd unless 00579 # you need to issue certificates for private IP address space or 00580 # private Autononmous System Numbers. 00581 # 00582 # If you do run @c pubd, you will need to set @c pubd_server_host. 00583 # You may also need to set @c pubd_server_port, and you should provide 00584 # something helpful as contact information in @c pubd_contact_info if 00585 # you plan to offer publication service to your RPKI children, so that 00586 # grandchildren (or descendents even further down the tree) who 00587 # receive referrals to your service will know how to contact you. 00588 # 00589 # @skip # 00590 # @until rootd_server_port 00591 # 00592 # You shouldn't run rootd unless you're the root of an RPKI tree. Who 00593 # gets to be the root of the public RPKI tree is a political issue 00594 # outside the scope of this document. For everybody else, the only 00595 # reason for running @c rootd (other than test purposes) would be to 00596 # support certification of private IP addresses and ASNs. The core 00597 # tools can do this without any problem, but the simplified 00598 # configuration mechanism does not (yet) make this easy to do. 00599 # 00600 # @skip # 00601 # @until publication_rsync_server 00602 # 00603 # These parameters control the mapping between the rsync URIs 00604 # presented by @c rsyncd and the local filesystem on the machine where 00605 # @c pubd and @c rsyncd run. Any changes here must also be reflected 00606 # as changes in @c rsyncd.conf. In most cases you should not change 00607 # the value of @c publication_rsync_module from the default; since 00608 # pubd can't (and should not) rewrite @c rsyncd.conf, it's best to use 00609 # a static rsync module name here and let @c pubd do its work 00610 # underneath that name. In most cases @c publication_rsync_server 00611 # should be the same as @c publication_rsync_server, which is what the 00612 # macro invocation in the default setting does. @c 00613 # publication_base_directory, like other pathnames in @c myrpki.conf, 00614 # can be either a relative or absolute pathname; if relative, it's 00615 # interpreted with respect to the directory in which the programs in 00616 # question were started. In this specific case, it's probably better 00617 # to use an absolute pathname, since this pathname must also appear in 00618 # @c rsyncd.conf. 00619 # 00620 # @skip # 00621 # @until pubd_sql_password 00622 # 00623 # These settings control how @c rpkid, @c irdbd, and @c pubd talk to 00624 # the MySQL server. At minimum, each daemon needs its own database; 00625 # in the simplest configuration, the username and password can be 00626 # shared, which is what the macro references in the default 00627 # configuration does. If for some reason you need to set different 00628 # usernames and passwords for different daemons, you can do so by 00629 # changing the daemon-specific variables. 00630 # 00631 # @skip # 00632 # @until = openssl 00633 # 00634 # The @c myrpki tool uses the @c openssl command line tool for most of 00635 # its BPKI operations, for two reasons: 00636 # 00637 # @li To avoid duplicating CA-management functionality already 00638 # provided by the command line tool, and 00639 # 00640 # @li To ease portability of the @c myrpki tool, so that a "hosted" 00641 # resource holder can use it without needing to install entire toolkit. 00642 # 00643 # The @c myrpki tool's use of OpenSSL does not require exotic features 00644 # like RFC 3779 support, but it does require a version of the tool 00645 # recent enough to support CMS and the @c -ss_cert argument to the @c 00646 # ca command. Depending on the platform on which you are running this 00647 # code, you may or may not have a system copy of the @c openssl tool 00648 # installed that meets these criteria; if not, the @c openssl binary 00649 # built when you compile the toolkit will suffice. This parameter 00650 # allows you to tell @c myrpki where to find the binary, if necessary; 00651 # the default just uses the system search path. 00652 # 00653 # @section otherconf Other configuration files and options 00654 # 00655 # In most cases the simplified configuration in the @c [myrpki] 00656 # section of @c myrpki.conf should suffice, but in case you need to 00657 # tinker, here are details on the the rest of the configuration 00658 # options. In most cases the default name of the configuration file 00659 # for a program is the name of the program followed by @c ".conf", and 00660 # the section name is also named for the program, so that you can 00661 # combine sections into a single configuration file as shown with @c 00662 # myrpki.conf. 00663 # 00664 # @li @subpage CommonOptions "Common configuration options" 00665 # 00666 # @li @subpage rpkidconf "rpkid configuration" 00667 # 00668 # @li @subpage irdbdconf "irdbd configuration" 00669 # 00670 # @li @subpage pubdconf "pubd configuration" 00671 # 00672 # @li @subpage rootdconf "rootd configuration" 00673 # 00674 # @li @subpage smoketestconf "configuration of the smoketest test harness" 00675 # 00676 # @li @subpage smoketestyaml "test description language for the smoketest test harness" 00677 # 00678 # Once you've finished with configuration, the next thing you should 00679 # read is the @ref MySQL-Setup "MySQL setup instructions". 00680 00681 ## @page MySQL-Setup MySQL Setup 00682 # 00683 # You need to install MySQL and set up the relevant databases before 00684 # starting @c rpkid, @c irdbd, or @c pubd. 00685 # 00686 # See the @ref Installation "Installation Guide" for details on where 00687 # to download MySQL and find documentation on installing it. 00688 # 00689 # See the @ref Configuration "Configuration Guide" for details on the 00690 # configuration file settings the daemons will use to find and 00691 # authenticate themselves to their respective databases. 00692 # 00693 # Before you can (usefully) start any of the daemons, you will need to 00694 # set up the MySQL databases they use. You can do this by hand, or 00695 # you can use the @c sql-setup.py script, which prompts you for your 00696 # MySQL root password then attempts to do everything else 00697 # automatically using values from myrpki.conf. 00698 # 00699 # Using the script is simple: 00700 # 00701 # @verbatim 00702 # $ python sql-setup.py 00703 # Please enter your MySQL root password: 00704 # @endverbatim 00705 # 00706 # The script should tell you what databases it creates. You can use 00707 # the -v option if you want to see more details about what it's doing. 00708 # 00709 # If you'd prefer to do the SQL setup manually, perhaps because you 00710 # have valuable data in other MySQL databases and you don't want to 00711 # trust some random setup script with your MySQL root password, you'll 00712 # need to use the MySQL command line tool, as follows: 00713 # 00714 # @verbatim 00715 # $ mysql -u root -p 00716 # 00717 # mysql> CREATE DATABASE irdb_database; 00718 # mysql> GRANT all ON irdb_database.* TO irdb_user@localhost IDENTIFIED BY 'irdb_password'; 00719 # mysql> USE irdb_database; 00720 # mysql> SOURCE $top/rpkid/irdbd.sql; 00721 # mysql> CREATE DATABASE rpki_database; 00722 # mysql> GRANT all ON rpki_database.* TO rpki_user@localhost IDENTIFIED BY 'rpki_password'; 00723 # mysql> USE rpki_database; 00724 # mysql> SOURCE $top/rpkid/rpkid.sql; 00725 # mysql> COMMIT; 00726 # mysql> quit 00727 # @endverbatim 00728 # 00729 # where @c irdb_database, @c irdb_user, @c irdb_password, @c 00730 # rpki_database, @c rpki_user, and @c rpki_password match the values 00731 # you used in your configuration file. 00732 # 00733 # If you are running pubd and are doing manual SQL setup, you'll also 00734 # have to do: 00735 # 00736 # @verbatim 00737 # $ mysql -u root -p 00738 # mysql> CREATE DATABASE pubd_database; 00739 # mysql> GRANT all ON pubd_database.* TO pubd_user@localhost IDENTIFIED BY 'pubd_password'; 00740 # mysql> USE pubd_database; 00741 # mysql> SOURCE $top/rpkid/pubd.sql; 00742 # mysql> COMMIT; 00743 # mysql> quit 00744 # @endverbatim 00745 # 00746 # where @c pubd_database, @c pubd_user @c pubd_password match the 00747 # values you used in your configuration file. 00748 # 00749 # Once you've finished configuring MySQL, the next thing you should 00750 # read is the instructions for the @ref MyRPKI "myrpki tool". 00751 00752 00753 ## @page MyRPKI The myrpki tool 00754 # 00755 # The design of rpkid and friends assumes that certain tasks can be 00756 # thrown over the wall to the registry's back end operation. This was 00757 # a deliberate design decision to allow rpkid et al to remain 00758 # independent of existing database schema, business PKIs, and so forth 00759 # that a registry might already have. All very nice, but it leaves 00760 # someone who just wants to test the tools or who has no existing back 00761 # end with a fairly large programming project. The @c myrpki tool 00762 # attempts to fill that gap. 00763 # 00764 # @c myrpki is a basic implementation of what a registry back end 00765 # would need to use rpkid and friends. @c myrpki does not use every 00766 # available option in the other programs, nor is it necessarily as 00767 # efficient as possible. Large registries will almost certainly want 00768 # to roll their own tools, perhaps using these as a starting point. 00769 # Nevertheless, we hope that @c myrpki will at least provide a useful 00770 # example, and may be adaquate for simple use. 00771 # 00772 # @c myrpki is (currently) implemented as a single command line Python 00773 # program. It has a number of commands, most of which are used for 00774 # initial setup, some of which are used on an ongoing basis. @c 00775 # myrpki can be run either in an interactive mode or by passing a 00776 # single command on the command line when starting the program; the 00777 # former mode is intended to be somewhat human-friendly, the latter 00778 # mode is useful in scripting, cron jobs, and automated testing. 00779 # 00780 # @c myrpki use has two distinct phases: setup and data maintenance. 00781 # The setup phase is primarily about constructing the "business PKI" 00782 # (BPKI) certificates that the daemons use to authenticate CMS and 00783 # HTTPS messages and obtaining the service URLs needed to configure 00784 # the daemons. The data maintenance phase is about configuring local 00785 # data into the daemons. 00786 # 00787 # @c myrpki uses the OpenSSL command line tool for almost all 00788 # operations on keys and certificates; the one exception to this is 00789 # the comamnd which talks directly to the daemons, as this command 00790 # uses the same communication libraries as the daemons themselves do. 00791 # The intent behind using the OpenSSL command line tool for everything 00792 # else is to allow all the other commands to be run without requiring 00793 # all the auxiliary packages upon which the daemons depend; this can 00794 # be useful, eg, if one wants to run the back-end on a laptop while 00795 # running the daemons on a server, in which case one might prefer not 00796 # to have to install a bunch of unnecessary packages on the laptop. 00797 # 00798 # During setup phase @c myrpki generates and processes small XML 00799 # messages which it expects the user to ship to and from its parents, 00800 # children, etc via some out-of-band means (email, perhaps with PGP 00801 # signatures, USB stick, we really don't care). During data 00802 # maintenance phase, @c myrpki does something similar with another XML 00803 # file, to allow hosting of RPKI services; in the degenerate case 00804 # where an entity is just self-hosting (ie, is running the daemons for 00805 # itself, and only for itself), this latter XML file need not be sent 00806 # anywhere. 00807 # 00808 # The basic idea here is that a user who has resources maintains a set 00809 # of .csv files containing a text representation of the data needed by 00810 # the back-end, along with a configuration file containing other 00811 # parameters. The intent is that these be very simple files that are 00812 # easy to generate either by hand or as a dump from relational 00813 # database, spreadsheet, awk script, whatever works in your 00814 # environment. Given these files, the user then runs @c myrpki to 00815 # extract the relevant information and encode everything about its 00816 # back end state into an XML file, which can then be shipped to the 00817 # appropriate other party. 00818 # 00819 # Many of the @c myrpki commands which process XML input write out a 00820 # new XML file, either in place or as an entirely new file; in 00821 # general, these files need to be sent back to the party that sent the 00822 # original file. Think of all this as a very slow packet-based 00823 # communication channel, where each XML file is a single packet. In 00824 # setup phase, there's generally a single round-trip per setup 00825 # conversation; in the data maintenance phase, the same XML file keeps 00826 # bouncing back and forth between hosted entity and hosting entity. 00827 # 00828 # Note that, as certificates and CRLs have expiration and nextUpdate 00829 # values, a low-level cycle of updates passing between resource holder 00830 # and rpkid operator will be necessary as a part of steady state 00831 # operation. [The current version of these tools does not yet 00832 # regenerate these expiring objects, but fixing this will be a 00833 # relatively minor matter.] 00834 # 00835 # The third important kind of file in this system is the 00836 # @ref Configuration "configuration file" 00837 # for @c myrpki. This contains a number of sections, some of which 00838 # are for myrpki, others of which are for the OpenSSL command line 00839 # tool, still others of which are for the various RPKI daemon 00840 # programs. The examples/ subdirectory contains a commented version 00841 # of the configuration file that explains the various parameters. 00842 # 00843 # The .csv files read by myrpki are (now) misnamed: formerly, they 00844 # used the "excel-tab" format from the Python csv library, but early 00845 # users kept trying to make the colums line up, which didn't do what 00846 # the users expected. So now these files are just 00847 # whitespace-delimted, such as a program like "awk" would understand. 00848 # 00849 # Keep reading, and don't panic. 00850 # 00851 # The default configuration file name for @c myrpki is 00852 # @ref Configuration "@c myrpki.conf". 00853 # You can change this using the "-c" option when invoking myrpki, or 00854 # by setting the environment variable MYRPKI_CONF. 00855 # 00856 # See examples/*.csv for commented examples of the several CSV files. 00857 # Note that the comments themselves are not legal CSV, they're just 00858 # present to make it easier to understand the examples. 00859 # 00860 # @section myrpkioverview myrpki overview 00861 # 00862 # Which process you need to follow depends on whether you are running 00863 # rpkid yourself or will be hosted by somebody else. We call the first 00864 # case "self-hosted", because the software treats running rpkid to 00865 # handle resources that you yourself hold as if you are an rpkid 00866 # operator who is hosting an entity that happens to be yourself. 00867 # 00868 # "$top" in the following refers to wherever you put the 00869 # subvert-rpki.hactrn.net code. Once we have autoconf and "make 00870 # install" targets, this will be some system directory or another; for 00871 # now, it's wherever you checked out a copy of the code from the 00872 # subversion repository or unpacked a tarball of the code. 00873 # 00874 # Most of the setup process looks the same for any resource holder, 00875 # regardless of whether they are self-hosting or not. The differences 00876 # come in the data maintenence phase. 00877 # 00878 # The steps needed during setup phase are: 00879 # 00880 # @li Write a configuration file (copy $top/rpkid/examples/myrpki.conf 00881 # and edit as needed). You need to configure the @c [myrpki] section; 00882 # in theory, the rest of the file should be ok as it is, at least for 00883 # simple use. You also need to create (either by hand or by dumping 00884 # from a database, spreadsheet, whatever) the CSV files describing 00885 # prefixes and ASNs you want to allocate to your children and ROAs 00886 # you want created. 00887 # 00888 # @li Initialization ("initialize" command). This creates the local BPKI 00889 # and other data structures that can be constructed just based on 00890 # local data such as the config file. Other than some internal data 00891 # structures, the main output of this step is the "identity.xml" file, 00892 # which is used as input to later stages. 00893 # 00894 # In theory it should be safe to run the "initialize" command more 00895 # than once, in practice this has not (yet) been tested. 00896 # 00897 # @li Send (email, USB stick, carrier pigeon) identity.xml to each of your 00898 # parents. This tells each of your parents what you call yourself, 00899 # and supplies each parent with a trust anchor for your 00900 # resource-holding BPKI. 00901 # 00902 # @li Each of your parents runs the "configure_child" command, giving 00903 # the identity.xml you supplied as input. This registers your 00904 # data with the parent, including BPKI cross-registration, and 00905 # generates a return message containing your parent's BPKI trust 00906 # anchors, a service URL for contacting your parent via the 00907 # "up-down" protocol, and (usually) either an offer of publication 00908 # service (if your parent operates a repository) or a referral 00909 # from your parent to whatever publication service your parent 00910 # does use. Referrals include a CMS-signed authorization token 00911 # that the repository operator can use to determine that your 00912 # parent has given you permission to home underneath your parent 00913 # in the publication tree. 00914 # 00915 # @li Each of your parents sends (...) back the response XML file 00916 # generated by the "configure_child" command. 00917 # 00918 # @li You feed the response message you just got into myrpki using the 00919 # "configure_parent" command. This registers the parent's 00920 # information in your database, including BPKI 00921 # cross-certification, and processes the repository offer or 00922 # referral to generate a publication request message. 00923 # 00924 # @li You send (...) the publication request message to the 00925 # repository. The @c contact_info element in the request message 00926 # should (in theory) provide some clue as to where you should send 00927 # this. 00928 # 00929 # @li The repository operator processes your request using myrpki's 00930 # "configure_publication_client" command. This registers your 00931 # information, including BPKI cross-certification, and generates a 00932 # response message containing the repository's BPKI trust anchor 00933 # and service URL. 00934 # 00935 # @li Repository operator sends (...) the publication confirmation message 00936 # back to you. 00937 # 00938 # @li You process the publication confirmation message using myrpki's 00939 # "configure_repository" command. 00940 # 00941 # At this point you should, in theory, have established relationships, 00942 # exchanged trust anchors, and obtained service URLs from all of your 00943 # parents and repositories. The last setup step is establishing a 00944 # relationship with your RPKI service host, if you're not self-hosted, 00945 # but as this is really just the first message of an ongoing exchange 00946 # with your host, it's handled by the data maintenance commands. 00947 # 00948 # The two commands used in data maintenence phase are 00949 # "configure_resources" and "configure_daemons". The first is used by 00950 # the resource holder, the second is used by the host. In the 00951 # self-hosted case, it is not necessary to run "configure_resources" at 00952 # all, myrpki will run it for you automatically. 00953 # 00954 # @section myrpkihosted Hosted case 00955 # 00956 # The basic steps involved in getting started for a resource holder who 00957 # is being hosted by somebody else are: 00958 # 00959 # @li Run through steps listed in 00960 # @ref myrpkioverview "the myrpki overview section". 00961 # 00962 # @li Run the configure_resources command to generate myrpki.xml. 00963 # 00964 # @li Send myrpki.xml to the rpkid operator who will be hosting you. 00965 # 00966 # @li Wait for your rpkid operator to ship you back an updated XML 00967 # file containing a PKCS #10 certificate request for the BPKI 00968 # signing context (BSC) created by rpkid. 00969 # 00970 # @li Run configure_resources again with the XML file you just 00971 # received, to issue the BSC certificate and update the XML file 00972 # again to contain the newly issued BSC certificate. 00973 # 00974 # @li Send the updated XML file back to your rpkid operator. 00975 # 00976 # At this point you're done with initial setup. You will need to run 00977 # configure_resources again whenever you make any changes to your 00978 # configuration file or CSV files. 00979 # 00980 # @warning Once myrpki knows how to update 00981 # BPKI CRLs, you will also need to run configure_resources periodically 00982 # to keep your BPKI CRLs up to date. 00983 # 00984 # Any time you run configure_resources myrpki, you should send the 00985 # updated XML file to your rpkid operator, who should send you a 00986 # further updated XML file in response. 00987 # 00988 # @section myrpkiselfhosted Self-hosted case 00989 # 00990 # The first few steps involved in getting started for a self-hosted 00991 # resource holder (that is, a resource holder that runs its own copy 00992 # of rpkid) are the same as in the @ref myrpkihosted "hosted case" 00993 # above; after that the process diverges. 00994 # 00995 # The [current] steps are: 00996 # 00997 # @li Follow the basic installation instructions in 00998 # @ref Installation "the Installation Guide" to build the 00999 # RFC-3779-aware OpenSSL code and associated Python extension 01000 # module. 01001 # 01002 # @li Run through steps listed in 01003 # @ref myrpkioverview "the myrpki overview section". 01004 # 01005 # @li Set up the MySQL databases that rpkid et al will use. The 01006 # package includes a tool to do this for you, you can use that or 01007 # do the job by hand. See 01008 # @ref MySQL-Setup "MySQL database setup" 01009 # for details. 01010 # 01011 # @li If you are running your own publication repository (that is, if 01012 # you are running pubd), you will also need to set up an rsyncd 01013 # server or configure your existing one to serve pubd's output. 01014 # There's a sample configuration file in 01015 # $top/rpkid/examples/rsyncd.conf, but you may need to do 01016 # something more complicated if you are already running rsyncd for 01017 # other purposes. See the rsync(1) and rsyncd.conf(5) manual 01018 # pages for more details. 01019 # 01020 # @li Start the daemons. You can use $top/rpkid/start-servers.py to 01021 # do this, or write your own script. If you intend to run pubd, 01022 # you should make sure that the directory you specified as 01023 # publication_base_directory exists and is writable by the userid 01024 # that will be running pubd, and should also make sure to start 01025 # rsyncd. 01026 # 01027 # @li Run myrpki's configure_daemons command, twice, with no 01028 # arguments. You need to run the command twice because myrpki has 01029 # to ask rpkid to create a keypair and generate a certification 01030 # request for the BSC. The first pass does this, the second 01031 # processes the certification request, issues the BSC, and loads 01032 # the result into rpkid. [Yes, we could automate this somehow, if 01033 # necessary.] 01034 # 01035 # At this point, if everything went well, rpkid should be up, 01036 # configured, and starting to obtain resource certificates from its 01037 # parents, generate CRLs and manifests, and so forth. At this point you 01038 # should go figure out how to use the relying party tool, rcynic: see 01039 # $top/rcynic/README if you haven't already done so. 01040 # 01041 # If and when you change your CSV files, you should run 01042 # configure_daemons again to feed the changes into the daemons. 01043 # 01044 # @section myrpkihosting Hosting case 01045 # 01046 # If you are running rpkid not just for your own resources but also to 01047 # host other resource holders (see @ref myrpkihosted "hosted case" 01048 # above), your setup will be almost the same as in the self-hosted 01049 # case (see @ref myrpkiselfhosted "self-hosted case", above), with one 01050 # procedural change: you will need to tell @c configure_daemons to 01051 # process the XML files produced by the resource holders you are 01052 # hosting. You do this by specifying the names of all those XML files 01053 # on as arguments to the @c configure_daemons command. So, if you are 01054 # hosting two friends, Alice and Bob, then, everywhere the 01055 # instructions for the self-hosted case say to run @c 01056 # configure_daemons with no arguments, you will instead run it with 01057 # the names of Alice's and Bob's XML files as arguments. 01058 # 01059 # Note that @c configure_daemons sometimes modifies these XML files, 01060 # in which case it will write them back to the same filenames. While 01061 # it is possible to figure out the set of circumstances in which this 01062 # will happen (at present, only when @c myrpki has to ask @c rpkid to 01063 # create a new BSC keypair and PKCS #10 certificate request), it may 01064 # be easiest just to ship back an updated copy of the XML file after 01065 # every you run @c configure_daemons. 01066 # 01067 # @section myrpkipurehosting "Pure" hosting case 01068 # 01069 # In general we assume that anybody who bothers to run @c rpkid is 01070 # also a resource holder, but the software does not insist on this. 01071 # 01072 # @todo 01073 # Er, well, rpkid doesn't, but myrpki now does -- "pure" hosting was an 01074 # unused feature that fell by the wayside while simplifying the user 01075 # interface. It would be relatively straightforward to add it back if 01076 # we ever need it for anything, but the mechanism it used to use no 01077 # longer exists -- the old [myirbe] section of the config file has been 01078 # collapsed into the [myrpki] section, so testing for existance of the 01079 # [myrpki] section no longer works. So we'll need an explicit 01080 # configuration option, no big deal, just not worth chasing now. 01081 # 01082 # A (perhaps) plausible use for this capability would be if you are an 01083 # rpkid-running resource holder who wants for some reason to keep the 01084 # resource-holding side of your operation completely separate from the 01085 # rpkid-running side of your operation. This is essentially the 01086 # pure-hosting model, just with an internal hosted entity within a 01087 # different part of your own organization. 01088 # 01089 # @section myrpkitroubleshooting Troubleshooting 01090 # 01091 # If you run into trouble setting up this package, the first thing to do 01092 # is categorize the kind of trouble you are having. If you've gotten 01093 # far enough to be running the daemons, check their log files. If 01094 # you're seeing Python exceptions, read the error messages. If you're 01095 # getting TLS errors, check to make sure that you're using all the right 01096 # BPKI certificates and service contact URLs. 01097 # 01098 # TLS configuration errors are, unfortunately, notoriously difficult to 01099 # debug, because connection failures due to misconfiguration happen 01100 # early, deep in the guts of the OpenSSL TLS code, where there isn't 01101 # enough application context available to provide useful error messages. 01102 # 01103 # If you've completed the steps above, everything appears to have gone 01104 # OK, but nothing seems to be happening, the first thing to do is 01105 # check the logs to confirm that nothing is actively broken. @c 01106 # rpkid's log should include messages telling you when it starts and 01107 # finishes its internal "cron" cycle. It can take several cron cycles 01108 # for resources to work their way down from your parent into a full 01109 # set of certificates and ROAs, so have a little patience. @c rpkid's 01110 # log should also include messages showing every time it contacts its 01111 # parent(s) or attempts to publish anything. 01112 # 01113 # @c rcynic in fully verbose mode provides a fairly detailed 01114 # explanation of what it's doing and why objects that fail have 01115 # failed. 01116 # 01117 # You can use @c rsync (sic) to examine the contents of a publication 01118 # repository one directory at a time, without attempting validation, 01119 # by running rsync with just the URI of the directory on its command 01120 # line: 01121 # 01122 # @verbatim 01123 # $ rsync rsync://rpki.example.org/where/ever/ 01124 # @endverbatim 01125 # 01126 # @section myrpkiknownissues Known Issues 01127 # 01128 # The lxml package provides a Python interface to the Gnome libxml2 01129 # and libxslt C libraries. This code has been quite stable for 01130 # several years, but initial testing with lxml compiled and linked 01131 # against a newer version of libxml2 ran into problems (specifically, 01132 # gratuitous RelaxNG schema validation failures). libxml2 2.7.3 01133 # worked; libxml2 2.7.5 did not work on the test machine in question. 01134 # Reverting to libxml2 2.7.3 fixed the problem. Rewriting the two 01135 # lines of Python code that were triggering the lxml bug appears to 01136 # have solved the problem, so the code now works properly with libxml 01137 # 2.7.5, but if you start seeing weird XML validation failures, it 01138 # might be another variation of this lxml bug. 01139 # 01140 # An earlier version of this code ran into problems with what appears to 01141 # be an implementation restriction in the the GNU linker ("ld") on 01142 # 64-bit hardware, resulting in obscure build failures. The workaround 01143 # for this required use of shared libraries and is somewhat less 01144 # portable than the original code, but without it the code simply would 01145 # not build in 64-bit environments with the GNU tools. The current 01146 # workaround appears to behave properly, but the workaround requires 01147 # that the pathname to the RFC-3779-aware OpenSSL shared libraries be 01148 # built into the _POW.so Python extension module. At the moment, in the 01149 # absence of "make install" targets for the Python code and libraries, 01150 # this means the build directory; eventually, once we're using autoconf 01151 # and installation targets, this will be the installation directory. If 01152 # necessary, you can override this by setting the LD_LIBRARY_PATH 01153 # environment variable, see the ld.so man page for details. This is a 01154 # relatively minor variation on the usual build issues for shared 01155 # libraries, it's just annoying because shared libraries should not be 01156 # needed here and would not be if not for this GNU linker issue. 01157 01158 ## @page CommonOptions Common Configuration Options 01159 # 01160 # Some of the options that the several daemons take are common to all 01161 # daemons. Which daemon they affect depends only on which sections of 01162 # which config files they are in. 01163 # 01164 # The first group of options are debugging flags, which can be set to 01165 # "true" or "false". If not specified, default values will be chosen 01166 # (generally false). 01167 # 01168 # @par @c debug_http: 01169 # Enable verbose http debug logging. 01170 # 01171 # @par @c debug_tls_certs: 01172 # Enable verbose logging about tls certs. 01173 # 01174 # @par @c want_persistent_client: 01175 # Enable http 1.1 persistence, client side. 01176 # 01177 # @par @c want_persistent_server: 01178 # Enable http 1.1 persistence, server side. 01179 # 01180 # @par @c debug_cms_certs: 01181 # Enable verbose logging about cms certs. 01182 # 01183 # @par @c sql_debug: 01184 # Enable verbose logging about sql operations. 01185 # 01186 # @par @c gc_debug: 01187 # Enable scary garbage collector debugging. 01188 # 01189 # @par @c timer_debug: 01190 # Enable verbose logging of timer system. 01191 # 01192 # There are also a few options that allow you to save CMS messages for 01193 # audit or debugging. The save format is a simple MIME encoding in a 01194 # Maildir-format mailbox. The current options are very crude, at some 01195 # point we may provide finer grain controls. 01196 # 01197 # @par @c dump_outbound_cms: 01198 # Dump messages we send to this mailbox. 01199 # 01200 # @par @c dump_inbound_cms: 01201 # Dump messages we receive to this mailbox. 01202 01203 ## @page rpkidconf rpkid.conf 01204 # 01205 # rpkid's default %config file is rpkid.conf, start rpkid with "-c 01206 # filename" to choose a different %config file. All options are in 01207 # the section "[rpkid]". Certificates, keys, and trust anchors may be 01208 # in either DER or PEM format. 01209 # 01210 # %Config file options: 01211 # 01212 # @par @c startup-message: 01213 # String to %log on startup, useful when 01214 # debugging a collection of rpkid instances at 01215 # once. 01216 # 01217 # @par @c sql-username: 01218 # Username to hand to MySQL when connecting to 01219 # rpkid's database. 01220 # 01221 # @par @c sql-database: 01222 # MySQL's database name for rpkid's database. 01223 # 01224 # @par @c sql-password: 01225 # Password to hand to MySQL when connecting to 01226 # rpkid's database. 01227 # 01228 # @par @c bpki-ta: 01229 # Name of file containing BPKI trust anchor. 01230 # All BPKI certificate verification within rpkid 01231 # traces back to this trust anchor. 01232 # 01233 # @par @c rpkid-cert: 01234 # Name of file containing rpkid's own BPKI EE 01235 # certificate. 01236 # 01237 # @par @c rpkid-key: 01238 # Name of file containing RSA key corresponding 01239 # to rpkid-cert. 01240 # 01241 # @par @c irbe-cert: 01242 # Name of file containing BPKI certificate used 01243 # by IRBE when talking to rpkid. 01244 # 01245 # @par @c irdb-cert: 01246 # Name of file containing BPKI certificate used 01247 # by irdbd. 01248 # 01249 # @par @c irdb-url: 01250 # Service URL for irdbd. Must be a %https:// URL. 01251 # 01252 # @par @c server-host: 01253 # Hostname or IP address on which to listen for 01254 # HTTPS connections. Current default is 01255 # INADDR_ANY (IPv4 0.0.0.0); this will need to 01256 # be hacked to support IPv6 for production. 01257 # 01258 # @par @c server-port: 01259 # TCP port on which to listen for HTTPS 01260 # connections. 01261 01262 ## @page pubdconf pubd.conf 01263 # 01264 # pubd's default %config file is pubd.conf, start pubd with "-c 01265 # filename" to choose a different %config file. All options are in 01266 # the section "[pubd]". Certifiates, keys, and trust anchors may be 01267 # either DER or PEM format. 01268 # 01269 # %Config file options: 01270 # 01271 # @par @c sql-username: 01272 # Username to hand to MySQL when connecting to 01273 # pubd's database. 01274 # 01275 # @par @c sql-database: 01276 # MySQL's database name for pubd's database. 01277 # 01278 # @par @c sql-password: 01279 # Password to hand to MySQL when connecting to 01280 # pubd's database. 01281 # 01282 # @par @c bpki-ta: 01283 # Name of file containing master BPKI trust 01284 # anchor for pubd. All BPKI validation in pubd 01285 # traces back to this trust anchor. 01286 # 01287 # @par @c irbe-cert: 01288 # Name of file containing BPKI certificate used 01289 # by IRBE when talking to pubd. 01290 # 01291 # @par @c pubd-cert: 01292 # Name of file containing BPKI certificate used 01293 # by pubd. 01294 # 01295 # @par @c pubd-key: 01296 # Name of file containing RSA key corresponding 01297 # to @c pubd-cert. 01298 # 01299 # @par @c server-host: 01300 # Hostname or IP address on which to listen for 01301 # HTTPS connections. Current default is 01302 # INADDR_ANY (IPv4 0.0.0.0); this will need to 01303 # be hacked to support IPv6 for production. 01304 # 01305 # @par @c server-port: 01306 # TCP port on which to listen for HTTPS 01307 # connections. 01308 # 01309 # @par @c publication-base: 01310 # Path to base of filesystem tree where pubd 01311 # should store publishable objects. Default is 01312 # "publication/". 01313 01314 ## @page rootdconf rootd.conf 01315 # 01316 # rootd's default %config file is rootd.conf, start rootd with "-c 01317 # filename" to choose a different %config file. All options are in 01318 # the section "[rootd]". Certificates, keys, and trust anchors may be 01319 # in either DER or PEM format. 01320 # 01321 # %Config file options: 01322 # 01323 # @par @c bpki-ta: 01324 # Name of file containing BPKI trust anchor. All 01325 # BPKI certificate validation in rootd traces 01326 # back to this trust anchor. 01327 # 01328 # @par @c rootd-bpki-cert: 01329 # Name of file containing rootd's own BPKI 01330 # certificate. 01331 # 01332 # @par @c rootd-bpki-key: 01333 # Name of file containing RSA key corresponding to 01334 # rootd-bpki-cert. 01335 # 01336 # @par @c rootd-bpki-crl: 01337 # Name of file containing BPKI CRL that would 01338 # cover rootd-bpki-cert had it been revoked. 01339 # 01340 # @par @c child-bpki-cert: 01341 # Name of file containing BPKI certificate for 01342 # rootd's one and only child (RPKI engine to 01343 # which rootd issues an RPKI certificate). 01344 # 01345 # @par @c server-host: 01346 # Hostname or IP address on which to listen for 01347 # HTTPS connections. Default is localhost. 01348 # 01349 # @par @c server-port: 01350 # TCP port on which to listen for HTTPS 01351 # connections. 01352 # 01353 # @par @c rpki-root-key: 01354 # Name of file containing RSA key to use in 01355 # signing resource certificates. 01356 # 01357 # @par @c rpki-root-cert: 01358 # Name of file containing self-signed root 01359 # resource certificate corresponding to 01360 # rpki-root-key. 01361 # 01362 # @par @c rpki-root-dir: 01363 # Name of directory where rootd should write 01364 # RPKI subject certificate, manifest, and CRL. 01365 # 01366 # @par @c rpki-subject-cert: 01367 # Name of file that rootd should use to save the 01368 # one and only certificate it issues. 01369 # Default is "Subroot.cer". 01370 # 01371 # @par @c rpki-root-crl: 01372 # Name of file to which rootd should save its 01373 # RPKI CRL. Default is "Root.crl". 01374 # 01375 # @par @c rpki-root-manifest: 01376 # Name of file to which rootd should save its 01377 # RPKI manifest. Default is "Root.mnf". 01378 # 01379 # @par @c rpki-subject-pkcs10: 01380 # Name of file that rootd should use when saving 01381 # a copy of the received PKCS #10 request for a 01382 # resource certificate. This is only used for 01383 # debugging. Default is not to save the PKCS 01384 # #10 request. 01385 01386 ## @page irdbdconf irdbd.conf 01387 # 01388 # irdbd's default %config file is irdbd.conf, start irdbd with "-c 01389 # filename" to choose a different %config file. All options are in the 01390 # section "[irdbd]". Certificates, keys, and trust anchors may be in 01391 # either DER or PEM format. 01392 # 01393 # %Config file options: 01394 # 01395 # @par @c startup-message: 01396 # String to %log on startup, useful when 01397 # debugging a collection of irdbd instances at 01398 # once. 01399 # 01400 # @par @c sql-username: 01401 # Username to hand to MySQL when connecting to 01402 # irdbd's database. 01403 # 01404 # @par @c sql-database: 01405 # MySQL's database name for irdbd's database. 01406 # 01407 # @par @c sql-password: 01408 # Password to hand to MySQL when connecting to 01409 # irdbd's database. 01410 # 01411 # @par @c bpki-ta: 01412 # Name of file containing BPKI trust anchor. All 01413 # BPKI certificate validation in irdbd traces 01414 # back to this trust anchor. 01415 # 01416 # @par @c irdbd-cert: 01417 # Name of file containing irdbd's own BPKI 01418 # certificate. 01419 # 01420 # @par @c irdbd-key: 01421 # Name of file containing RSA key corresponding 01422 # to irdbd-cert. 01423 # 01424 # @par @c rpkid-cert: 01425 # Name of file containing certificate used the 01426 # one and only by rpkid instance authorized to 01427 # contact this irdbd instance. 01428 # 01429 # @par @c https-url: 01430 # Service URL for irdbd. Must be a %https:// URL. 01431 01432 ## @page smoketestconf smoketest.conf 01433 # 01434 # All of the options in smoketest's (optional) configuration file are 01435 # overrides for wired-in default values. In almost all cases the 01436 # defaults will suffice. There are a ridiculous number of options, 01437 # most of which noone will ever need, see the code for details. The 01438 # default name for this configuration file is smoketest.conf, run 01439 # smoketest with "-c filename" to change it. 01440 01441 ## @page smoketestyaml smoketest.yaml 01442 # 01443 # smoketest's second configuration file is named smoketest.yaml by 01444 # default, run smoketest with "-y filename" to change it. The YAML 01445 # file contains multiple YAML "documents". The first document 01446 # describes the initial test layout and resource allocations, 01447 # subsequent documents describe modifications to the initial 01448 # allocations and other parameters. Resources listed in the initial 01449 # layout are aggregated automatically, so that a node in the resource 01450 # hierarchy automatically receives the resources it needs to issue 01451 # whatever its children are listed as holding. Actions in the 01452 # subsequent documents are modifications to the current resource set, 01453 # modifications to validity dates or other non-resource parameters, or 01454 # special commands like "sleep". 01455 # 01456 # Here's an example of current usage: 01457 # 01458 # @verbatim 01459 # name: Alice 01460 # valid_for: 2d 01461 # sia_base: "rsync://alice.example/rpki/" 01462 # kids: 01463 # - name: Bob 01464 # kids: 01465 # - name: Carol 01466 # ipv4: 192.0.2.1-192.0.2.33 01467 # asn: 64533 01468 # --- 01469 # - name: Carol 01470 # valid_add: 10 01471 # --- 01472 # - name: Carol 01473 # add_as: 33 01474 # valid_add: 2d 01475 # --- 01476 # - name: Carol 01477 # valid_sub: 2d 01478 # --- 01479 # - name: Carol 01480 # valid_for: 10d 01481 # @endverbatim 01482 # 01483 # This specifies an initial layout consisting of an RPKI engine named 01484 # "Alice", with one child "Bob", which in turn has one child "Carol". 01485 # Carol has a set of assigned resources, and all resources in the system 01486 # are initially set to be valid for two days from the time at which the 01487 # test is started. The first subsequent document adds ten seconds to 01488 # the validity interval for Carol's resources and makes no other 01489 # modifications. The second subsequent document grants Carol additional 01490 # resources and adds another two days to the validity interval for 01491 # Carol's resources. The next document subtracts two days from the 01492 # validity interval for Carol's resources. The final document sets the 01493 # validity interval for Carol's resources to ten days. 01494 # 01495 # Operators in subsequent (update) documents: 01496 # 01497 # @par @c add_as: 01498 # Add ASN resources. 01499 # 01500 # @par @c add_v4: 01501 # Add IPv4 resources. 01502 # 01503 # @par @c add_v6: 01504 # Add IPv6 resources. 01505 # 01506 # @par @c sub_as: 01507 # Subtract ASN resources. 01508 # 01509 # @par @c sub_v4: 01510 # Subtract IPv4 resources. 01511 # 01512 # @par @c sub_v6: 01513 # Subtract IPv6 resources. 01514 # 01515 # @par @c valid_until: 01516 # Set an absolute expiration date. 01517 # 01518 # @par @c valid_for: 01519 # Set a relative expiration date. 01520 # 01521 # @par @c valid_add: 01522 # Add to validity interval. 01523 # 01524 # @par @c valid_sub: 01525 # Subtract from validity interval. 01526 # 01527 # @par @c sleep [interval]: 01528 # Sleep for specified interval, or until smoketest receives a SIGALRM signal. 01529 # 01530 # @par @c shell cmd...: 01531 # Pass rest of line verbatim to /bin/sh and block until the shell returns. 01532 # 01533 # Absolute timestamps should be in the form shown (UTC timestamp format 01534 # as used in XML). 01535 # 01536 # Intervals (@c valid_add, @c valid_sub, @c valid_for, @c sleep) are either 01537 # integers, in which case they're interpreted as seconds, or are a 01538 # string of the form "wD xH yM zS" where w, x, y, and z are integers and 01539 # D, H, M, and S indicate days, hours, minutes, and seconds. In the 01540 # latter case all of the fields are optional, but at least one must be 01541 # specified. For example, "3D4H" means "three days plus four hours". 01542 01543 01544 ## @page Left-Right Left-Right Protocol 01545 # 01546 # The left-right protocol is really two separate client/server 01547 # protocols over separate channels between the RPKI engine and the IR 01548 # back end (IRBE). The IRBE is the client for one of the 01549 # subprotocols, the RPKI engine is the client for the other. 01550 # 01551 # @section Operations initiated by the IRBE 01552 # 01553 # This part of the protcol uses a kind of message-passing. Each %object 01554 # that the RPKI engine knows about takes five messages: "create", "set", 01555 # "get", "list", and "destroy". Actions which are not just data 01556 # operations on %objects are handled via an SNMP-like mechanism, as if 01557 # they were fields to be set. For example, to generate a keypair one 01558 # "sets" the "generate-keypair" field of a BSC %object, even though there 01559 # is no such field in the %object itself as stored in SQL. This is a bit 01560 # of a kludge, but the reason for doing it as if these were variables 01561 # being set is to allow composite operations such as creating a BSC, 01562 # populating all of its data fields, and generating a keypair, all as a 01563 # single operation. With this model, that's trivial, otherwise it's at 01564 # least two round trips. 01565 # 01566 # Fields can be set in either "create" or "set" operations, the 01567 # difference just being whether the %object already exists. A "get" 01568 # operation returns all visible fields of the %object. A "list" 01569 # operation returns a %list containing what "get" would have returned on 01570 # each of those %objects. 01571 # 01572 # Left-right protocol %objects are encoded as signed CMS messages 01573 # containing XML as eContent and using an eContentType OID of @c id-ct-xml 01574 # (1.2.840.113549.1.9.16.1.28). These CMS messages are in turn passed 01575 # as the data for HTTPS POST operations, with an HTTP content type of 01576 # "application/x-rpki" for both the POST data and the response data. 01577 # 01578 # All operations allow an optional "tag" attribute which can be any 01579 # alphanumeric token. The main purpose of the tag attribute is to allow 01580 # batching of multiple requests into a single PDU. 01581 # 01582 # @subsection self_obj <self/> object 01583 # 01584 # A @c <self/> %object represents one virtual RPKI engine. In simple cases 01585 # where the RPKI engine operator operates the engine only on their own 01586 # behalf, there will only be one @c <self/> %object, representing the engine 01587 # operator's organization, but in environments where the engine operator 01588 # hosts other entities, there will be one @c @c <self/> %object per hosted 01589 # entity (probably including the engine operator's own organization, 01590 # considered as a hosted customer of itself). 01591 # 01592 # Some of the RPKI engine's configured parameters and data are shared by 01593 # all hosted entities, but most are tied to a specific @c <self/> %object. 01594 # Data which are shared by all hosted entities are referred to as 01595 # "per-engine" data, data which are specific to a particular @c <self/> 01596 # %object are "per-self" data. 01597 # 01598 # Since all other RPKI engine %objects refer to a @c <self/> %object via a 01599 # "self_handle" value, one must create a @c <self/> %object before one can 01600 # usefully configure any other left-right protocol %objects. 01601 # 01602 # Every @c <self/> %object has a self_handle attribute, which must be specified 01603 # for the "create", "set", "get", and "destroy" actions. 01604 # 01605 # Payload data which can be configured in a @c <self/> %object: 01606 # 01607 # @par @c use_hsm (attribute): 01608 # Whether to use a Hardware Signing Module. At present this option 01609 # has no effect, as the implementation does not yet support HSMs. 01610 # 01611 # @par @c crl_interval (attribute): 01612 # Positive integer representing the planned lifetime of an RPKI CRL 01613 # for this @c <self/>, measured in seconds. 01614 # 01615 # @par @c regen_margin (attribute): 01616 # Positive integer representing how long before expiration of an 01617 # RPKI certificiate a new one should be generated, measured in 01618 # seconds. At present this only affects the one-off EE 01619 # certificates associated with ROAs. This parameter also controls 01620 # how long before the nextUpdate time of CRL or manifest the CRL 01621 # or manifest should be updated. 01622 # 01623 # @par @c bpki_cert (element): 01624 # BPKI CA certificate for this @c <self/>. This is used as part of the 01625 # certificate chain when validating incoming TLS and CMS messages, 01626 # and should be the issuer of cross-certification BPKI certificates 01627 # used in @c <repository/>, @c <parent/>, and @c <child/> %objects. If the 01628 # bpki_glue certificate is in use (below), the bpki_cert certificate 01629 # should be issued by the bpki_glue certificate; otherwise, the 01630 # bpki_cert certificate should be issued by the per-engine bpki_ta 01631 # certificate. 01632 # 01633 # @par @c bpki_glue (element): 01634 # Another BPKI CA certificate for this @c <self/>, usually not needed. 01635 # Certain pathological cross-certification cases require a 01636 # two-certificate chain due to issuer name conflicts. If used, the 01637 # bpki_glue certificate should be the issuer of the bpki_cert 01638 # certificate and should be issued by the per-engine bpki_ta 01639 # certificate; if not needed, the bpki_glue certificate should be 01640 # left unset. 01641 # 01642 # Control attributes that can be set to "yes" to force actions: 01643 # 01644 # @par @c rekey: 01645 # Start a key rollover for every RPKI CA associated with every 01646 # @c <parent/> %object associated with this @c <self/> %object. This is the 01647 # first phase of a key rollover operation. 01648 # 01649 # @par @c revoke: 01650 # Revoke any remaining certificates for any expired key associated 01651 # with any RPKI CA for any @c <parent/> %object associated with this 01652 # @c <self/> %object. This is the second (cleanup) phase for a key 01653 # rollover operation; it's separate from the first phase to leave 01654 # time for new RPKI certificates to propegate and be installed. 01655 # 01656 # @par @c reissue: 01657 # Not implemented, may be removed from protocol. Original theory 01658 # was that this operation would force reissuance of any %object with 01659 # a changed key, but as that happens automatically as part of the 01660 # key rollover mechanism this operation seems unnecessary. 01661 # 01662 # @par @c run_now: 01663 # Force immediate processing for all tasks associated with this 01664 # @c <self/> %object that would ordinarily be performed under cron. Not 01665 # currently implemented. 01666 # 01667 # @par @c publish_world_now: 01668 # Force (re)publication of every publishable %object for this @c <self/> 01669 # %object. Not currently implemented. Intended to aid in recovery 01670 # if RPKI engine and publication engine somehow get out of sync. 01671 # 01672 # 01673 # @subsection bsc_obj <bsc/> object 01674 # 01675 # The @c <bsc/> ("business signing context") %object represents all the BPKI 01676 # data needed to sign outgoing CMS or HTTPS messages. Various other 01677 # %objects include pointers to a @c <bsc/> %object. Whether a particular 01678 # @c <self/> uses only one @c <bsc/> or multiple is a configuration decision 01679 # based on external requirements: the RPKI engine code doesn't care, it 01680 # just cares that, for any %object representing a relationship for which 01681 # it must sign messages, there be a @c <bsc/> %object that it can use to 01682 # produce that signature. 01683 # 01684 # Every @c <bsc/> %object has a bsc_handle, which must be specified for the 01685 # "create", "get", "set", and "destroy" actions. Every @c <bsc/> also has a self_handle 01686 # attribute which indicates the @c <self/> %object with which this @c <bsc/> 01687 # %object is associated. 01688 # 01689 # Payload data which can be configured in a @c <isc/> %object: 01690 # 01691 # @par @c signing_cert (element): 01692 # BPKI certificate to use when generating a signature. 01693 # 01694 # @par @c signing_cert_crl (element): 01695 # CRL which would %list signing_cert if it had been revoked. 01696 # 01697 # Control attributes that can be set to "yes" to force actions: 01698 # 01699 # @par @c generate_keypair: 01700 # Generate a new BPKI keypair and return a PKCS #10 certificate 01701 # request. The resulting certificate, once issued, should be 01702 # configured as this @c <bsc/> %object's signing_cert. 01703 # 01704 # Additional attributes which may be specified when specifying 01705 # "generate_keypair": 01706 # 01707 # @par @c key_type: 01708 # Type of BPKI keypair to generate. "rsa" is both the default and, 01709 # at the moment, the only allowed value. 01710 # 01711 # @par @c hash_alg: 01712 # Cryptographic hash algorithm to use with this keypair. "sha256" 01713 # is both the default and, at the moment, the only allowed value. 01714 # 01715 # @par @c key_length: 01716 # Length in bits of the keypair to be generated. "2048" is both the 01717 # default and, at the moment, the only allowed value. 01718 # 01719 # Replies to "create" and "set" actions that specify "generate-keypair" 01720 # include a <bsc_pkcs10/> element, as do replies to "get" and "list" 01721 # actions for a @c <bsc/> %object for which a "generate-keypair" command has 01722 # been issued. The RPKI engine stores the PKCS #10 request, which 01723 # allows the IRBE to reuse the request if and when it needs to reissue 01724 # the corresponding BPKI signing certificate. 01725 # 01726 # @subsection parent_obj <parent/> object 01727 # 01728 # The @c <parent/> %object represents the RPKI engine's view of a particular 01729 # parent of the current @c <self/> %object in the up-down protocol. Due to 01730 # the way that the resource hierarchy works, a given @c <self/> may obtain 01731 # resources from multiple parents, but it will always have at least one; 01732 # in the case of IANA or an RIR, the parent RPKI engine may be a trivial 01733 # stub. 01734 # 01735 # Every @c <parent/> %object has a parent_handle, which must be specified for 01736 # the "create", "get", "set", and "destroy" actions. Every @c <parent/> also has a 01737 # self_handle attribute which indicates the @c <self/> %object with which this 01738 # @c <parent/> %object is associated, a bsc_handle attribute indicating the @c <bsc/> 01739 # %object to be used when signing messages sent to this parent, and a 01740 # repository_handle indicating the @c <repository/> %object to be used when 01741 # publishing issued by the certificate issued by this parent. 01742 # 01743 # Payload data which can be configured in a @c <parent/> %object: 01744 # 01745 # @par @c peer_contact_uri (attribute): 01746 # HTTPS URI used to contact this parent. 01747 # 01748 # @par @c sia_base (attribute): 01749 # The leading portion of an rsync URI that the RPKI engine should 01750 # use when composing the publication URI for %objects issued by the 01751 # RPKI certificate issued by this parent. 01752 # 01753 # @par @c sender_name (attribute): 01754 # Sender name to use in the up-down protocol when talking to this 01755 # parent. The RPKI engine doesn't really care what this value is, 01756 # but other implementations of the up-down protocol do care. 01757 # 01758 # @par @c recipient_name (attribute): 01759 # Recipient name to use in the up-down protocol when talking to this 01760 # parent. The RPKI engine doesn't really care what this value is, 01761 # but other implementations of the up-down protocol do care. 01762 # 01763 # @par @c bpki_cms_cert (element): 01764 # BPKI CMS CA certificate for this @c <parent/>. This is used as part 01765 # of the certificate chain when validating incoming CMS messages If 01766 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01767 # certificate should be issued by the bpki_cms_glue certificate; 01768 # otherwise, the bpki_cms_cert certificate should be issued by the 01769 # bpki_cert certificate in the @c <self/> %object. 01770 # 01771 # @par @c bpki_cms_glue (element): 01772 # Another BPKI CMS CA certificate for this @c <parent/>, usually not 01773 # needed. Certain pathological cross-certification cases require a 01774 # two-certificate chain due to issuer name conflicts. If used, the 01775 # bpki_cms_glue certificate should be the issuer of the 01776 # bpki_cms_cert certificate and should be issued by the bpki_cert 01777 # certificate in the @c <self/> %object; if not needed, the 01778 # bpki_cms_glue certificate should be left unset. 01779 # 01780 # @par @c bpki_https_cert (element): 01781 # BPKI HTTPS CA certificate for this @c <parent/>. This is like the 01782 # bpki_cms_cert %object, only used for validating incoming TLS 01783 # messages rather than CMS. 01784 # 01785 # @par @c bpki_cms_glue (element): 01786 # Another BPKI HTTPS CA certificate for this @c <parent/>, usually not 01787 # needed. This is like the bpki_cms_glue certificate, only used for 01788 # validating incoming TLS messages rather than CMS. 01789 # 01790 # Control attributes that can be set to "yes" to force actions: 01791 # 01792 # @par @c rekey: 01793 # This is like the rekey command in the @c <self/> %object, but limited 01794 # to RPKI CAs under this parent. 01795 # 01796 # @par @c reissue: 01797 # This is like the reissue command in the @c <self/> %object, but limited 01798 # to RPKI CAs under this parent. 01799 # 01800 # @par @c revoke: 01801 # This is like the revoke command in the @c <self/> %object, but limited 01802 # to RPKI CAs under this parent. 01803 # 01804 # @subsection child_obj <child/> object 01805 # 01806 # The @c <child/> %object represents the RPKI engine's view of particular 01807 # child of the current @c <self/> in the up-down protocol. 01808 # 01809 # Every @c <child/> %object has a child_handle, which must be specified for the 01810 # "create", "get", "set", and "destroy" actions. Every @c <child/> also has a 01811 # self_handle attribute which indicates the @c <self/> %object with which this 01812 # @c <child/> %object is associated. 01813 # 01814 # Payload data which can be configured in a @c <child/> %object: 01815 # 01816 # @par @c bpki_cert (element): 01817 # BPKI CA certificate for this @c <child/>. This is used as part of 01818 # the certificate chain when validating incoming TLS and CMS 01819 # messages. If the bpki_glue certificate is in use (below), the 01820 # bpki_cert certificate should be issued by the bpki_glue 01821 # certificate; otherwise, the bpki_cert certificate should be issued 01822 # by the bpki_cert certificate in the @c <self/> %object. 01823 # 01824 # @par @c bpki_glue (element): 01825 # Another BPKI CA certificate for this @c <child/>, usually not needed. 01826 # Certain pathological cross-certification cases require a 01827 # two-certificate chain due to issuer name conflicts. If used, the 01828 # bpki_glue certificate should be the issuer of the bpki_cert 01829 # certificate and should be issued by the bpki_cert certificate in 01830 # the @c <self/> %object; if not needed, the bpki_glue certificate 01831 # should be left unset. 01832 # 01833 # Control attributes that can be set to "yes" to force actions: 01834 # 01835 # @par @c reissue: 01836 # Not implemented, may be removed from protocol. 01837 # 01838 # @subsection repository_obj <repository/> object 01839 # 01840 # The @c <repository/> %object represents the RPKI engine's view of a 01841 # particular publication repository used by the current @c <self/> %object. 01842 # 01843 # Every @c <repository/> %object has a repository_handle, which must be 01844 # specified for the "create", "get", "set", and "destroy" actions. Every 01845 # @c <repository/> also has a self_handle attribute which indicates the @c <self/> 01846 # %object with which this @c <repository/> %object is associated. 01847 # 01848 # Payload data which can be configured in a @c <repository/> %object: 01849 # 01850 # @par @c peer_contact_uri (attribute): 01851 # HTTPS URI used to contact this repository. 01852 # 01853 # @par @c bpki_cms_cert (element): 01854 # BPKI CMS CA certificate for this @c <repository/>. This is used as part 01855 # of the certificate chain when validating incoming CMS messages If 01856 # the bpki_cms_glue certificate is in use (below), the bpki_cms_cert 01857 # certificate should be issued by the bpki_cms_glue certificate; 01858 # otherwise, the bpki_cms_cert certificate should be issued by the 01859 # bpki_cert certificate in the @c <self/> %object. 01860 # 01861 # @par @c bpki_cms_glue (element): 01862 # Another BPKI CMS CA certificate for this @c <repository/>, usually not 01863 # needed. Certain pathological cross-certification cases require a 01864 # two-certificate chain due to issuer name conflicts. If used, the 01865 # bpki_cms_glue certificate should be the issuer of the 01866 # bpki_cms_cert certificate and should be issued by the bpki_cert 01867 # certificate in the @c <self/> %object; if not needed, the 01868 # bpki_cms_glue certificate should be left unset. 01869 # 01870 # @par @c bpki_https_cert (element): 01871 # BPKI HTTPS CA certificate for this @c <repository/>. This is like the 01872 # bpki_cms_cert %object, only used for validating incoming TLS 01873 # messages rather than CMS. 01874 # 01875 # @par @c bpki_cms_glue (element): 01876 # Another BPKI HTTPS CA certificate for this @c <repository/>, usually not 01877 # needed. This is like the bpki_cms_glue certificate, only used for 01878 # validating incoming TLS messages rather than CMS. 01879 # 01880 # At present there are no control attributes for @c <repository/> %objects. 01881 # 01882 # @subsection route_origin_obj <route_origin/> object 01883 # 01884 # This section is out-of-date. The @c <route_origin/> %object 01885 # has been replaced by the @c <list_roa_requests/> IRDB query, 01886 # but the documentation for that hasn't been written yet. 01887 # 01888 # The @c <route_origin/> %object is a kind of prototype for a ROA. It 01889 # contains all the information needed to generate a ROA once the RPKI 01890 # engine obtains the appropriate RPKI certificates from its parent(s). 01891 # 01892 # Note that a @c <route_origin/> %object represents a ROA to be generated on 01893 # behalf of @c <self/>, not on behalf of a @c <child/>. Thus, a hosted entity 01894 # that has no children but which does need to generate ROAs would be 01895 # represented by a hosted @c <self/> with no @c <child/> %objects but one or 01896 # more @c <route_origin/> %objects. While lumping ROA generation in with 01897 # the other RPKI engine activities may seem a little odd at first, it's 01898 # a natural consequence of the design requirement that the RPKI daemon 01899 # never transmit private keys across the network in any form; given this 01900 # requirement, the RPKI engine that holds the private keys for an RPKI 01901 # certificate must also be the engine which generates any ROAs that 01902 # derive from that RPKI certificate. 01903 # 01904 # The precise content of the @c <route_origin/> has changed over time as 01905 # the underlying ROA specification has changed. The current 01906 # implementation as of this writing matches what we expect to see in 01907 # draft-ietf-sidr-roa-format-03, once it is issued. In particular, note 01908 # that the exactMatch boolean from the -02 draft has been replaced by 01909 # the prefix and maxLength encoding used in the -03 draft. 01910 # 01911 # Payload data which can be configured in a @c <route_origin/> %object: 01912 # 01913 # @par @c asn (attribute): 01914 # Autonomous System Number (ASN) to place in the generated ROA. A 01915 # single ROA can only grant authorization to a single ASN; multiple 01916 # ASNs require multiple ROAs, thus multiple @c <route_origin/> %objects. 01917 # 01918 # @par @c ipv4 (attribute): 01919 # %List of IPv4 prefix and maxLength values, see below for format. 01920 # 01921 # @par @c ipv6 (attribute): 01922 # %List of IPv6 prefix and maxLength values, see below for format. 01923 # 01924 # Control attributes that can be set to "yes" to force actions: 01925 # 01926 # @par @c suppress_publication: 01927 # Not implemented, may be removed from protocol. 01928 # 01929 # The lists of IPv4 and IPv6 prefix and maxLength values are represented 01930 # as comma-separated text strings, with no whitespace permitted. Each 01931 # entry in such a string represents a single prefix/maxLength pair. 01932 # 01933 # ABNF for these address lists: 01934 # 01935 # @verbatim 01936 # 01937 # <ROAIPAddress> ::= <address> "/" <prefixlen> [ "-" <max_prefixlen> ] 01938 # ; Where <max_prefixlen> defaults to the same 01939 # ; value as <prefixlen>. 01940 # 01941 # <ROAIPAddressList> ::= <ROAIPAddress> *( "," <ROAIPAddress> ) 01942 # 01943 # @endverbatim 01944 # 01945 # For example, @c "10.0.1.0/24-32,10.0.2.0/24", which is a shorthand 01946 # form of @c "10.0.1.0/24-32,10.0.2.0/24-24". 01947 # 01948 # @section irdb_queries Operations initiated by the RPKI engine 01949 # 01950 # The left-right protocol also includes queries from the RPKI engine 01951 # back to the IRDB. These queries do not follow the message-passing 01952 # pattern used in the IRBE-initiated part of the protocol. Instead, 01953 # there's a single query back to the IRDB, with a corresponding 01954 # response. The CMS and HTTPS encoding are the same as in the rest of 01955 # the protocol, but the BPKI certificates will be different as the 01956 # back-queries and responses form a separate communication channel. 01957 # 01958 # @subsection list_resources_msg <list_resources/> messages 01959 # 01960 # The @c <list_resources/> query and response allow the RPKI engine to ask 01961 # the IRDB for information about resources assigned to a particular 01962 # child. The query must include both a @c "self_handle" attribute naming 01963 # the @c <self/> that is making the request and also a @c "child_handle" 01964 # attribute naming the child that is the subject of the query. The 01965 # query and response also allow an optional @c "tag" attribute of the 01966 # same form used elsewhere in this protocol, to allow batching. 01967 # 01968 # A @c <list_resources/> response includes the following attributes, along 01969 # with the @c tag (if specified), @c self_handle, and @c child_handle copied 01970 # from the request: 01971 # 01972 # @par @c valid_until: 01973 # A timestamp indicating the date and time at which certificates 01974 # generated by the RPKI engine for these data should expire. The 01975 # timestamp is expressed as an XML @c xsd:dateTime, must be 01976 # expressed in UTC, and must carry the "Z" suffix indicating UTC. 01977 # 01978 # @par @c asn: 01979 # A %list of autonomous sequence numbers, expressed as a 01980 # comma-separated sequence of decimal integers with no whitespace. 01981 # 01982 # @par @c ipv4: 01983 # A %list of IPv4 address prefixes and ranges, expressed as a 01984 # comma-separated %list of prefixes and ranges with no whitespace. 01985 # See below for format details. 01986 # 01987 # @par @c ipv6: 01988 # A %list of IPv6 address prefixes and ranges, expressed as a 01989 # comma-separated %list of prefixes and ranges with no whitespace. 01990 # See below for format details. 01991 # 01992 # Entries in a %list of address prefixes and ranges can be either 01993 # prefixes, which are written in the usual address/prefixlen notation, 01994 # or ranges, which are expressed as a pair of addresses denoting the 01995 # beginning and end of the range, written in ascending order separated 01996 # by a single "-" character. This format is superficially similar to 01997 # the format used for prefix and maxLength values in the @c <route_origin/> 01998 # %object, but the semantics differ: note in particular that 01999 # @c <route_origin/> %objects don't allow ranges, while @c <list_resources/> 02000 # messages don't allow a maxLength specification. 02001 # 02002 # @section left_right_error_handling Error handling 02003 # 02004 # Error in this protocol are handled at two levels. 02005 # 02006 # Since all messages in this protocol are conveyed over HTTPS 02007 # connections, basic errors are indicated via the HTTP response code. 02008 # 4xx and 5xx responses indicate that something bad happened. Errors 02009 # that make it impossible to decode a query or encode a response are 02010 # handled in this way. 02011 # 02012 # Where possible, errors will result in a @c <report_error/> message which 02013 # takes the place of the expected protocol response message. 02014 # @c <report_error/> messages are CMS-signed XML messages like the rest of 02015 # this protocol, and thus can be archived to provide an audit trail. 02016 # 02017 # @c <report_error/> messages only appear in replies, never in queries. 02018 # The @c <report_error/> message can appear on either the "forward" (IRBE 02019 # as client of RPKI engine) or "back" (RPKI engine as client of IRDB) 02020 # communication channel. 02021 # 02022 # The @c <report_error/> message includes an optional @c "tag" attribute to 02023 # assist in matching the error with a particular query when using 02024 # batching, and also includes a @c "self_handle" attribute indicating the 02025 # @c <self/> that issued the error. 02026 # 02027 # The error itself is conveyed in the @c error_code (attribute). The 02028 # value of this attribute is a token indicating the specific error that 02029 # occurred. At present this will be the name of a Python exception; the 02030 # production version of this protocol will nail down the allowed error 02031 # tokens here, probably in the RelaxNG schema. 02032 # 02033 # The body of the @c <report_error/> element itself is an optional text 02034 # string; if present, this is debugging information. At present this 02035 # capabilty is not used, debugging information goes to syslog. 02036 02037 ## @page Publication Publication protocol 02038 # 02039 # The %publication protocol is really two separate client/server 02040 # protocols, between different parties. The first is a configuration 02041 # protocol for an IRBE to use to configure a %publication engine, 02042 # the second is the interface by which authorized clients request 02043 # %publication of specific objects. 02044 # 02045 # Much of the architecture of the %publication protocol is borrowed 02046 # from the @ref Left-Right "left-right protocol": like the 02047 # left-right protocol, the %publication protocol uses CMS-wrapped XML 02048 # over HTTPS with the same eContentType OID and the same HTTPS 02049 # content-type, and the overall style of the XML messages is very 02050 # similar to the left-right protocol. All operations allow an 02051 # optional "tag" attribute to allow batching. 02052 # 02053 # The %publication engine operates a single HTTPS server which serves 02054 # both of these subprotocols. The two subprotocols share a single 02055 # server port, but use distinct URLs to allow demultiplexing. 02056 # 02057 # @section Publication-control Publication control subprotocol 02058 # 02059 # The control subprotocol reuses the message-passing design of the 02060 # left-right protocol. Configured objects support the "create", "set", 02061 # "get", "list", and "destroy" actions, or a subset thereof when the 02062 # full set of actions doesn't make sense. 02063 # 02064 # @subsection config_obj <config/> object 02065 # 02066 # The <config/> %object allows configuration of data that apply to the 02067 # entire %publication server rather than a particular client. 02068 # 02069 # There is exactly one <config/> %object in the %publication server, and 02070 # it only supports the "set" and "get" actions -- it cannot be created 02071 # or destroyed. 02072 # 02073 # Payload data which can be configured in a <config/> %object: 02074 # 02075 # @par @c bpki_crl (element): 02076 # This is the BPKI CRL used by the %publication server when 02077 # signing the CMS wrapper on responses in the %publication 02078 # subprotocol. As the CRL must be updated at regular intervals, 02079 # it's not practical to restart the %publication server when the 02080 # BPKI CRL needs to be updated. The BPKI model doesn't require 02081 # use of a BPKI CRL between the IRBE and the %publication server, 02082 # so we can use the %publication control subprotocol to update the 02083 # BPKI CRL. 02084 # 02085 # @subsection client_obj <client/> object 02086 # 02087 # The <client/> %object represents one client authorized to use the 02088 # %publication server. 02089 # 02090 # The <client/> %object supports the full set of "create", "set", "get", 02091 # "list", and "destroy" actions. Each client has a "client_handle" 02092 # attribute, which is used in responses and must be specified in "create", "set", 02093 # "get", or "destroy" actions. 02094 # 02095 # Payload data which can be configured in a <client/> %object: 02096 # 02097 # @par @c base_uri (attribute): 02098 # This is the base URI below which this client is allowed to publish 02099 # data. The %publication server may impose additional constraints in 02100 # the case of a child publishing beneath its parent. 02101 # 02102 # @par @c bpki_cert (element): 02103 # BPKI CA certificate for this <client/>. This is used as part of 02104 # the certificate chain when validating incoming TLS and CMS 02105 # messages. If the bpki_glue certificate is in use (below), the 02106 # bpki_cert certificate should be issued by the bpki_glue 02107 # certificate; otherwise, the bpki_cert certificate should be issued 02108 # by the %publication engine's bpki_ta certificate. 02109 # 02110 # @par @c bpki_glue (element): 02111 # Another BPKI CA certificate for this <client/>, usually not 02112 # needed. Certain pathological cross-certification cases require a 02113 # two-certificate chain due to issuer name conflicts. If used, the 02114 # bpki_glue certificate should be the issuer of the bpki_cert 02115 # certificate and should be issued by the %publication engine's 02116 # bpki_ta certificate; if not needed, the bpki_glue certificate 02117 # should be left unset. 02118 # 02119 # @section Publication-publication Publication subprotocol 02120 # 02121 # The %publication subprotocol is structured somewhat differently from 02122 # the %publication control protocol. Objects in the %publication 02123 # subprotocol represent objects to be published or objects to be 02124 # withdrawn from %publication. Each kind of %object supports two actions: 02125 # "publish" and "withdraw". In each case the XML element representing 02126 # hte %object to be published or withdrawn has a "uri" attribute which 02127 # contains the %publication URI. For "publish" actions, the XML element 02128 # body contains the DER %object to be published, encoded in Base64; for 02129 # "withdraw" actions, the XML element body is empty. 02130 # 02131 # In theory, the detailed access control for each kind of %object might 02132 # be different. In practice, as of this writing, access control for all 02133 # objects is a simple check that the client's @c "base_uri" is a leading 02134 # substring of the %publication URI. Details of why access control might 02135 # need to become more complicated are discussed in a later section. 02136 # 02137 # @subsection certificate_obj <certificate/> object 02138 # 02139 # The <certificate/> %object represents an RPKI certificate to be 02140 # published or withdrawn. 02141 # 02142 # @subsection crl_obj <crl/> object 02143 # 02144 # The <crl/> %object represents an RPKI CRL to be published or withdrawn. 02145 # 02146 # @subsection manifest_obj <manifest/> object 02147 # 02148 # The <manifest/> %object represents an RPKI %publication %manifest to be 02149 # published or withdrawn. 02150 # 02151 # Note that part of the reason for the batching support in the 02152 # %publication protocol is because @em every %publication or withdrawal 02153 # action requires a new %manifest, thus every %publication or withdrawal 02154 # action will involve at least two objects. 02155 # 02156 # @subsection roa_obj <roa/> object 02157 # 02158 # The <roa/> %object represents a ROA to be published or withdrawn. 02159 # 02160 # @section publication_error_handling Error handling 02161 # 02162 # Error in this protocol are handled at two levels. 02163 # 02164 # Since all messages in this protocol are conveyed over HTTPS 02165 # connections, basic errors are indicated via the HTTP response code. 02166 # 4xx and 5xx responses indicate that something bad happened. Errors 02167 # that make it impossible to decode a query or encode a response are 02168 # handled in this way. 02169 # 02170 # Where possible, errors will result in a <report_error/> message which 02171 # takes the place of the expected protocol response message. 02172 # <report_error/> messages are CMS-signed XML messages like the rest of 02173 # this protocol, and thus can be archived to provide an audit trail. 02174 # 02175 # <report_error/> messages only appear in replies, never in 02176 # queries. The <report_error/> message can appear in both the 02177 # control and publication subprotocols. 02178 # 02179 # The <report_error/> message includes an optional @c "tag" attribute to 02180 # assist in matching the error with a particular query when using 02181 # batching. 02182 # 02183 # The error itself is conveyed in the @c error_code (attribute). The 02184 # value of this attribute is a token indicating the specific error that 02185 # occurred. At present this will be the name of a Python exception; the 02186 # production version of this protocol will nail down the allowed error 02187 # tokens here, probably in the RelaxNG schema. 02188 # 02189 # The body of the <report_error/> element itself is an optional text 02190 # string; if present, this is debugging information. At present this 02191 # capabilty is not used, debugging information goes to syslog. 02192 # 02193 # @section publication_access_control Additional access control considerations. 02194 # 02195 # As detailed above, the %publication protocol is trivially simple. This 02196 # glosses over two bits of potential complexity: 02197 # 02198 # @li In the case where parent and child are sharing a repository, we'd 02199 # like to nest child under parent, because testing has demonstrated 02200 # that even on relatively slow hardware the delays involved in 02201 # setting up separate rsync connections tend to dominate 02202 # synchronization time for relying parties. 02203 # 02204 # @li The repository operator might also want to do some checks to 02205 # assure itself that what it's about to allow the RPKI engine to 02206 # publish is not dangerous toxic waste. 02207 # 02208 # The up-down protocol includes a mechanism by which a parent can 02209 # suggest a %publication URI to each of its children. The children are 02210 # not required to accept this hint, and the children must make separate 02211 # arrangements with the repository operator (who might or might not be 02212 # the same as the entity that hosts the children's RPKI engine 02213 # operations) to use the suggested %publication point, but if everything 02214 # works out, this allows children to nest cleanly under their parents 02215 # %publication points, which helps reduce synchronization time for 02216 # relying parties. 02217 # 02218 # In this case, one could argue that the %publication server is 02219 # responsible for preventing one of its clients (the child in the above 02220 # description) from stomping on data published by another of its clients 02221 # (the parent in the above description). This goes beyond the basic 02222 # access check and requires the %publication server to determine whether 02223 # the parent has given its consent for the child to publish under the 02224 # parent. Since the RPKI certificate profile requires the child's 02225 # %publication point to be indicated in an SIA extension in a certificate 02226 # issued by the parent to the child, the %publication engine can infer 02227 # this permission from the parent's issuance of a certificate to the 02228 # child. Since, by definition, the parent also uses this %publication 02229 # server, this is an easy check, as the %publication server should 02230 # already have the parent's certificate available by the time it needs 02231 # to check the child's certificate. 02232 # 02233 # The previous paragraph only covers a "publish" action for a 02234 # <certificate/> %object. For "publish" actions on other 02235 # objects, the %publication server would need to trace permission back 02236 # to the certificate issued by the parent; for "withdraw" actions, 02237 # the %publication server would have to perform the same checks it 02238 # would perform for a "publish" action, using the current published 02239 # data before withdrawing it. The latter in turn implies an ordering 02240 # constraint on "withdraw" actions in order to preserve the data 02241 # necessary for these access control decisions; as this may prove 02242 # impractical, the %publication server may probably need to make 02243 # periodic sweeps over its published data looking for orphaned 02244 # objects, but that's probably a good idea anyway. 02245 # 02246 # Note that, in this %publication model, any agreement that the 02247 # repository makes to publish the RPKI engine's output is conditional 02248 # upon the %object to be published passing whatever access control checks 02249 # the %publication server imposes. 02250 02251 ## @page sql-schemas SQL database schemas 02252 # 02253 # @li @subpage rpkid-sql "rpkid database schema" 02254 # @li @subpage pubd-sql "pubd database schema" 02255 # @li @subpage irdbd-sql "irdbd database schema" 02256 02257 ## @page rpkid-sql rpkid SQL schema 02258 # 02259 # @image html /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/rpkid.png "Diagram of rpkid.sql" 02260 # @image latex /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/rpkid.eps "Diagram of rpkid.sql" height=\textheight 02261 # 02262 # @verbinclude rpkid.sql 02263 02264 ## @page pubd-sql pubd SQL Schema 02265 # 02266 # @image html /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/pubd.png "Diagram of pubd.sql" 02267 # @image latex /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/pubd.eps "Diagram of pubd.sql" width=\textwidth 02268 # 02269 # @verbinclude /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/pubd.sql 02270 02271 ## @page irdbd-sql irdbd SQL Schema 02272 # 02273 # @image html /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/irdbd.png "Diagram of irdbd.sql" 02274 # @image latex /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/irdbd.eps "Diagram of irdbd.sql" width=\textwidth 02275 # 02276 # @verbinclude /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/irdbd.sql 02277 02278 ## @page bpki-model BPKI model 02279 # 02280 # The "business PKI" (BPKI) is the PKI used to authenticate 02281 # communication on the up-down, left-right, and %publication protocols. 02282 # BPKI certificates are @em not resource PKI (RPKI) certificates. The 02283 # BPKI is a separate PKI that represents relationships between the 02284 # various entities involved in the production side of the RPKI system. 02285 # In most cases the BPKI tree will follow existing business 02286 # relationships, hence the "B" (Business) in "BPKI". 02287 # 02288 # Setup of the BPKI is handled by the back end; for the most part, 02289 # rpkid and pubd just use the result. The one place where the engines 02290 # are directly involved in creation of new BPKI certificates is in the 02291 # production of end-entity certificates for use by the engines. 02292 # 02293 # For the most part an ordinary user of this package need not worry 02294 # about the details explained here, as the 02295 # @ref MyRPKI "myrpki tool" 02296 # takes care of all of this. However, users who want to understand 02297 # what's going on behind the scenes or who have needs too complex for 02298 # the myrpki tool to handle might want to understand the underlying 02299 # model. 02300 # 02301 # There are a few design principals that underly the chosen BPKI model: 02302 # 02303 # @li Each engine should rely on a single BPKI trust anchor which is 02304 # controlled by the back end entity that runs the engine; all 02305 # other trust material should be cross-certified into the engine's 02306 # BPKI tree. 02307 # 02308 # @li Private keys must never transit the network. 02309 # 02310 # @li Except for end entity certificates, the engine should only have 02311 # access to the BPKI certificates; in particular, the private key 02312 # for the BPKI trust anchor should not be accessible to the engine. 02313 # 02314 # @li The number of BPKI keys and certificates that the engine has to 02315 # manage should be no larger than is necessary. 02316 # 02317 # rpkid's hosting model adds an additional constraint: rpkid's BPKI 02318 # trust anchor belongs to the entity operating rpkid, but the entities 02319 # hosted by rpkid should have control of their own BPKI private keys. 02320 # This implies the need for an additional layer of BPKI certificate 02321 # hierarchy within rpkid. 02322 # 02323 # Here is a simplified picture of what the BPKI might look like for an 02324 # rpkid operator that hosts two entities, "Alice" and "Ellen": 02325 # 02326 # @image html /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/rpkid-bpki.png 02327 # @image latex /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/rpkid-bpki.eps width=\textwidth 02328 # 02329 # Black objects belong to the hosting entity, blue objects belong to 02330 # the hosted entities, red objects are cross-certified objects from 02331 # the hosted entities' peers. The arrows indicate certificate 02332 # issuance: solid arrows are the ones that rpkid will care about 02333 # during certificate validation, dotted arrows show the origin of the 02334 # EE certificates that rpkid uses to sign CMS and TLS messages. 02335 # 02336 # There's one nasty bit where the model had to bend to fit the current 02337 # state of the underlying protocols: it's not possible to use exactly 02338 # the same BPKI keys and certificates for HTTPS and CMS. The reason 02339 # for this is simple: each hosted entity has its own BPKI, as does the 02340 # hosting entity, but the HTTPS listener is shared. The only ways to 02341 # avoid sharing the HTTPS server certificate would be to use separate 02342 # listeners for each hosted entity, which scales poorly, or to rely on 02343 # the TLS "Server Name Indication" extension (RFC 4366 3.1) which is 02344 # not yet widely implemented. 02345 # 02346 # The certificate tree looks complicated, but the set of certificates 02347 # needed to build any particular validation chain is obvious, again 02348 # excepting the HTTPS server case, where the client certificate is the 02349 # first hint that the engine has of the client's identity, so the 02350 # server must be prepared to accept any current client certificate. 02351 # 02352 # Detailed instructions on how to build a BPKI are beyond the scope of 02353 # this document, but one can handle simple cases using the OpenSSL 02354 # command line tool and cross_certify; the latter is a tool 02355 # designed specifically for the purpose of generating the 02356 # cross-certification certificates needed to splice foreign trust 02357 # material into a BPKI tree. 02358 # 02359 # The BPKI tree for a pubd instance is similar to to the BPKI tree for 02360 # an rpkid instance, but is a bit simpler, as pubd does not provide 02361 # hosting in the same sense that rpkid does: pubd is a relatively 02362 # simple server that publishes objects as instructed by its clients. 02363 # 02364 # Here's a simplified picture of what the BPKI might look like for a 02365 # pubd operator that serves two clients, "Alice" and "Bob": 02366 # 02367 # @image html /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/pubd-bpki.png 02368 # @image latex /u/sra/rpki/subvert-rpki.hactrn.net/rpkid/doc/pubd-bpki.eps width=\textwidth 02369 # 02370 # While it is likely that RIRs (at least) will operate both rpkid and 02371 # pubd instances, the two functions are conceptually separate. As far 02372 # as pubd is concerned, it doesn't matter who operates the rpkid 02373 # instance: pubd just has clients, each of which has trust material 02374 # that has been cross-certified into pubd's BPKI. Similarly, rpkid 02375 # doesn't really care who operates a pubd instance that it's been 02376 # configured to use, it just treats that pubd as a foreign BPKI whose 02377 # trust material has to be cross-certified into its own BPKI. Cross 02378 # certification itself is done by the back end operator, using 02379 # cross_certify or some equivalent tool; the resulting BPKI 02380 # certificates are configured into rpkid and pubd via the left-right 02381 # protocol and the control subprotocol of the publication protocol, 02382 # respectively. 02383 # 02384 # Because the BPKI tree is almost entirely controlled by the operating 02385 # entity, CRLs are not necessary for most of the BPKI. The one 02386 # exception to this is the EE certificates issued under the 02387 # cross-certification points. These EE certificates are generated by 02388 # the peer, not the local operator, and thus require CRLs. Because of 02389 # this, both rpkid and pubd require regular updates of certain BPKI 02390 # CRLs, again via the left-right and publication control protocols. 02391 # 02392 # Because the left-right protocol and the publication control 02393 # subprotocol are used to configure BPKI certificates and CRLs, they 02394 # cannot themselves use certificates and CRLs configured in this way. 02395 # This is why the configuration files for rpkid and pubd require 02396 # static configuration of the left-right and publication control 02397 # certificates. 02398 02399 # Local Variables: 02400 # mode:python 02401 # compile-command: "cd ../.. && ./config.status && cd rpkid && make docs" 02402 # End: