SIDROPS J. Snijders
Internet-Draft Fastly
Updates: RFC8182 (if approved) 6 June 2024
Intended status: Standards Track
Expires: 8 December 2024
Same-Origin Policy for the RPKI Repository Delta Protocol (RRDP)
draft-ietf-sidrops-rrdp-same-origin-00
Abstract
This document describes a Same-origin policy (SOP) requirement for
RPKI Repository Delta Protocol (RRDP) servers and clients. The same-
origin policy concept is a security mechanism to restrict how a
document loaded from one origin can cause interaction with resources
from another origin. Application of a same-origin policy 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.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 8 December 2024.
Copyright Notice
Copyright (c) 2024 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components
Snijders Expires 8 December 2024 [Page 1]
Internet-Draft RRDP Same-Origin Policy June 2024
extracted from this document must include Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 2
2. Implications of cross-origin resource requests in RRDP . . . 3
3. Proposed Solution . . . . . . . . . . . . . . . . . . . . . . 4
3.1. New Requirements for RRDP Repository Servers . . . . . . 4
3.2. New Requirements for Relying Parties using RRDP . . . . . 4
4. Deployability in the Internet's current RPKI . . . . . . . . 4
5. Security Considerations . . . . . . . . . . . . . . . . . . . 5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1. Normative References . . . . . . . . . . . . . . . . . . 5
7.2. Informative References . . . . . . . . . . . . . . . . . 6
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 6
Appendix B. Implementation status . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction
This document specifies a Same-origin policy (SOP) requirement for
RPKI Repository Delta Protocol (RRDP) servers and clients. The same-
origin policy 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 a same-origin policy in RRDP client/
server communication isolates resources such as Delta and Snapshot
files from different Repository Servers, reducing possible attack
vectors. This document updates [RFC8182].
1.1. 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.
Snijders Expires 8 December 2024 [Page 2]
Internet-Draft RRDP Same-Origin Policy June 2024
2. 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 6.4 of [RFC7231]).
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. Consider the following example served up by
*https://badhost.example.net/notification.xml*:
Note that in the above Update Notification File the _badhost_
operator is mimicking RIPE NCC's current RRDP session_id and serial
and attaching a random query parameter to the snapshot URI. Based on
the above Update Notification File, all Relying Parties that reached
_badhost_ following SIA AccessDescriptions, would download a large
file from the RIPE CDN, wasting bandwidth on both client and server-
side.
RPs cannot avoid scheduling a new download per Section 3.4.1 of
[RFC8182] because Delta file, Snapshot file, session_id and serial
are significant only in scope of the referring SIA AccessDescription.
In other words, SIAs are globally unique and can be deduplicated
before scheduling fetches, but RRDP session_ids are not globally
unique, contrary to what Section 3.1 of [RFC8182] suggests.
If the adversary increments the serial in tandem with RIPE NCC
incrementing their RRDP serial, every next request to
_https://badhost/notification.xml_ causes another large file download
on the RIPE NCC servers, exacerbating the issue.
An adversary could also employ cross-origin HTTP Redirects towards
other Repository Servers, causing similar undesirable behavior.
To summarize, cross-origin requests in RRDP can enable one Repository
Server operator to increase resource consumption on another
Repository Server exploiting Relying Party instances.
Snijders Expires 8 December 2024 [Page 3]
Internet-Draft RRDP Same-Origin Policy June 2024
3. Proposed Solution
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.
3.1. New Requirements for RRDP Repository Servers
The following checklist items are added to Section 3.5.1.3 of
[RFC8182]:
* 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.
3.2. New Requirements for Relying Parties using RRDP
The following adds to Section 3.4.1 of [RFC8182]:
* 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.
* 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.
4. Deployability in the Internet's current RPKI
In the past 2.5 years no RRDP Repository Servers have employed cross-
origin URIs in Update Notification Files.
Snijders Expires 8 December 2024 [Page 4]
Internet-Draft RRDP Same-Origin Policy June 2024
At the moment of writing only one RRDP server (reached following the
TALs of the five Regional Internet Registies) employs a same-origin
HTTP redirect.
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.
5. Security Considerations
This internet-draft patches an oversight in the original RRDP
protocol specification: cross-origin requests allow one repository
operator to increase resource consumption for another repository
operator. Another way to avoid this undesirable implication would've
been for the original RRDP specification to have used relative URIs
instead of absolute URIs.
6. IANA Considerations
No IANA actions required.
7. References
7.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
.
[RFC6454] Barth, A., "The Web Origin Concept", RFC 6454,
DOI 10.17487/RFC6454, December 2011,
.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014,
.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, .
[RFC8182] Bruijnzeels, T., Muravskiy, O., Weber, B., and R. Austein,
"The RPKI Repository Delta Protocol (RRDP)", RFC 8182,
DOI 10.17487/RFC8182, July 2017,
.
Snijders Expires 8 December 2024 [Page 5]
Internet-Draft RRDP Same-Origin Policy June 2024
7.2. Informative References
[FORT-validator]
Leiva, A., "FORT validator",
.
[Routinator]
NLNet Labs, "Routinator",
.
[rpki-client]
Jeker, C., Snijders, J., Dzonsons, K., and T. Buehler,
"rpki-client", .
[rpki-prover]
Puzanov, M., "rpki-prover",
.
Appendix A. 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.
Appendix B. Implementation status
This section is to be removed before publishing as an RFC.
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".
Snijders Expires 8 December 2024 [Page 6]
Internet-Draft RRDP Same-Origin Policy June 2024
* OpenBSD's [rpki-client]
* Mikhail Puzanov's [rpki-prover]
* FORT project's [FORT-validator]
* NLNet Labs' [Routinator]
Author's Address
Job Snijders
Fastly
Amsterdam
Netherlands
Email: job@fastly.com
Snijders Expires 8 December 2024 [Page 7]