Same-Origin Policy for the RPKI Repository Delta Protocol (RRDP)
Job Snijders
Fastly
Amsterdam
Netherlands
job@fastly.com
ops
SIDROPS
same-origin
RPKI
RRDP
This document describes a Same-Origin Policy (SOP) requirement for RPKI Repository Delta Protocol (RRDP) servers and clients. Application of SOP in RRDP client/server communication isolates resources such as Delta and Snapshot files from different Repository Servers, reducing possible attack vectors. This document updates RFC 8182.
Introduction
This document specifies a Same-origin policy (SOP) requirement for RPKI Repository Delta Protocol (RRDP) servers and clients. The SOP concept is a security mechanism to restrict how a document loaded from one origin can cause interaction with resources from another origin. See [RFC6454] for an overview of the concept of an "origin". Application of SOP in RRDP client/server communication isolates resources such as Delta and Snapshot files from different Repository Servers, reducing possible attack vectors. Another way to avoid undesirable implications (as described in Section 2) would be for a future version of the RRDP protocol to use relative URIs instead of absolute URIs. This document updates [RFC8182].
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Implications of cross-origin resource requests in RRDP
The first RRDP protocol specification did not explicitly disallow 'cross-origin' URI references from the Update Notification file (Section 3.5.1 of [RFC8182]) towards Delta (Section 3.5.3 of [RFC8182]) and Snapshot (Section 3.5.2 of [RFC8182]) files, and was silent on the topic of HTTP Redirection (Section 15.4 of [RFC9110]).
The implication of cross-origin references in Update Notification files is that one Repository Server can reference RRDP resources on another Repository Server and in doing so inappropriately increase the resource consumption for both RRDP clients and the referenced Repository Server. An adversary could also employ cross-origin HTTP Redirects towards other Repository Servers, causing similar undesirable behavior.

Changes to RFC 8182
To overcome the aforementioned issue described in Section 2, RRDP Repository Servers and Clients MUST apply a Same-Origin Policy to both the URIs referenced in an Update Notification File and any HTTP Redirects.

New Requirements for RRDP Repository Servers
The following checklist items are added to Section 3.5.1.3 of [RFC8182]:
NEW
- The "uri" attribute in the snapshot element and optional delta elements MUST be part of the same origin (i.e., represent the same principal), meaning referenced URIs MUST have the same scheme, host, and port as the URI for the Update Notification File specified in the referring RRDP SIA AccessDescription.
- The Repository Server MUST NOT respond with HTTP Redirects towards locations with an origin different from the origin of the Update Notification File specified in the referring RRDP SIA AccessDescription.

New Requirements for Relying Parties using RRDP
The following adds to Section 3.4.1 of [RFC8182]:
NEW
- The Relying Party MUST verify whether the "uri" attributes in the Update Notification File are of the same origin as the Update Notification File itself. If this verification fails, the file MUST be rejected and RRDP cannot be used, see Section 3.4.5 of [RFC8182] for considerations. Implementations SHOULD log a message when cross-origin referrals are detected.
- The Relying Party MUST NOT follow HTTP Redirection following from attempts to download Update Notification, Delta, and Snapshot files if the target origin is different from the origin of the Update Notification File specified in the referring RRDP SIA AccessDescription. If this verification fails, the RRDP session MUST be rejected and RRDP cannot be used, see Section 3.4.5 of [RFC8182] for considerations. Implementations SHOULD log a message when cross-origin redirects are detected.

Deployability in the Internet's current RPKI
Analysing the [rpkiviews] archives for the period from April to September 2024, only one RRDP server (reached following the TALs of the five Regional Internet Registries) employed a same-origin HTTP redirect. In the period October 2021 - October 2024 no RRDP Repository Servers were observed which employed cross-origin URIs in Update Notification Files.
This means that imposing a requirement for the application of a Same-Origin Policy does not cause any existing commonly-used RRDP Repository Server operations to become non-compliant.
Security Considerations
This document addresses an oversight in the original RRDP protocol specification: cross-origin requests are detrimental as they allow one repository operator to increase resource consumption for other repository operators and RRDP clients.

IANA Considerations
No IANA actions required.
References
Normative References
Informative References
[rpki-client]

rpki-client
Claudio Jeker
Job Snijders
Kristaps Dzonsons
Theo Buehler
[rpki-prover]

rpki-prover
Mikhail Puzanov
[FORT-validator]

FORT validator
Alberto Leiva
[Routinator]

Routinator
NLNet Labs
[rpkiviews]

rpkiviews
Job Snijders
October 2024
[RFC6454]
[RFC8182]
[RFC2119]
[RFC8174]
[RFC9110]
Acknowledgements
The author wishes to thank Theo Buehler, Claudio Jeker, Alberto Leiva, Tim Bruijnzeels, Ties de Kock, Martin Hoffmann, and Mikhail Puzanov for their helpful feedback, comments, and implementation work. The author wishes to thank Keyur Patel, Meral Shirazipour, Niclas Comstedt, Dan Harkins, Erik Kline, Roman Danyliw, and Éric Vyncke for their review.
Implementation status
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in RFC 7942. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.
According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".
- OpenBSD's [rpki-client]
- Mikhail Puzanov's [rpki-prover]
- FORT project's [FORT-validator]
- NLNet Labs' [Routinator]