aboutsummaryrefslogtreecommitdiff
path: root/rpkid/left-right-schema.rnc
AgeCommit message (Collapse)Author
2014-04-05Source tree reorg, phase 1. Almost everything moved, no file contents changed.Rob Austein
svn path=/branches/tk685/; revision=5757
2014-04-04Update copyrights.Rob Austein
svn path=/branches/tk671/; revision=5746
2014-02-25Router certificates working again after changes to get subject name out of ↵Rob Austein
the PKCS !#10. svn path=/branches/tk671/; revision=5683
2014-02-25Something broke MySQLdb on my laptop during a recent upgrade, and IRob Austein
have better things to do than shaving that particular yak today. So I'm committing untested changes (to a development branch that nobody but me is using) so I can test them on a working development platform. svn path=/branches/tk671/; revision=5682
2014-01-31Checkpoint. Untested implementation of left-rightRob Austein
<list_ee_certificate_requests/> PDU. svn path=/branches/tk671/; revision=5657
2012-07-06Add control interface to clear CMS-timestamp-based replay protection,Rob Austein
so we can recover from misconfigured clocks. Closes #265. Add child_handle attribute to <list_published_objects/> response. Closes #266. svn path=/trunk/; revision=4588
2012-02-17Allow AS 0 in <roa_request/> objects. Closes #195.Rob Austein
svn path=/trunk/; revision=4346
2011-03-21First cut at Ghostbusters support.Rob Austein
svn path=/rpkid/irdbd.sql; revision=3730
2011-03-18Add @property decorators to a bunch of methods that are just syntacticRob Austein
sugar around cached SQL object fetches. Checkpoint of incomplete support for Ghostbusters reords. Clean up a few extraneous imports. svn path=/rpkid/Makefile.in; revision=3725
2010-10-07Nit in copyright commentRob Austein
svn path=/rpkid/left-right-schema.rnc; revision=3466
2010-10-07Merge rpkid.without_tls/ branch to rpkid/ trunk.Rob Austein
svn path=/rpkid/Makefile; revision=3465
2010-06-29Add parent_handle to <list_received_resources/> reply PDU.Rob Austein
svn path=/rpkid/irbe_cli.py; revision=3302
2010-03-16CleanupRob Austein
svn path=/rpkid/left-right-schema.rnc; revision=3109
2010-03-16Add some missing copyright notices.Rob Austein
svn path=/myrpki.rototill/examples/rsyncd.conf; revision=3108
2010-02-23Doh, list of ASNs, not single ASNRob Austein
svn path=/rpkid/left-right-schema.rnc; revision=3000
2010-02-23Sample XMLRob Austein
svn path=/rpkid/left-right-protocol-samples.xml; revision=2999
2010-02-23Add <list_received_resources/> (not yet tested)Rob Austein
svn path=/rpkid/left-right-schema.rnc; revision=2995
2009-09-29Add left-right "revoke_forgotten" command to clean up certs that theRob Austein
parent remembers but the child has forgotten. svn path=/rpkid/left-right-schema.rnc; revision=2793
2009-09-28Add <list_published_objects/> PDU to left-right protocol, to supportRob Austein
audit of what rpkid thinks should be published vs what really is. svn path=/rpkid/irbe_cli.py; revision=2790
2009-09-23Collapse HTTPS and CMS BPKI certs for pubd, separation not neededRob Austein
svn path=/myrpki/myirbe.py; revision=2781
2009-06-09Cleanup: get rid of <route_origin/> objectRob Austein
svn path=/rpkid/README; revision=2511
2009-06-09Convert ROA generation code from push model (<route_origin/> objectsRob Austein
in rpkid) to pull model (IRDB for <list_roa_request/> queries). Still need to clean up old code, but new code seems to work properly. svn path=/rpkid/Makefile; revision=2510
2009-06-07CheckpointRob Austein
svn path=/rpkid/Makefile; revision=2500
2009-06-04Rototill left-right and publication protocol to replace SQL-assignedRob Austein
numeric identifiers with IRBE-assigned "handles". Daemons and test harness have been converted and seem to work; some tools like irbe_cli haven't been updated yet. svn path=/rpkid/doc/Installation; revision=2493
2009-06-03Checkpoint: first step towards cleanup of SQL and left-right protocol.Rob Austein
svn path=/rpkid/doc/Installation; revision=2491
2009-05-10Can't require self_id in <report_error/>, <self action="create"/> can't ↵Rob Austein
supply it. svn path=/rpkid/left-right-schema.rnc; revision=2416
2008-06-02Add BPKI CRL to pubd's SQL database, and clean up a lot of redundantRob Austein
SAX code. svn path=/rpkid/irbe-cli.py; revision=1835
2008-05-22Back out excessively fancy RelaxNG, per previous log messageRob Austein
svn path=/rpkid/left-right-protocol-samples.xml; revision=1813
2008-05-22Finally figured out how to write a RelaxNG schema that allowsRob Austein
arbitrary XML to be passed within the <report_error/> element. This was the original intent, I just didn't know how to do it until now. Having finally figured out how to do this, am checking it in for posterity but will then revert to something simpler. svn path=/rpkid/left-right-protocol-samples.xml; revision=1812
2008-05-21Get rid of extension_preferences (YAGNI!).Rob Austein
svn path=/rpkid/irbe-cli.py; revision=1806
2008-05-21Move left-right "type" attribute to <msg/> element because fixing thisRob Austein
is easier than explaining why it was broken. svn path=/rpkid/irbe-cli.py; revision=1804
2008-05-18Convert to generating new ROA formatRob Austein
svn path=/rpkid/left-right-schema.rnc; revision=1800
2008-05-17"as" will be a reserved word in Python 2.6, stop using it as anRob Austein
identifier. svn path=/rpkid/irdbd.py; revision=1798
2008-05-16Clean up header commentsRob Austein
svn path=/rpkid/left-right-schema.rnc; revision=1792
2008-05-16Tighten up left-right schema checksRob Austein
svn path=/rpkid/left-right-protocol-samples.xml; revision=1788
2008-05-01Simplify BSC and start adding BPKI CRL support; the latter doesn'tRob Austein
work yet due to an apparent bug in OpenSSL (CMS_add0_crl() dumps core). If through some bizzare twist of fate we revive the idea of allowing CA certs in CMS messages, this is the change that will need to be (partly) backed out. svn path=/docs/left-right-xml; revision=1730
2008-04-25New trust anchor model sort of working. make test runs again, anyway.Rob Austein
svn path=/docs/left-right-xml; revision=1704
2008-04-24Checkpoint. Partly converted to new BPKI model. This breaks makeRob Austein
test, mostly because the cross-certification stuff isn't done yet. svn path=/docs/left-right-xml; revision=1701
2008-04-16Rework ROA generation and maintenance.Rob Austein
svn path=/docs/left-right-xml; revision=1668
2008-04-11Checkpoint. ROA generation almost working, but not quite.Rob Austein
This checkpoint breaks "make test", will be fixed shortly. svn path=/docs/left-right-xml; revision=1654
2008-04-09First stage of rototill to support new trust anchor model.Rob Austein
svn path=/docs/left-right-xml; revision=1640
2008-04-08Per RobK, save generated BSC pkcs10_request in SQL and get rid ofRob Austein
useless public_key field. svn path=/rpkid/Makefile; revision=1637
2008-02-27Filename cleanupRob Austein
svn path=/rpkid/Makefile; revision=1531
ut at left-right schema, needs work' href='/sra/rpki.net/commit/scripts/left-right-schema.rnc?id=3ba0a5a2652a6d30374dda305555df7fb0902709'>3ba0a5a2
f02848f2
b1c717cb
cdc2a1b4
f02848f2

