-
Notifications
You must be signed in to change notification settings - Fork 1
/
draft-ietf-sidrops-rrdp-desynchronization.xml
330 lines (290 loc) · 15.2 KB
/
draft-ietf-sidrops-rrdp-desynchronization.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
<!ENTITY nbsp " ">
]>
<?rfc sortrefs="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
category="info"
docName="draft-ietf-sidrops-rrdp-desynchronization-00"
ipr="trust200902"
xml:lang="en"
sortRefs="true"
submissionType="IETF"
consensus="true"
version="3">
<front>
<title>Detecting RRDP Session Desynchronization</title>
<author fullname="Job Snijders" initials="J." surname="Snijders">
<organization>Fastly</organization>
<address>
<postal>
<street/>
<code/>
<city>Amsterdam</city>
<country>Netherlands</country>
</postal>
<email>job@fastly.com</email>
</address>
</author>
<author fullname="Ties de Kock" initials="T." surname="de Kock">
<organization>RIPE NCC</organization>
<address>
<postal>
<city>Amsterdam</city>
<country>Netherlands</country>
</postal>
<email>tdekock@ripe.net</email>
</address>
</author>
<date />
<area>ops</area>
<workgroup>SIDROPS</workgroup>
<keyword>desynchronization</keyword>
<keyword>RPKI</keyword>
<keyword>RRDP</keyword>
<abstract>
<t>
This document describes an approach for Resource Public Key Infrastructure (RPKI) Relying Parties to detect a particular form of RPKI Repository Delta Protocol (RRDP) session desynchronization and how to recover.
</t>
</abstract>
</front>
<middle>
<section anchor="intro">
<name>Introduction</name>
<t>
The Resource Public Key Infrastructure (RPKI) Repository Delta Protocol (RRDP) <xref target="RFC8182"/> is a one-way synchronization protocol for distributing RPKI data in the form of <em>differences</em> (deltas) between sequential repository states.
Relying Parties apply a contiguous chain of deltas to synchronize their local copy of the repository with the current state of the remote Repository Server.
Delta files for any given session_id and serial number are expected to contain an immutable record of the state of the Repository Server at that given point in time, but this is not always the case.
</t>
<t>
This document describes an approach for Relying Parties (RPs) to detect a particular form of RRDP session desynchronization and how to recover.
</t>
<section anchor="requirements">
<name>Requirements Language</name>
<t>
The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
</t>
</section>
</section>
<section anchor="immutability">
<name>Immutability of RRDP files</name>
<t>
<xref target="RFC8182" section="3.1"/> describes how discrete publication events such as the addition, modification, or deletion of one or more repository objects <em>can</em> be communicated as immutable files, highlighting advantages for publishers such as the ability to pre-calculate files and make use of caching infrastructure.
</t>
<t>
While the global RPKI is understood to present a loosely consistent view, depending on timing, updating, fetching (see <xref target="RFC7115" section="6"/>), different caches having different data for the same RRDP session at the same serial violates the principle of least astonishment.
</t>
<t>
If an RRDP server over time serves differing data for a given session_id and serial number, distinct RP instances (depending on the moment they connected to the RRDP server) would end up with divergent local repositories.
Comparing only the server-provided session_id and latest serial number across distinct RP instances would not bring such divergence to light.
</t>
<t>
The <xref target="RFC8182"/> specification does allude to immutability being a property of RRDP files, but doesn't make it clear immutability is an absolute requirement for the RRDP protocol to work well.
A future update to <xref target="RFC8182"/> should set a hard rule to establish that the immutability of RRDP files must not be violated after publication, and RPs should check for unexpected mutations.
</t>
</section>
<section anchor="detection">
<name>Detection of Desynchronization</name>
<t>
Relying Parties can implement a mechanism to keep a record of the serial and hash attribute values in delta elements of the previous successful fetch of an Update Notification File.
Then, after the fetch of a new Update Notification File, the Relying Party should compare if the serial and hash values of previously seen serials match those in the newly fetched file.
If any difference is detected, Delta files were unexpectedly mutated, and the RP should proceed to <xref target="recovery"/>.
</t>
<t>
RP implementations decide how many Delta Files to maximally process before switching to downloading the latest Snapshot File.
The same upper bound can be used as a limit to the number of delta element serial and hash values to track.
</t>
<section anchor="example">
<name>Example</name>
<t>
This section contains two versions of a Update Notification File to demonstrate an unexpected mutation.
The initial Update Notification File is as following:
</t>
<sourcecode>
<![CDATA[
<notification xmlns="http://www.ripe.net/rpki/rrdp" version="1"
session_id="fe528335-db5f-48b2-be7e-bf0992d0b5ec"
serial="1774">
<snapshot uri="https://rrdp.example.net/1774/snapshot.xml"
hash="4b5f27b099737b8bf288a33796bfe825fb2014a69fd6aa99080380299952f2e2"/>
<delta serial="1774"
hash="effac94afd30bbf1cd6e180e7f445a4d4653cb4c91068fa9e7b669d49b5aaa00"
uri="https://rrdp.example.net/1774/delta.xml" />
<delta serial="1773"
hash="731169254dd5de0ede94ba6999bda63b0fae9880873a3710e87a71bafb64761a"
uri="https://rrdp.example.net/1773/delta.xml" />
<delta serial="1772"
hash="d4087585323fd6b7fd899ebf662ef213c469d39f53839fa6241847f4f6ceb939"
uri="https://rrdp.example.net/1772/delta.xml />
</notification>
]]>
</sourcecode>
<t>
Based on the above Update Notification File, an RP implementation could record the following state:
</t>
<sourcecode anchor="state">
fe528335-db5f-48b2-be7e-bf0992d0b5ec
1774 effac94afd30bbf1cd6e180e7f445a4d4653cb4c91068fa9e7b669d49b5aaa00
1773 731169254dd5de0ede94ba6999bda63b0fae9880873a3710e87a71bafb64761a
1772 d4087585323fd6b7fd899ebf662ef213c469d39f53839fa6241847f4f6ceb939
</sourcecode>
<t>
A new version of the Update Notification File is published, as following:
</t>
<sourcecode>
<![CDATA[
<notification xmlns="http://www.ripe.net/rpki/rrdp" version="1"
session_id="fe528335-db5f-48b2-be7e-bf0992d0b5ec"
serial="1775">
<snapshot uri="https://rrdp.example.net/1775/snapshot.xml"
hash="cd430c386deacb04bda55301c2aa49f192b529989b739f412aea01c9a77e5389"/>
<delta serial="1775"
hash="d199376e98a9095dbcf14ccd49208b4223a28a1327669f89566475d94b2b08cc"
uri="https://rrdp.example.net/1775/delta.xml />
<delta serial="1774"
hash="10ca28480a584105a059f95df5ca8369142fd7c8069380f84ebe613b8b89f0d3"
uri="https://rrdp.example.net/1774/delta.xml" />
<delta serial="1773"
hash="731169254dd5de0ede94ba6999bda63b0fae9880873a3710e87a71bafb64761a"
uri="https://rrdp.example.net/1773/delta.xml" />
</notification>
]]>
</sourcecode>
<t>
Using its previously recorded <xref target="state">state</xref>, the RP can compare the hash values for serials 1773 and 1774.
For serial 1774, compared to the earlier version of the Update Notification File, a different hash value is now listed, meaning an unexpected delta mutation occurred.
</t>
</section>
</section>
<section anchor="recovery">
<name>Recovery after Desynchronization</name>
<t>
Following the detection of RRDP session desynchronization, the RP implementation SHOULD issue a warning and SHOULD download the latest Snapshot File and process it as described in <xref target="RFC8182" section="3.4.3"/>.
</t>
</section>
<section anchor="security">
<name>Security Considerations</name>
<t>
Due to the lifetime of RRDP sessions (often measured in months), desynchronization can persist for an extended period if undetected.
</t>
<t>
Caches in a desynchronized state pose a risk by emitting a different set of Validated Payloads than they would otherwise emit with a consistent repository copy.
Through the interaction of the desynchronization and the <em>failed fetch</em> mechanism described in <xref target="RFC9286" section="6.6"/>, Relying Parties could spuriously omit Validated Payloads or emit Validated Payloads that the Certification Authority intended to withdraw.
In a desynchronized state, all bets are off.
</t>
<t>
Missing Validated Payloads negatively impact the ability to validate BGP announcements using mechanisms such as described in <xref target="RFC6811"/> and <xref target="I-D.ietf-sidrops-aspa-verification"/>.
</t>
<t>
<xref target="RFC9286" section="6.6"/> advises RP implementations to continue to use cached versions of objects, but only until such time as they become stale.
By detecting whether the remote Repository Server is in an inconsistent state and then immediately switching to using the latest Snapshot File, RPs increase the probability to successfully replace objects before they become stale.
</t>
</section>
<section anchor="iana" title="IANA Considerations">
<t>
No IANA actions required.
</t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8182.xml"/>
</references>
<references>
<name>Informative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6811.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7115.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9286.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-sidrops-aspa-verification.xml"/>
<reference anchor="rpki-client" target="https://www.rpki-client.org/">
<front>
<title>rpki-client 8.5</title>
<author fullname="Claudio Jeker"/>
<author fullname="Job Snijders"/>
<author fullname="Kristaps Dzonsons"/>
<author fullname="Theo Buehler"/>
<date month="July" year="2023" />
</front>
</reference>
<reference anchor="rpki-prover" target="https://github.com/lolepezy/rpki-prover">
<front>
<title>rpki-prover 0.9.0</title>
<author fullname="Mikhail Puzanov"/>
<date month="February" year="2024" />
</front>
</reference>
<reference anchor="FORT-validator" target="https://github.com/NICMx/FORT-validator/compare/main...draft-spaghetti-sidrops-rrdp-desynchronization">
<front>
<title>FORT validator 1.7.0</title>
<author fullname="Alberto Leiva"/>
<date month="March" year="2024" />
</front>
</reference>
<reference anchor="Routinator" target="https://github.com/NLnetLabs/routinator/pull/951">
<front>
<title>Routinator</title>
<author>
<organization>NLNet Labs</organization>
</author>
<date/>
</front>
</reference>
</references>
</references>
<section anchor="acknowledgements">
<name>Acknowledgements</name>
<t>
During the hallway track at RIPE 86, <contact fullname="Ties de Kock"/> shared the idea for detecting this particular form of RRDP desynchronization, after which <contact fullname="Claudio Jeker"/>, <contact fullname="Job Snijders"/>, and <contact fullname="Theo Buehler"/> produced an implementation based on rpki-client.
Equipped with tooling to detect this particular error condition, in subsequent months it became apparent that unexpected delta mutations in the global RPKI repositories do happen from time to time.
</t>
<t>
The authors wish to thank
<contact fullname="Theo Buehler"/>,
<contact fullname="Mikhail Puzanov"/>,
<contact fullname="Alberto Leiva"/>, and
<contact fullname="Tom Harrison"/>
for their careful review and feedback on this document.
</t>
</section>
<section removeInRFC="true">
<name>Implementation status</name>
<t>
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.
</t>
<t>
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".
</t>
<ul>
<li>
OpenBSD <xref target="rpki-client"/> 8.5 and higher
</li>
<li>
Mikhail Puzanov's <xref target="rpki-prover"/> 0.9.0 and higher
</li>
<li>
FORT project's <xref target="FORT-validator"/> 1.7.0 and higher
</li>
<li>
NLnet Labs' <xref target="Routinator"/> main branch
</li>
</ul>
</section>
</back>
</rfc>