-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdraft-ietf-suit-update-management.cddl
executable file
·166 lines (140 loc) · 5.32 KB
/
draft-ietf-suit-update-management.cddl
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
$$unseverable-manifest-member-extensions //= (
suit-current-version => \
bstr .cbor SUIT_Condition_Version_Comparison_Value
)
$$SUIT_severable-members-extensions //= (
suit-coswid => bstr)
; suit-coswid => bstr .cbor concise-swid-tag)
$$severable-manifest-members-choice-extensions //= (
suit-coswid => bstr .cbor SUIT_Command_Sequence / SUIT_Digest
)
SUIT_Condition //= (
suit-condition-image-not-match, SUIT_Rep_Policy)
SUIT_Condition //= (
suit-condition-use-before, SUIT_Rep_Policy)
SUIT_Condition //= (
suit-condition-minimum-battery, SUIT_Rep_Policy)
SUIT_Condition //= (
suit-condition-update-authorized, SUIT_Rep_Policy)
SUIT_Condition //= (
suit-condition-version, SUIT_Rep_Policy)
SUIT_Directive //= (
suit-directive-wait, SUIT_Rep_Policy)
SUIT_Directive //= (
suit-directive-override-multiple, SUIT_Override_Mult_Arg)
SUIT_Directive //=(
suit-directive-copy-params, SUIT_Directive_Copy_Params)
SUIT_Override_Mult_Arg = {
+ uint => {+ $$SUIT_Parameters}
}
SUIT_Directive_Copy_Params = {
+ uint => [+ int]
}
SUIT_Wait_Event = { + SUIT_Wait_Events }
SUIT_Wait_Events //= (suit-wait-event-authorization => int)
SUIT_Wait_Events //= (suit-wait-event-power => int)
SUIT_Wait_Events //= (suit-wait-event-network => int)
SUIT_Wait_Events //= (suit-wait-event-other-device-version
=> SUIT_Wait_Event_Argument_Other_Device_Version)
SUIT_Wait_Events //= (suit-wait-event-time => uint); Timestamp
SUIT_Wait_Events //= (suit-wait-event-time-of-day
=> uint); Time of Day (seconds since 00:00:00)
SUIT_Wait_Events //= (suit-wait-event-day-of-week
=> uint); Days since Sunday
SUIT_Wait_Event_Argument_Other_Device_Version = [
other-device: bstr,
other-device-version: [ + SUIT_Parameter_Version_Match ]
]
SUIT_Parameters //= (suit-parameter-use-before => uint)
SUIT_Parameters //= (suit-parameter-minimum-battery => uint)
SUIT_Parameters //= (suit-parameter-update-priority => int)
SUIT_Parameters //= (suit-parameter-version =>
bstr .cbor SUIT_Parameter_Version_Match)
SUIT_Parameters //= (suit-parameter-wait-info =>
bstr .cbor SUIT_Wait_Event)
SUIT_Parameters //= (suit-parameter-component-metadata =>
bstr .cbor SUIT_Component_Metadata)
SUIT_Parameter_Version_Match = [
suit-condition-version-comparison-type:
SUIT_Condition_Version_Comparison_Types,
suit-condition-version-comparison-value:
SUIT_Condition_Version_Comparison_Value
]
SUIT_Condition_Version_Comparison_Types /=
suit-condition-version-comparison-greater
SUIT_Condition_Version_Comparison_Types /=
suit-condition-version-comparison-greater-equal
SUIT_Condition_Version_Comparison_Types /=
suit-condition-version-comparison-equal
SUIT_Condition_Version_Comparison_Types /=
suit-condition-version-comparison-lesser-equal
SUIT_Condition_Version_Comparison_Types /=
suit-condition-version-comparison-lesser
suit-condition-version-comparison-greater = 1
suit-condition-version-comparison-greater-equal = 2
suit-condition-version-comparison-equal = 3
suit-condition-version-comparison-lesser-equal = 4
suit-condition-version-comparison-lesser = 5
SUIT_Condition_Version_Comparison_Value = [+int]
SUIT_Component_Metadata = {
? suit-meta-default-permissions => SUIT_meta_permissions,
? suit-meta-user-permissions => SUIT_meta_permission_map,
? suit-meta-group-permissions => SUIT_meta_permission_map,
? suit-meta-role-permissions => SUIT_meta_permission_map,
? suit-meta-file-type => SUIT_Filetype,
? suit-meta-modification-time => CBOR_Datetime,
? suit-meta-creation-time => CBOR_Datetime,
? suit-meta-creator => SUIT_meta_actor_id,
* $$SUIT_Component_Metadata_Extensions
}
SUIT_meta_permissions = uint .bits SUIT_meta_permission_bits
SUIT_meta_permission_bits = &(
write_attr_ex: 13,
read_attr_ex: 12,
sync: 11,
delete: 10,
recurse_delete: 9,
write_attr: 8,
change_owner: 7,
change_perm: 6,
read_perm: 5,
read_attr: 4,
creatdir_append: 3,
list_read: 2,
create_write: 1,
traverse_exec: 0,
* $$SUIT_meta_permission_bits_extensions
)
SUIT_meta_permission_map = {
+ SUIT_meta_actor_id => SUIT_meta_permissions
}
SUIT_meta_actor_id = UUID_Tagged / bstr / str / int
UUID_Tagged = #6.37(bstr)
$$suit-text-component-key-extensions //= (
suit-text-version-required => tstr)
$$suit-text-component-key-extensions //= (
suit-text-current-version => tstr)
suit-set-version = 6
suit-coswid = 14
suit-condition-use-before = 4
suit-condition-image-not-match = 25
suit-condition-minimum-battery = 26
suit-condition-update-authorized = 27
suit-condition-version = 28
suit-directive-wait = 29
suit-directive-override-multiple = 34
suit-directive-copy-params = 35
suit-wait-event-authorization = 1
suit-wait-event-power = 2
suit-wait-event-network = 3
suit-wait-event-other-device-version = 4
suit-wait-event-time = 5
suit-wait-event-time-of-day = 6
suit-wait-event-day-of-week = 7
suit-parameter-use-before = 4
suit-parameter-minimum-battery = 26
suit-parameter-update-priority = 27
suit-parameter-version = 28
suit-parameter-wait-info = 29
suit-text-version-required = 7
suit-text-current-version = 8