ac9ca8b4
6b8f75a4
467e7a98
6b8f75a4
ac9ca8b4

6b8f75a4
435854c8
d4529dad
467e7a98









3ba0a5a2
b1c717cb

467e7a98
6b8f75a4
72d7d2ef
6b8f75a4
fec2a3ac

6b8f75a4
92acd286

467e7a98

92acd286

aac95769
94bad6e5
6b8f75a4
467e7a98









3ba0a5a2
b1c717cb

467e7a98
6b8f75a4
72d7d2ef
6b8f75a4
467e7a98
aac95769

6b8f75a4
467e7a98









3ba0a5a2
b1c717cb

467e7a98
6b8f75a4
92acd286
467e7a98
6d81562d

6b8f75a4
467e7a98









3ba0a5a2
b1c717cb
6b8f75a4
5e87546f
467e7a98
5e87546f


467e7a98
5e87546f
5e87546f


246678bf
3ba0a5a2
5e3a7284












486c91ea
42b211b6
486c91ea
42b211b6


486c91ea
42b211b6



4ac35868











56c24c45






7689fb12
3b445b13

56c24c45


9402b4d6
3b445b13

56c24c45

b1c717cb

efc56139

5e87546f
467e7a98
efc56139
80cd5c75
246678bf
e7da2a67



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

      
                                              

                                                                      
                                                         
 
                                                              












                                                                             
                                                                                   











                                                                             
 
                                                                      
 

               

                                                                 

                                              
 
 





                             
                                    
                                            
                                 
                                         
                                          






                             
                                 
                                    
                                            
                                         
                                          
                               
 


                                                      

                                                                       




                                                 
 


                                                
                                                                         






                                                                        







                                             


                                                                         


                 
                                        


                                          

                                                    
 
                                                    

                                                                
                                              
                                              
 
                                                     
 





                                                                                
                                       


                                                                     
 
                                                    
 
                                                  

                                              
                                                
 
                                                   
 

                                                    
 
                                               
 









                                                                                          
 

                   
                                                         
 
                                          
                                            

                                                     
 

                                                      

                                     

                                                             
                                                    
                                                    
 









                                                                                                       
 

                  
                                                       
 
                                         
 
                             

                                               
 









                                                                                                  
 

                       
                                                                 
 
                                                          
                                  

                                                    
 









                                                                                                          
 
                           
 
                                               
                                


                                               
                                 
                                                           


                                
 
 












                                                     
                                      
 
                                                                     


                                 
                                                                     



                                  











                                                               






                                                                 
                                  

                                                         


                            
                              

                                

 

                         

                                      
                                           
                    
                                 
                                    
 



                       
# $Id$
#
# RelaxNG Schema for RPKI left-right protocol.
#
# libxml2 (including xmllint) only groks the XML syntax of RelaxNG, so
# run the compact syntax through trang to get XML syntax.
#
# Copyright (C) 2009-2011  Internet Systems Consortium ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# Portions copyright (C) 2007-2008  American Registry for Internet Numbers ("ARIN")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

