diff options
author | Rob Austein <sra@hactrn.net> | 2014-06-30 15:48:47 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-06-30 15:48:47 +0000 |
commit | 8cd68f586a8a6e42a62bc9ca6de0d5942fb7b45b (patch) | |
tree | 31b4059cbf87453bdbd0cdfb2e27bc9799a9d706 | |
parent | ab361985a229d0324a8e4f840aa4518e2bdff48f (diff) |
Proposed RRDP simplifications after email discussion. Still subject
to change, checking in to simplify discussion.
svn path=/branches/tk705/; revision=5877
-rw-r--r-- | ca/tests/Makefile.in | 5 | ||||
-rw-r--r-- | ca/tests/rrdp-samples.xml | 121 | ||||
-rw-r--r-- | schemas/relaxng/rrdp.rnc | 109 |
3 files changed, 84 insertions, 151 deletions
diff --git a/ca/tests/Makefile.in b/ca/tests/Makefile.in index 4c17c961..7f5f342e 100644 --- a/ca/tests/Makefile.in +++ b/ca/tests/Makefile.in @@ -3,7 +3,8 @@ PYTHON = @PYTHON@ abs_top_builddir = @abs_top_builddir@ -all: protocol-samples +all: + @true clean: rm -rf smoketest.dir left-right-protocol-samples publication-protocol-samples rrdp-samples yamltest.dir rcynic.xml rcynic-data @@ -42,7 +43,7 @@ relaxng: up-down-relaxng left-right-relaxng publication-relaxng rrdp-relaxng all-tests:: relaxng -parse-test: protocol-samples +parse-test: left-right-protocol-samples publication-protocol-samples ${PYTHON} xml-parse-test.py all-tests:: parse-test diff --git a/ca/tests/rrdp-samples.xml b/ca/tests/rrdp-samples.xml index 847b0e6b..54f5010f 100644 --- a/ca/tests/rrdp-samples.xml +++ b/ca/tests/rrdp-samples.xml @@ -29,83 +29,60 @@ <!-- Notification file: lists current snapshots and deltas --> - <msg type="notification" version="1" xmlns="http://www.ripe.net/rpki/rrdp"> - <notification session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" current_version="203"> - <snapshot version="202"> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/1.xml" hash="279b79fd8389e20585f26735ee70e0e4d4b8af23bb2e2e611c70e92d2433e"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/2.xml" hash="a2d56ec180f2dde2a46bf92e0565932e25829b852a0b47d5de6e41394c290"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/3.xml" hash="b2d56ec180f2dde2a46bf92e0565932e2582952a0b43107d5de6e41394c29a"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/4.xml" hash="c2d56ec180f2dde2a46bf92e0565932e25829b2a0b43107d5de6e41394c29f"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/5.xml" hash="d2d56ec180f2dde2a46bf92e0565932e229b852a0b43107d5de6e41394c29b"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/6.xml" hash="e2d56ec180f2dde2a46bf92e0565932e258b852a0b43107d5de6e41394c292"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/7.xml" hash="f2d56ec180f2dde2a46bf92e0565932e2582952a0b43107d5de6e41394c29c"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/8.xml" hash="02d56ec180f2dde2a46bf92e0565932e25829b8a0b43107d5de6e41394c294"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/9.xml" hash="c2d56ec180f2dde2a46bf92e0565932e25829b852b43107d5de6e41394c29d"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/10.xml" hash="22d56ec180f2dde2a46bf92e0565932e25829b852a0b43107d5de41394c296"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/11.xml" hash="b2d56ec180f2dde2a46bf92e0565932e25829b852a0b43107d5de6e394c29e"/> - <snapshot-segment uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202/12.xml" hash="42d56ec180f2dde2a46bf92e0565932e25829b852a0b4315de6e41394c298"/> - </snapshot> - <deltas> - <delta-segment from="156" to="183" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/156/183.xml" hash="a2d56ec180f2dde2a46bf90565932e25829b852a0b43107d5de6e41394c291"/> - <delta-segment from="183" to="184" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/183/184/1.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> - <delta-segment from="183" to="184" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/183/184/2.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> - <delta-segment from="183" to="184" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/183/184/3.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> - <delta-segment from="184" to="197" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/184/197.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> - <delta-segment from="197" to="203" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/197/203.xml" hash="a2d56ec180f2dde2a4f92e0565932e25829b852a0b43107d5de6e41394c293"/> - </deltas> - </notification> - </msg> + <notification version="1" xmlns="http://www.ripe.net/rpki/rrdp" session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" serial="203"> + <snapshot uri="http://host.example/d9f6dc91-0394-40b9-9663-66aeb623a/snapshot/202.xml" hash="279b79fd8389e20585f26735ee70e0e4d4b8af23bb2e2e611c70e92d2433e"/> + <delta from="156" to="183" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/156/183.xml" hash="a2d56ec180f2dde2a46bf90565932e25829b852a0b43107d5de6e41394c291"/> + <delta from="183" to="184" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/183/184.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> + <delta from="184" to="197" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/184/197.xml" hash="a2d56ec180f2dde2a46b2e0565932e25829b852a0b43107d5de6e41394c292"/> + <delta from="197" to="203" uri="http://host.example/d9f6c91-0394-40b9-9663-66aeb623a/deltas/197/203.xml" hash="a2d56ec180f2dde2a4f92e0565932e25829b852a0b43107d5de6e41394c293"/> + </notification> <!-- Snapshot segment: think DNS AXFR --> - <msg xmlns="http://www.ripe.net/rpki/rrdp" type="snapshot" version="1"> - <snapshot session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" repository_version="1" index="2"> - <publish uri="http://host.example/foo/bar/cer1.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XE - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau - </publish> - <publish uri="http://host.example/foo/bar/cer2.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XD - </publish> - <publish uri="http://host.example/foo/bar/cer3.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XD - </publish> - </snapshot> - </msg> + <snapshot version="1" xmlns="http://www.ripe.net/rpki/rrdp" session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" serial="1"> + <publish uri="http://host.example/foo/bar/cer1.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XE + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau + </publish> + <publish uri="http://host.example/foo/bar/cer2.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XD + </publish> + <publish uri="http://host.example/foo/bar/cer3.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQD + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbtTdPcXBau + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFMkEzMB4XD + </publish> + </snapshot> <!-- Delta segment: think DNS IXFR --> - <msg type="deltas" version="1" xmlns="http://www.ripe.net/rpki/rrdp"> - <deltas session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" from="0" to="3" index="4"> - <delta version="1"> - <publish uri="http://host.example/foo/bar/cer1.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt - </publish> - </delta> - <delta version="2"> - <withdraw uri="http://host.example/foo/bar/cer1.cer"/> - <publish uri="http://host.example/foo/bar/cer2.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM - </publish> - <publish uri="http://host.example/foo/bar/cer3.cer"> - MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw - h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt - jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM - </publish> - </delta> - <delta version="3"> - <withdraw uri="http://host.example/foo/bar/cer2.cer"/> - </delta> - </deltas> - </msg> + <deltas version="1" xmlns="http://www.ripe.net/rpki/rrdp" session_id="d9f6dc91-0394-40b9-9663-66aef4bb623a" from="0" to="3"> + <delta serial="1"> + <publish uri="http://host.example/foo/bar/cer1.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt + </publish> + </delta> + <delta serial="2"> + <withdraw uri="http://host.example/foo/bar/cer1.cer"/> + <publish uri="http://host.example/foo/bar/cer2.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM + </publish> + <publish uri="http://host.example/foo/bar/cer3.cer"> + MIIE+jCCA+KgAwIBAgIBDTANBgkqhkiG9w0BAQsFADAzMTEw + h8zeHoFVu6ghRPy5dbOA4akX/KG6b8XIx0iwPYdLiDbdWFbt + jRBODAxN0U2NkE5RTkxNzJFNDYxMkQ4Q0Y0QzgzRjIzOERFM + </publish> + </delta> + <delta serial="3"> + <withdraw uri="http://host.example/foo/bar/cer2.cer"/> + </delta> + </deltas> </completely_gratuitous_wrapper_element_to_let_me_run_this_through_xmllint> diff --git a/schemas/relaxng/rrdp.rnc b/schemas/relaxng/rrdp.rnc index 44b94034..4fdc493b 100644 --- a/schemas/relaxng/rrdp.rnc +++ b/schemas/relaxng/rrdp.rnc @@ -18,97 +18,52 @@ default namespace = "http://www.ripe.net/rpki/rrdp" -# I find the use of "version" for both the protocol version and the database version -# unncessarily confusing, so I'd prefer "serial" for the latter. For the moment, -# I'm keeping the attribute names as in Tim's document and just using "serial" for -# the data type. -# -# The xsd:string types here are me being lazy in the initial version. -# We should also think about length limits for all of these types. - -version = xsd:positiveInteger { maxInclusive="1" } +version = xsd:positiveInteger { maxInclusive="1" } serial = xsd:nonNegativeInteger uri = xsd:anyURI -uuid = xsd:string -sha256 = xsd:string +uuid = xsd:string { pattern = "[\-0-9a-fA-F]+" } +hash = xsd:string { pattern = "[0-9a-fA-F]+" } base64 = xsd:base64Binary -index = xsd:positiveInteger # Notification file: lists current snapshots and deltas -# -# We want to get rid of the multiple segment thing from Tim's original -# specification. I think this means that the multiple -# <snapshot-segment/> elements collapse down to a single snapshot, the -# attributes of which probably float up to the <snapshot/> element. -# Or maybe we just require exactly one snapshot-segment element; it's -# a bit verbose, but leaves an easy way to change our minds later, -# and it's XML so who's going to notice one more element? -# -# Specify as in the -01 draft for the moment, simplify later. -start |= element msg { - attribute version { version }, - attribute type { "notification" }, - element notification { - attribute session_id { uuid }, - attribute current_version { serial }, - element snapshot { - attribute version { serial }, - element snapshot-segment { - attribute uri { uri }, - attribute hash { sha256 } - }+ - }, - element deltas { - element delta-segment { - attribute from { serial }, - attribute to { serial }, - attribute uri { uri }, - attribute hash { sha256 } - }+ - }? - } +start |= element notification { + attribute version { version }, + attribute session_id { uuid }, + attribute serial { serial }, + element snapshot { + attribute uri { uri }, + attribute hash { hash } + }, + element delta { + attribute from { serial }, + attribute to { serial }, + attribute uri { uri }, + attribute hash { hash } + }+ } -# If we're getting rid of multiple snapshot segments, I think the -# index attributes go away. -# -# -01 is a bit vague on <publish/> and <withdraw/> elements: -# Zero-or-more? One-or-more? Does "exact copy" include using the -# publication protocol's XML namespace instead of RRDP's? Tag -# attribute allowed? Wing it for now. - # Snapshot segment: think DNS AXFR. -start |= element msg { - attribute version { version }, - attribute type { "snapshot" }, - element snapshot { - attribute session_id { uuid }, - attribute repository_version { serial }, - attribute index { index }, - element publish { attribute uri { uri }, base64 }* - } +start |= element snapshot { + attribute version { version }, + attribute session_id { uuid }, + attribute serial { serial }, + element publish { attribute uri { uri }, base64 }* } # Delta segment: think DNS IXFR. -# -01 doesn't say whether <delta/> is zero-or-more or one-or-more. - -start |= element msg { - attribute version { version }, - attribute type { "deltas" }, - element deltas { - attribute session_id { uuid }, - attribute from { serial }, - attribute to { serial }, - attribute index { index }, - element delta { - attribute version { serial }, - ( element publish { attribute uri { uri }, base64 } | - element withdraw { attribute uri { uri } } )* - }* - } +start |= element deltas { + attribute version { version }, + attribute session_id { uuid }, + attribute from { serial }, + attribute to { serial }, + element delta { + attribute serial { serial }, + ( element publish { attribute uri { uri }, base64 } | + element withdraw { attribute uri { uri } } )+ + }+ } # Local Variables: |