Skip to content

Commit 59e601e

Browse files
authored
Only define THRESHOLD once (#322)
* Only define THRESHOLD once GH-314 introduced a second definition of THRESHOLD _without_ a <dfn> tag. There are two ways we can fix this: 1. introduce a second dfn tag and use a for attribute on each definition, i.e., <dfn for="root"> 2. streamline to a single definition and update the DELEGATIONS definition to reference the THRESHOLD definition in the root section I've opted for 2 here as it's simpler and avoids redundant duplicate definitions. Signed-off-by: Joshua Lock <joshuagloe@gmail.com> * Fix warnings from latest bikeshed We have two definitions of KEYID and, by default, we get a random one at build time if the `for` attribute is not specified on the anchor (<a>) element. Squash randomness by always referring to the KEYID definition for the root role. Signed-off-by: Joshua Lock <joshuagloe@gmail.com> * Pin the bikeshed version we use in workflows This will prevent bikeshed releases unintentionally breaking our builds without anyone noticing until a CI workflow with additional changes is run. Signed-off-by: Joshua Lock <joshuagloe@gmail.com> * Update Joshua's affiliation Changed role, updating affiliation Signed-off-by: Joshua Lock <joshuagloe@gmail.com> * Bump Version and Date for this PR Signed-off-by: Joshua Lock <joshuagloe@gmail.com> --------- Signed-off-by: Joshua Lock <joshuagloe@gmail.com>
1 parent 743c8a0 commit 59e601e

2 files changed

Lines changed: 33 additions & 35 deletions

File tree

‎requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bikeshed
1+
bikeshed==7.1.1

‎tuf-spec.md‎

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Title: The Update Framework Specification
33
Shortname: TUF
44
Status: LS
55
Abstract: A framework for securing software update systems.
6-
Date: 2026-07-15
6+
Date: 2026-08-05
77
Editor: Justin Cappos, NYU
88
Editor: Trishank Karthik Kuppusamy, Apple
9-
Editor: Joshua Lock, Verizon
9+
Editor: Joshua Lock, University of Lincoln
1010
Editor: Marina Moore, Edera
1111
Editor: Lukas Pühringer, Eclipse
1212
Repository: theupdateframework/specification
@@ -16,7 +16,7 @@ Boilerplate: copyright no, conformance no
1616
Local Boilerplate: header yes
1717
Markup Shorthands: css no, markdown yes
1818
Metadata Include: This version off, Abstract off
19-
Text Macro: VERSION 1.0.35
19+
Text Macro: VERSION 1.0.36
2020
</pre>
2121

2222
Note: We strive to make the specification easy to implement, so if you come
@@ -749,9 +749,11 @@ The "signed" portion of <a>root.json</a> is as follows:
749749
<a for="role">KEYID</a> represented in this key list and in other files,
750750
only one unique key has that <a for="role">KEYID</a>.
751751

752-
As before the THRESHOLD must be a positive integer number of keys (>=1) of
753-
that role whose signatures are required in order to consider a file as being
754-
properly signed by that role.
752+
: <dfn>THRESHOLD</dfn>
753+
A positive integer number of keys (>=1) of that role whose signatures are
754+
required in order to consider a file as being properly signed by that role.
755+
See the notes on <a>THRESHOLD</a> counting in the relevant steps of
756+
[[#detailed-client-workflow]].
755757

756758
<div class='example' id='example-root.json'>
757759
A <a>root.json</a> example file:
@@ -1029,28 +1031,22 @@ format:
10291031
}
10301032
</pre>
10311033

1032-
<a for="root">KEYID</a> and <a>KEY</a> are the same as is described for the
1033-
<a>root.json</a> file.
1034+
<a for="root">KEYID</a>, <a>KEY</a> and <a>THRESHOLD</a> are the same as is
1035+
described for the <a>root.json</a> file.
10341036

10351037
: <dfn>ROLENAME</dfn>
10361038
::
10371039
A string giving the name of the delegated role. For example, "projects".
10381040
The rolename MUST be unique in the delegations object: multiple roles with
10391041
the same rolename are not allowed within a <a>DELEGATIONS</a>.
10401042

1041-
: <dfn>THRESHOLD</dfn>
1042-
::
1043-
A positive integer number of keys (>=1) of that role whose signatures are required in
1044-
order to consider a file as being properly signed by that role. See the notes on
1045-
<a>THRESHOLD</a> counting in the relevant steps of [[#detailed-client-workflow]].
1046-
10471043
: <dfn>TERMINATING</dfn>
10481044
::
10491045
A boolean indicating whether subsequent delegations should be considered
10501046
if a matching target is not found in this delegation.
10511047

1052-
As explained in the [Diplomat paper
1053-
](https://theupdateframework.io/papers/protect-community-repositories-nsdi2016.pdf),
1048+
As explained in the [Diplomat paper]
1049+
(https://theupdateframework.io/papers/protect-community-repositories-nsdi2016.pdf),
10541050
terminating delegations instruct the client not to consider future trust
10551051
statements that match this delegation's pattern, which stops the delegation
10561052
processing once this delegation (and its descendants) have been processed.
@@ -1339,9 +1335,10 @@ it in the next step.
13391335
validated (version N+1). When computing the <a>THRESHOLD</a> each
13401336
<a>KEY</a> MUST only contribute one <a>SIGNATURE</a>. That is, each
13411337
<a>SIGNATURE</a> which is counted towards the <a>THRESHOLD</a> MUST have
1342-
a unique <a>KEYID</a>. Even if a <a>KEYID</a> is listed more than once in the
1343-
"signatures" list a client MUST NOT count more than one verified
1344-
<a>SIGNATURE</a> from that <a>KEYID</a> towards the <a>THRESHOLD</a>.
1338+
a unique <a for="root">KEYID</a>. Even if a <a for="root">KEYID</a> is listed
1339+
more than once in the "signatures" list a client MUST NOT count more than one
1340+
verified <a>SIGNATURE</a> from that <a for="root">KEYID</a> towards the
1341+
<a>THRESHOLD</a>.
13451342
If version N+1 is not signed as required, discard it, abort the update cycle,
13461343
and report the signature failure. On the next update cycle, begin at step
13471344
[[#update-root]] and version N of the root metadata file.
@@ -1394,11 +1391,11 @@ it in the next step.
13941391
in the trusted root metadata file. When computing the <a>THRESHOLD</a> each
13951392
<a>KEY</a> MUST only contribute one <a>SIGNATURE</a>. That is, each
13961393
<a>SIGNATURE</a> which is counted towards the <a>THRESHOLD</a> MUST have
1397-
a unique <a>KEYID</a>. Even if a <a>KEYID</a> is listed more than once in the
1398-
"signatures" list a client MUST NOT count more than one verified
1399-
<a>SIGNATURE</a> from that <a>KEYID</a> towards the <a>THRESHOLD</a>. If the
1400-
new timestamp metadata file is not properly signed, discard it, abort the
1401-
update cycle, and report the signature failure.
1394+
a unique <a for="root">KEYID</a>. Even if a <a for="root">KEYID</a> is listed
1395+
more than once in the "signatures" list a client MUST NOT count more than one
1396+
verified <a>SIGNATURE</a> from that <a for="root">KEYID</a> towards the
1397+
<a>THRESHOLD</a>. If the new timestamp metadata file is not properly signed,
1398+
discard it, abort the update cycle, and report the signature failure.
14021399

14031400
3. **Check for a rollback attack.**
14041401

@@ -1453,11 +1450,12 @@ it in the next step.
14531450
the trusted root metadata file. When computing the <a>THRESHOLD</a> each
14541451
<a>KEY</a> MUST only contribute one <a>SIGNATURE</a>. That is, each
14551452
<a>SIGNATURE</a> which is counted towards the <a>THRESHOLD</a> MUST have
1456-
a unique <a>KEYID</a>. Even if a <a>KEYID</a> is listed more than once in the
1457-
"signatures" list a client MUST NOT count more than one verified
1458-
<a>SIGNATURE</a> from that <a>KEYID</a> towards the <a>THRESHOLD</a>. If the
1459-
new snapshot metadata file is not signed as required, discard it, abort the
1460-
update cycle, and report the signature failure.
1453+
a unique <a for="root">KEYID</a>. Even if a <a for="root">KEYID</a> is listed
1454+
more than once in the "signatures" list a client MUST NOT count more than one
1455+
verified <a>SIGNATURE</a> from that <a for="root">KEYID</a> towards the
1456+
<a>THRESHOLD</a>. If the new snapshot metadata file is not signed as
1457+
required, discard it, abort the update cycle, and report the signature
1458+
failure.
14611459

14621460
4. **Check against timestamp role's snapshot version**. The version
14631461
number of the new snapshot metadata file MUST match the version number listed
@@ -1509,11 +1507,11 @@ it in the next step.
15091507
in the trusted root metadata file. When computing the <a>THRESHOLD</a> each
15101508
<a>KEY</a> MUST only contribute one <a>SIGNATURE</a>. That is, each
15111509
<a>SIGNATURE</a> which is counted towards the <a>THRESHOLD</a> MUST have a
1512-
unique <a>KEYID</a>. Even if a <a>KEYID</a> is listed more than once in the
1513-
"signatures" list a client MUST NOT count more than one verified
1514-
<a>SIGNATURE</a> from that <a>KEYID</a> towards the <a>THRESHOLD</a>. If the
1515-
new targets metadata file is not signed as required, discard it, abort the
1516-
update cycle, and report the failure.
1510+
unique <a for="root">KEYID</a>. Even if a <a for="root">KEYID</a> is listed
1511+
more than once in the "signatures" list a client MUST NOT count more than one
1512+
verified <a>SIGNATURE</a> from that <a for="root">KEYID</a> towards the
1513+
<a>THRESHOLD</a>. If the new targets metadata file is not signed as
1514+
required, discard it, abort the update cycle, and report the failure.
15171515

15181516
4. **Check against snapshot role's targets version**. The version
15191517
number of the new targets metadata file MUST match the version number listed

0 commit comments

Comments
 (0)