A Publication Protocol for the Resource Public Key Infrastructure (RPKI)
W3C / MITweiler@csail.mit.eduTowerSec Automotive Cyber Securityasonalker@tower-sec.comDragon Research Labssra@hactrn.netSIDR
This document defines a protocol for publishing Resource
Public Key Infrastructure (RPKI) objects. Even though the
RPKI will have many participants issuing certificates and
creating other objects, it is operationally useful to
consolidate the publication of those objects. Even in cases
where a certificate issuer runs their own publication
repository, it can be useful to run the certificate engine
itself on a different machine from the publication repository.
This document defines a protocol which addresses these needs.
This document assumes a working knowledge of the Resource
Public Key Infrastructure (RPKI), which is intended to support
improved routing security on the Internet.
See for an overview of the RPKI.
In order to make participation in the RPKI easier, it is
helpful to have a few consolidated repositories for RPKI
objects, thus saving every participant from the cost of
maintaining a new service. Similarly, relying parties using
the RPKI objects will find it faster and more reliable to
retrieve the necessary set from a smaller number of
repositories.
These consolidated RPKI object repositories will in many cases
be outside the administrative scope of the organization
issuing a given RPKI object. In some cases, outsourcing
operation of the repository will be an explicit goal: some
resource holders who strongly wish to control their own RPKI
private keys may lack the resources to operate a 24x7
repository, or may simply not wish to do so.
The operator of an RPKI publication repository may well be an
Internet registry which issues certificates to its customers,
but it need not be; conceptually, operation of a an RPKI
publication repository is separate from operation of RPKI CA.
Even in cases where a resource holder operates both a
certificate engine and a publication repository, it can be
useful to separate the two functions, as they have somewhat
different operational and security requirements.
This document defines an RPKI publication protocol which
allows publication either within or across organizational
boundaries, and which makes fairly minimal demands on either
the CA engine or the publication service.
The authentication and message integrity architecture of the
publication protocol is essentially identical to the
architecture used in , because the
participants in this protocol are the same CA engines as in
RFC 6492; this allows reuse of the same "Business PKI"
("BPKI", see ) infrastructure
used to support RFC 6492. As in RCC 6492, authorization is a
matter of external configuration: we assume that any given
publication repository has some kind of policy controlling
which certificate engines are allowed to publish, modify, or
withdraw particular RPKI objects, most likely following the
recommendation in Section 4.4, the
details of this policy are a private matter between the
operator of a certificate engine and the operator of the
chosen publication repository.
The following diagram attempts to convey where this
publication protocol fits into the overall data flow between
the certificate issuers and relying parties:
The publication protocol itself is not visible to relying
parties: a relying party sees the public interface of the
publication server, which is an rsync or RRDP
() server.
Operators of certificate engines and publication repositories
may find a
useful tool in setting up the pairwise relationships between
these servers, but are not required to use it.
This protocol started out as an informal collaboration
between several of the early RPKI implementers, and while it
was always the designers' intention that the resulting
protocol end up on the IETF standards track, it took a few
years to get there, because standardization of other pieces
of the overall RPKI protocol space was more urgent. The
standards track version of this publication protocol
preserves the original XML namespace and protocol version
scheme in order to maintain backwards compatibility with
running code implemented against older versions of the
specification.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described
in .
"Publication engine" and "publication server" are used
interchangeably to refer to the server providing the service
described in this document.
"Business Public Key Infrastructure" ("Business PKI" or
"BPKI") refers to a PKI, separate from the RPKI, used to
authenticate clients to the publication engine. We use the
term "Business PKI" here because an Internet registry might
already have a PKI for authenticating its clients and might
wish to reuse that PKI for this protocol. There is,
however, no requirement to reuse such a PKI.
The publication protocol uses XML ()
messages wrapped in signed CMS messages, carried over HTTP
transport.
The publication protocol uses a simple request/response
interaction. The client passes a request to the server, and
the server generates a corresponding response.
A message exchange commences with the client initiating an
HTTP POST with content type of "application/rpki-publication",
with the message object as the body. The server's response
will similarly be the body of the response with a content type
of "application/rpki-publication".
The content of the POST and the server's response will be a
well-formed Cryptographic Message Syntax (CMS)
object with OID =
1.2.840.113549.1.7.2 as described in Section 3.1 of
.
The CMS signatures are used to protect the integrity of the
protocol messages and to authenticate the client and server to
each other. Authorization to perform particular operations is
a local matter, perhaps determined by contractual agreements
between the operators of any particular client-server pair,
but in any case is beyond the scope of this specification.
The XML schema for this protocol is below in
. The basic XML message format looks
like this:
Common attributes:
The value of this attribute is the version of this protocol.
This document describes version 4.
The possible values of this attribute are "reply" and "query".
A query PDU may be one of three types: <publish/>,
<withdraw/>, or <list/>.
A reply PDU may be one of three types: <success/>,
<list/>, or <report_error/>.
The <publish/> and <withdraw/> PDUs include a
"tag" attribute to facilitate bulk operation.
When performing bulk operations, a CA engine will probably
find it useful to specify a distinct tag value for each
<publish/> or <withdraw/> PDU, to simplify
matching an error with the PDU which triggered it. The tag
attribute is mandatory, to simplify parsing, but a CA engine
which has no particular use for tagging MAY use any
syntactically legal value, including simply using the empty
string for all tag fields.
The publication protocol uses a common message format to
request publication of any RPKI object. This format was
chosen specifically to allow this protocol to accommodate
new types of RPKI objects without needing changes to this
protocol.
Both the <publish/> and <withdraw/> PDUs have a
payload of a tag and a URI. The <publish/> query also
contains the DER object to be published, encoded in Base64.
Both the <publish/> and <withdraw/> PDUs also
have a "hash" attribute, which carries a hash of an existing
object at the specified repository URI, encoded as a
hexadecimal string. For
<withdraw/> PDUs, the hash MUST be present, as this
operation makes no sense if there is no existing object to
withdraw. For <publish/> PDUs, the hash is MUST be
present if the publication operation is overwriting an
existing object, and MUST NOT be present if this publication
operation is writing to a new URI where no prior object
exists. Presence of an object when no "hash" attribute has
been specified is an error, as is absence of an object or an
incorrect hash value when a "hash" attribute has been
specified. Any such errors MUST be reported using the
<report_error/> PDU.
The hash algorithm is SHA-256 , to
simplify comparison of publication protocol hashes with RPKI
manifest hashes.
The intent behind the "hash" attribute is to allow the client
and server to detect any disagreements about the effect that
a <publish/> or <withdraw/> PDU will have on
the repository.
Note that every publish and withdraw action requires a new
manifest, thus every publish or withdraw action will involve
at least two objects.
Processing of a query message is handled atomically: either
the entire query succeeds or none of it does. When a query
message contains multiple PDUs, failure of any PDU may
require the server to roll back actions triggered by earlier
PDUs.
When a query messages containing <publish/> or
<withdraw/> PDUs succeeds, the server returns a single
<success/> reply.
When a query fails, the server returns one or more
<report_error/> reply PDUs. Typically, a server will
only generate one <report_error/> corresponding to the
first query PDU that failed, but servers MAY
return multiple <report_error/> PDUs at the
implementor's discretion.
The <list/> operation allows the client to ask the server
for a complete listing of objects which the server believes
the client has published. This is intended primarily to
allow the client to recover upon detecting (probably via use
of the "hash" attribute, see
) that they have
somehow lost synchronization.
The <list/> query consists of a single PDU. A
<list/> query MUST be the only PDU in a query - it may
not be combined with any <publish/> or
<withdraw/> queries.
The <list/> reply consists of zero or more PDUs,
one per object published in this repository by this client,
each PDU conveying the URI and hash of one published object.
Errors are handled at two levels.
Errors that make it impossible to decode a query or encode a
response are handled at the HTTP layer. 4xx and 5xx HTTP
response codes indicate that something bad happened.
In all other cases, errors result in an XML
<report_error/> PDU. Like the rest of this
protocol, <report_error/> PDUs are CMS-signed XML
messages and thus can be archived to provide an audit trail.
<report_error/> PDUs only appear in replies,
never in queries.
The "tag" attribute of the <report_error/> PDU associated
with a <publish/> or <withdraw/> PDU MUST be
set to the same value as the "tag" attribute in the PDU
which generated the error. A client can use the "tag"
attribute to determine which PDU caused processing of an
update to fail.
The error itself is conveyed in the "error_code"
attribute. The value of this attribute is a token indicating
the specific error that occurred.
The body of the <report_error/> element contains two
sub-elements:
An optional text element <error_text/>, which if
present, contains a text string with debugging
information intended for human consumption.
An optional element <failed_pdu/>, which, if
present, contains a verbatim copy of the query PDU whose
failure triggered the <report_error/> PDU. The
quoted element must be syntactically valid.
See for examples of a
multi-element query and responses.
These are the defined error codes as well as some discussion
of each. Text similar to these descriptions may be sent in an
<error_text/> element to help explain the error encountered.
Encountered an XML problem. Note that some XML errors may
be severe enough to require error reporting at the HTTP
layer, instead. Implementations MAY choose to report
any or all XML errors at the HTTP layer.
Client does not have permission to update this URI.
Bad CMS signature.
An object is already present at this URI, yet a "hash"
attribute was not specified. A "hash" attribute must be
specified when overwriting or deleting an object.
Perhaps client and server are out of sync?
There is no object present at this URI, yet a "hash"
attribute was specified. Perhaps client and server are
out of sync?
The "hash" attribute supplied does not match the "hash"
attribute of the object at this URI. Perhaps client and
server are out of sync?
Server detected an update that looks like it will cause
a consistency problem (e.g. an object was deleted, but
the manifest was not updated). Note that a server is not
required to make such checks. Indeed, it may be unwise for
a server to do so. This error code just provides a way for
the server to explain its (in-)action.
A meteor fell on the server.
The following is a compact form
schema describing the Publication Protocol.
This schema is normative: in the event of a disagreement
between this schema and the document text above, this schema
is authoritative.
Following are examples of various queries and the
corresponding replies for the RPKI publication protocol.
Note the authors have taken liberties with the Base64, hash,
and URI text in these examples in the interest of making the
examples fit nicely into RFC text format.
There are two basic options open to the repository operator as to how
the publication tree is laid out. The first option is simple: each
publication client is given its own directory one level below the top
of the rsync module, and there is no overlap between the publication
spaces used by different clients. For example:
rsync://example.org/rpki/Alice/
rsync://example.org/rpki/Bob/
rsync://example.org/rpki/Carol/
This has the advantage of being very easy for the publication
operator to manage, but has the drawback of making it
difficult for relying parties to fetch published objects
efficiently, particularly for relying party implementations
which follow the safety rule of never retrieving anything from
a URI which didn't come directly from either a signed object
or a trust anchor locator.
Given that the mandatory-to-implement retrieval protocol for relying
parties is rsync, a more efficient repository structure would be one
which minimized the number of rsync fetches required. One such
structure would be one in which the publication directories for
subjects were placed underneath the publication directories of their
issuers: since the normal synchronization tree walk is top-down, this
can significantly reduce the total number of rsync connections
required to synchronize. For example:
rsync://example.org/rpki/Alice/
rsync://example.org/rpki/Alice/Bob/
rsync://example.org/rpki/Alice/Bob/Carol/
Preliminary measurement suggests that, in the case of large numbers of
small publication directories, the time needed to set up and tear down
individual rsync connections becomes significant, and that a properly
optimized tree structure can reduce synchronization time by an order
of magnitude.
The more complex tree structure does require careful attention
when setting up clients. In the example above, assuming that
Alice issues to Bob who in turn issues to Carol, Alice has
ceded control of a portion of her publication space to Bob,
who has in turn ceded a portion of that to Carol.
The details of how the repository operator determines that Alice has
given Bob permission to nest Bob's publication directory under Alice's
is outside the scope of this protocol.
IANA is asked to register the application/rpki-publication
MIME media type as follows:
The RPKI publication protocol and the data it publishes use
entirely separate PKIs for authentication. The published data
is authenticated within the RPKI, and this protocol has
nothing to do with that authentication, nor does it require
that the published objects be valid in the RPKI. The
publication protocol uses a separate Business PKI (BPKI) to
authenticate its messages.
Each RPKI publication protocol message is CMS-signed.
Because of that protection at the application layer, this
protocol does not require the use of HTTPS or other transport
security mechanisms.
Although the hashes used in the <publish/> and
<withdraw/> PDUs are cryptographically strong, the
digest algorithm was selected for convenience in comparing
these hashes with the hashes that appear in RPKI manifests.
The hashes used in the <publish/> and <withdraw/>
PDUs are not particularly security-sensitive, because these
PDUs are protected by the CMS signatures.
Compromise of a publication server, perhaps through
mismanagement of BPKI private keys, could lead to a
denial-of-service attack on the RPKI. An attacker gaining
access to BPKI private keys could use this protocol to delete
(withdraw) RPKI objects, leading to routing changes or
failures. Accordingly, as in most PKIs, good key management
practices are important.
The authors would like to thank:
Geoff Huston,
George Michaelson,
Oleg Muravskiy,
Paul Wouters,
Randy Bush,
Rob Loomans,
Robert Kisteleki,
Tim Bruijnzeels,
Tom Petch,
and anybody else who helped along the way but whose name(s)
the authors have temporarily forgotten.
A Protocol for Provisioning Resource CertificatesRPKIThis document defines a framework for certificate management interactions between an Internet Number Resource issuer ("issuer") and an Internet Number Resource recipient ("subject") through the specification of a protocol for interaction between the two parties. The protocol supports the transmission of requests from the subject, and corresponding responses from the issuer encompassing the actions of certificate issuance, certificate revocation, and certificate status information reports. This protocol is intended to be limited to the application of Internet Number Resource Certificate management and is not intended to be used as part of a more general certificate management framework. [STANDARDS-TRACK]Key words for use in RFCs to Indicate Requirement LevelsStandardsTrackDocumentsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Cryptographic Message Syntax (CMS)digital signaturemessage contentThis document describes the Cryptographic Message Syntax (CMS). This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. [STANDARDS-TRACK]Secure Hash StandardNational Institute of Standards and TechnologyAn Infrastructure to Support Secure Internet RoutingRPKIBGPROAThis document describes an architecture for an infrastructure to support improved security of Internet routing. The foundation of this architecture is a Resource Public Key Infrastructure (RPKI) that represents the allocation hierarchy of IP address space and Autonomous System (AS) numbers; and a distributed repository system for storing and disseminating the data objects that comprise the RPKI, as well as other signed objects necessary for improved routing security. As an initial application of this architecture, the document describes how a legitimate holder of IP address space can explicitly and verifiably authorize one or more ASes to originate routes to that address space. Such verifiable authorizations could be used, for example, to more securely construct BGP route filters. This document is not an Internet Standards Track specification; it is published for informational purposes.RPKI Repository Delta ProtocolAn Out-Of-Band Setup Protocol For RPKI Production ServicesRELAX NG Compact Syntaxjjc@jclark.comExtensible Markup Language (XML) 1.1