default namespace = "http://www.hactrn.net/uris/rpki/left-right-spec/"

# Top level PDU

start = element msg {
  attribute version { xsd:positiveInteger { maxInclusive="1" } },
  ( (attribute type { "query" }, query_elt*) |
    (attribute type { "reply" }, reply_elt*) )
}

# PDUs allowed in a query
query_elt |= self_query
query_elt |= bsc_query
query_elt |= parent_query
query_elt |= child_query
query_elt |= repository_query
query_elt |= list_roa_requests_query
query_elt |= list_ghostbuster_requests_query
query_elt |= list_resources_query
query_elt |= list_published_objects_query
query_elt |= list_received_resources_query

# PDUs allowed in a reply
reply_elt |= self_reply
reply_elt |= bsc_reply
reply_elt |= parent_reply
reply_elt |= child_reply
reply_elt |= repository_reply
reply_elt |= list_resources_reply
reply_elt |= list_roa_requests_reply
reply_elt |= list_ghostbuster_requests_reply
reply_elt |= list_published_objects_reply
reply_elt |= list_received_resources_reply
reply_elt |= report_error_reply

# Tag attributes for bulk operations
tag = attribute tag { xsd:token {maxLength="1024" } }?

# Combinations of action and type attributes used in later definitions.
# The same patterns repeat in most of the elements in this protocol.
ctl_create  = attribute action { "create"  }, tag
ctl_set     = attribute action { "set"     }, tag
ctl_get     = attribute action { "get"     }, tag
ctl_list    = attribute action { "list"    }, tag
ctl_destroy = attribute action { "destroy" }, tag

# Base64 encoded DER stuff
base64 = xsd:base64Binary { maxLength="512000" }

# Base definition for all fields that are really just SQL primary indices
#sql_id = xsd:nonNegativeInteger

# ...except that fields containing SQL primary indicies don't belong
# in this protocol, so they're turninging into handles.
# Length restriction is a MySQL implementation issue.
# Handles are case-insensitive (because SQL is, among other reasons).
object_handle = xsd:string { maxLength="255" pattern="[\-_A-Za-z0-9]*" }

# URIs
uri = xsd:anyURI { maxLength="4096" }

# Name fields imported from up-down protocol
up_down_name = xsd:token { maxLength="1024" }

# Resource lists
asn_list  = xsd:string { maxLength="512000" pattern="[\-,0-9]*" }
ipv4_list = xsd:string { maxLength="512000" pattern="[\-,0-9/.]*" }
ipv6_list = xsd:string { maxLength="512000" pattern="[\-,0-9/:a-fA-F]*" }

# <self/> element

self_bool = (attribute rekey { "yes" }?,
             attribute reissue { "yes" }?,
             attribute revoke { "yes" }?,
             attribute run_now { "yes" }?,
             attribute publish_world_now { "yes" }?,
             attribute revoke_forgotten { "yes" }?)

self_payload = (attribute use_hsm { "yes" | "no" }?,
                attribute crl_interval { xsd:positiveInteger }?,
                attribute regen_margin { xsd:positiveInteger }?,
                element bpki_cert { base64 }?,
                element bpki_glue { base64 }?)

self_handle = attribute self_handle { object_handle }

self_query |= element self { ctl_create,  self_handle, self_bool, self_payload }
self_reply |= element self { ctl_create,  self_handle }
self_query |= element self { ctl_set,     self_handle, self_bool, self_payload }
self_reply |= element self { ctl_set,     self_handle }
self_query |= element self { ctl_get,     self_handle }
self_reply |= element self { ctl_get,     self_handle, self_payload }
self_query |= element self { ctl_list }
self_reply |= element self { ctl_list,    self_handle, self_payload }
self_query |= element self { ctl_destroy, self_handle }
self_reply |= element self { ctl_destroy, self_handle }

# <bsc/> element.  Key parameters hardwired for now.

bsc_bool = ((attribute generate_keypair { "yes" },
             attribute key_type { "rsa" }?,
             attribute hash_alg { "sha256" }?,
             attribute key_length { "2048" }?)?)

bsc_handle = attribute bsc_handle { object_handle }

bsc_payload = (element signing_cert { base64 }?,
               element signing_cert_crl { base64 }?)

bsc_pkcs10 = element pkcs10_request { base64 }?

bsc_query |= element bsc { ctl_create,  self_handle, bsc_handle, bsc_bool, bsc_payload }
bsc_reply |= element bsc { ctl_create,  self_handle, bsc_handle, bsc_pkcs10 }
bsc_query |= element bsc { ctl_set,     self_handle, bsc_handle, bsc_bool, bsc_payload }
bsc_reply |= element bsc { ctl_set,     self_handle, bsc_handle, bsc_pkcs10 }
bsc_query |= element bsc { ctl_get,     self_handle, bsc_handle }
bsc_reply |= element bsc { ctl_get,     self_handle, bsc_handle, bsc_payload, bsc_pkcs10 }
bsc_query |= element bsc { ctl_list,    self_handle }
bsc_reply |= element bsc { ctl_list,    self_handle, bsc_handle, bsc_payload, bsc_pkcs10 }
bsc_query |= element bsc { ctl_destroy, self_handle, bsc_handle }
bsc_reply |= element bsc { ctl_destroy, self_handle, bsc_handle }

# <parent/> element

parent_handle = attribute parent_handle { object_handle }

parent_bool = (attribute rekey { "yes" }?,
               attribute reissue { "yes" }?,
               attribute revoke { "yes" }?,
               attribute revoke_forgotten { "yes" }?)

parent_payload = (attribute peer_contact_uri { uri }?,
                  attribute sia_base { uri }?,
                  bsc_handle?,
                  repository_handle?,
                  attribute sender_name { up_down_name }?,
                  attribute recipient_name { up_down_name }?,
                  element bpki_cms_cert { base64 }?,
                  element bpki_cms_glue { base64 }?)

parent_query |= element parent { ctl_create,  self_handle, parent_handle, parent_bool, parent_payload }
parent_reply |= element parent { ctl_create,  self_handle, parent_handle }
parent_query |= element parent { ctl_set,     self_handle, parent_handle, parent_bool, parent_payload }
parent_reply |= element parent { ctl_set,     self_handle, parent_handle }
parent_query |= element parent { ctl_get,     self_handle, parent_handle }
parent_reply |= element parent { ctl_get,     self_handle, parent_handle, parent_payload }
parent_query |= element parent { ctl_list,    self_handle }
parent_reply |= element parent { ctl_list,    self_handle, parent_handle, parent_payload }
parent_query |= element parent { ctl_destroy, self_handle, parent_handle }
parent_reply |= element parent { ctl_destroy, self_handle, parent_handle }

# <child/> element

child_handle = attribute child_handle { object_handle }

child_bool = attribute reissue { "yes" }?

child_payload = (bsc_handle?,
                 element bpki_cert { base64 }?,
                 element bpki_glue { base64 }?)

child_query |= element child { ctl_create,  self_handle, child_handle, child_bool, child_payload }
child_reply |= element child { ctl_create,  self_handle, child_handle }
child_query |= element child { ctl_set,     self_handle, child_handle, child_bool, child_payload }
child_reply |= element child { ctl_set,     self_handle, child_handle }
child_query |= element child { ctl_get,     self_handle, child_handle }
child_reply |= element child { ctl_get,     self_handle, child_handle, child_payload }
child_query |= element child { ctl_list,    self_handle }
child_reply |= element child { ctl_list,    self_handle, child_handle, child_payload }
child_query |= element child { ctl_destroy, self_handle, child_handle }
child_reply |= element child { ctl_destroy, self_handle, child_handle }

# <repository/> element

repository_handle = attribute repository_handle { object_handle }

repository_payload = (attribute peer_contact_uri { uri }?,
                      bsc_handle?,
                      element bpki_cert { base64 }?,
                      element bpki_glue { base64 }?)

repository_query |= element repository { ctl_create,  self_handle, repository_handle, repository_payload }
repository_reply |= element repository { ctl_create,  self_handle, repository_handle }
repository_query |= element repository { ctl_set,     self_handle, repository_handle, repository_payload }
repository_reply |= element repository { ctl_set,     self_handle, repository_handle }
repository_query |= element repository { ctl_get,     self_handle, repository_handle }
repository_reply |= element repository { ctl_get,     self_handle, repository_handle, repository_payload }
repository_query |= element repository { ctl_list,    self_handle }
repository_reply |= element repository { ctl_list,    self_handle, repository_handle, repository_payload }
repository_query |= element repository { ctl_destroy, self_handle, repository_handle }
repository_reply |= element repository { ctl_destroy, self_handle, repository_handle }

# <list_resources/> element

list_resources_query = element list_resources {
  tag, self_handle, child_handle
}

list_resources_reply = element list_resources {
  tag, self_handle, child_handle,
  attribute valid_until { xsd:dateTime { pattern=".*Z" } },
  attribute asn { asn_list }?,
  attribute ipv4 { ipv4_list }?,
  attribute ipv6 { ipv6_list }?
}

# <list_roa_requests/> element

list_roa_requests_query = element list_roa_requests {
  tag, self_handle
}

list_roa_requests_reply = element list_roa_requests {
  tag, self_handle,
  attribute asn { xsd:positiveInteger },
  attribute ipv4 { ipv4_list }?,
  attribute ipv6 { ipv6_list }?
}

# <list_ghostbuster_requests/> element

list_ghostbuster_requests_query = element list_ghostbuster_requests {
  tag, self_handle, parent_handle
}

list_ghostbuster_requests_reply = element list_ghostbuster_requests {
  tag, self_handle, parent_handle,
  xsd:string
}

# <list_published_objects/> element

list_published_objects_query = element list_published_objects {
  tag, self_handle
}

list_published_objects_reply = element list_published_objects {
  tag, self_handle,
  attribute uri { uri },
  base64
}

# <list_received_resources/> element

list_received_resources_query = element list_received_resources {
  tag, self_handle
}

list_received_resources_reply = element list_received_resources {
  tag, self_handle, parent_handle,
  attribute notBefore { xsd:dateTime { pattern=".*Z" } },
  attribute notAfter { xsd:dateTime { pattern=".*Z" } },
  attribute uri { uri },
  attribute sia_uri { uri },
  attribute aia_uri { uri },
  attribute asn { asn_list }?,
  attribute ipv4 { ipv4_list }?,
  attribute ipv6 { ipv6_list }?
}

# <report_error/> element

error = xsd:token { maxLength="1024" }

report_error_reply = element report_error {
  tag, self_handle?,
  attribute error_code { error },
  xsd:string { maxLength="512000" }?
}

# Local Variables:
# indent-tabs-mode: nil
# End: