Skip to content

Commit 8b3bb05

Browse files
authored
Merge branch 'master' into tap16-accept
Signed-off-by: Marina Moore <[email protected]>
2 parents 7421516 + a30461f commit 8b3bb05

File tree

3 files changed

+57
-76
lines changed

3 files changed

+57
-76
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
* [TAP 3: Multi-role delegations](tap3.md)
88
* [TAP 4: Multiple repository consensus on entrusted targets](tap4.md)
99
* [TAP 6: Include specification version in metadata](tap6.md)
10+
* [TAP 8: Key rotation and explicit self-revocation](tap8.md)
1011
* [TAP 9: Mandatory metadata signing schemes](tap9.md)
1112
* [TAP 10: Remove native support for compressed metadata](tap10.md)
1213
* [TAP 11: Using POUFs for Interoperability](tap11.md)
1314
* [TAP 12: Improving keyid flexibility](tap12.md)
1415
* [TAP 15: Succinct hashed bin delegations](tap15.md)
1516
* [TAP 16: Snapshot Merkle Trees](tap16.md)
17+
* [TAP 20: Self-revocation](tap20.md)
1618

1719
## Draft
1820

19-
* [TAP 8: Key rotation and explicit self-revocation](tap8.md)
2021
* [TAP 13: User Selection of the Top-Level Target Files Through Mapping Metadata](tap13.md)
2122
* [TAP 17: Remove Signature Wrapper from the TUF Specification](tap17.md)
2223
* [TAP 18: Ephemeral identity verification using sigstore's Fulcio for TUF developer key management](tap18.md)
2324
* [TAP 19: Content Addressable Systems and TUF](tap19.md)
24-
* [TAP 20: Self-revocation](tap20.md)
2525

2626
## Deferred
2727

tap20.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Version: 1
44
* Last-Modified: 29-Jan-2024
55
* Author: Marina Moore
6-
* Status: Draft
6+
* Status: Accepted
77
* Content-Type: text/markdown
88
* Created: 19-Jan-2024
99

@@ -39,7 +39,7 @@ still the source of trust, but allows the role to act independently.
3939

4040
# Motivation
4141

42-
Several use cases can benefit from an independent revocation mechanism:
42+
The following use case can benefit from an independent revocation mechanism:
4343

4444

4545
## Community repositories
@@ -77,30 +77,34 @@ from that proposal to support key revocation.
7777
## Rotate file (from TAP 8)
7878

7979
The signed portion of a `rotate` file is as follows (there's also a
80-
signatures wrapper as in tuf spec, not shown here):
80+
signatures wrapper as in the TUF specification, not shown here):
8181

8282
```python
8383
{
84-
"_type" : "rotate" ,
85-
"previous" : PREV_FILENAME
84+
"_type" : "rotate",
85+
"version" : VERSION,
8686
"role" : ROLE,
8787
"keys" : {
8888
KEYID : KEY
8989
, ... } ,
90-
"threshold" : THRESHOLD }
90+
"threshold" : THRESHOLD
9191
}
9292
```
9393

9494
Where ROLE, KEYID, KEY, and THRESHOLD are as defined in the original
95-
tuf spec. The value of ROLE has to be the same as the role for the
96-
delegation. The value of THRESHOLD is its new value. PREV_FILENAME is
97-
the name of the previous rotate file in the chain, or the empty string if this is
98-
the first rotate file for this role. The keys specify the new valid keys
95+
TUF specification. The value of ROLE has to be the same as the role for the
96+
delegation. The value of THRESHOLD is its new value. VERSION is the index of
97+
this rotate file, incrementing by 1 on each rotation. The keys specify the new
98+
valid keys
9999
and associated key ids (which may be a subset or superset of
100100
the old ones). A rotate file does _not_ contain an expiration date,
101101
it is meant to be signed once and never modified. The rotate
102102
file has to be signed with an old threshold of old keys.
103103

104+
This rotate file will be named `ROLE.rotate.VERSION` where ROLE and VERSION are
105+
defined as above and go into a 'rotate' folder on the repository that
106+
contains all rotate files for the repository.
107+
104108

105109
## Rotation to Null
106110

@@ -125,23 +129,30 @@ where NULL is the null key.
125129

126130
### Prioritizing Self Revocation
127131

128-
Rotation files are immutable unless replaced with a revocation (rotate
129-
to null). This is the only case in which they can be replaced or
130-
modified. If a client wants to rotate to a different
132+
Rotation files are immutable unless replaced with a revocation.
133+
This is the only case in which they can be replaced or
134+
modified. If a key holder wants to rotate to a different
131135
key, without having access to their currently delegated private key,
132136
this requires a key revocation by the delegating metadata.
133137

138+
## Client workflow
139+
140+
Rotate files will be downloaded by clients as described in TAP 8. Once a
141+
rotate file is downloaded and verified, the client will check for a rotation
142+
to null. If such a rotation to null is found, the client will treat the given
143+
role as revoked.
134144

135145
# Security Analysis
136146

137147
There should be no negative security impact. The major benefits are
138148
that many security-sensitive revocations that require key use by
139149
multiple parties, will now be much easier to do.
140150

141-
Clients need to take care to check for rotation to a null key (rotate
151+
Clients need to take care to check for revocation (rotate
142152
files that contain a null key). This shall be handled in the
143153
same manner as an invalid metadata signature on by the role possessing
144-
the key. The role will be invalid until it is re-delegated to with a new key.
154+
the key. The role will be invalid until it is re-delegated to with a new
155+
rolename and key.
145156
Clients MUST use snapshot metadata to ensure that they receive all rotate files
146157
in the chain.
147158

@@ -162,7 +173,7 @@ verify the revocations.
162173

163174
# Augmented Reference Implementation
164175

165-
TODO
176+
https://github.com/theupdateframework/python-tuf/pull/2257/files
166177

167178
# Copyright
168179

tap8.md

Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
* TAP: 8
22
* Title: Key rotation and explicit self-revocation
33
* Version: 2
4-
* Last-Modified: 16-Nov-2022
4+
* Last-Modified: 26-Mar-2024
55
* Author: Hannes Mehnert, Justin Cappos, Marina Moore
6-
* Status: Draft
6+
* Status: Accepted
77
* Content-Type: text/markdown
88
* Created: 10-May-2017
99

@@ -30,26 +30,12 @@ Snapshot and timestamp cannot use this rotation mechanism.
3030

3131
Conceptually, the rotation process says if you trusted threshold of keys
3232
X = X_0, ... X_n, now instead trust threshold of keys Y = Y_0, ... Y_n. Rotation
33-
of a key may be performed any number of times, transferring trust from X to Y, then
33+
of a role may be performed any number of times, transferring trust from X to Y, then
3434
from Y to Z, etc. Trust can even be transferred back from Z to X, allowing a key
3535
to be added to a role, then later removed. If a single key needs to be replaced,
3636
it can be safely rotated using the mechanism in this TAP.
3737

38-
The mechanism in this TAP has an additional use case: if a rotation
39-
to a null key is detected, it causes the role to no longer be trusted.
40-
A role could use a rotation to a null key if they suspect a threshold of keys
41-
have been compromised
42-
(a lost hard drive, system breach, etc). The role is able to create a
43-
rotation to null without the help of the delegator, so they are able to
44-
explicitly revoke trust in the role immediately, improving response time
45-
to a key compromise. A rotation to a null key revokes trust in the role,
46-
not specific keys, so all keys associated with the role will be invalid
47-
after a rotation to null. The client will detect a rotation
48-
to a null key and treat it as if the metadata was unsigned.
49-
50-
A delegator to a role A is able to help A recover from a rotation to null of A by
51-
delegating to a new set of keys for A with a new role name.
52-
Additionally, a delegator can overrule a rotate file by delegating to a new role
38+
A delegator can overrule a rotate file by delegating to a new role
5339
with a new set of keys. This ensures that the delegator is still the source of
5440
trust, but allows the role to act independently.
5541

@@ -71,7 +57,7 @@ delegations to be redone whenever this quorum changed.) Adding and
7157
removing delegations of a project often uses the project role's key which is
7258
delegated to. This project role gives persons with access to it elevated
7359
privileges, and needs intervention from a higher level of delegations if
74-
it needs to be rotated or revoked.
60+
it needs to be rotated.
7561

7662
With TAP 8, the delegation can be assigned to a role (that contains a set
7763
of keys and a threshold value). Developers could then collectively sign
@@ -130,15 +116,15 @@ role T to delegate to the new keyset e. If one of role D's keys is
130116
compromised, they have to wait for role T to replace the key with a new,
131117
trusted key.
132118

133-
With this proposal, the owner of role D can replace their own key, and also
134-
revoke their key without relying on the delegator. This will improve
119+
With this proposal, the owner of role D can replace their own key
120+
without relying on the delegator. This will improve
135121
response time to key compromises and prevent key sharing by allowing keys to be
136122
rotated more regularly. Combined with multi-role delegations this allows
137123
project teams to shrink and grow without delegation to a project key.
138124

139125
TUF already contains a key rotation mechanism, which is only specified
140126
and used for the root file. This proposal allows the rotation
141-
mechanism to be used by other delegations, and extends it with self-revocation.
127+
mechanism to be used by other delegations.
142128

143129

144130
# Specification
@@ -152,7 +138,7 @@ delegations stay intact, the targets can rotate keys, remove keys, or add keys.
152138
## Rotate file
153139

154140
The signed portion of a `rotate` file is as follows (there's also a
155-
signatures wrapper as in tuf spec, not shown here):
141+
signatures wrapper as in the TUF specification, not shown here):
156142

157143
```python
158144
{
@@ -162,12 +148,12 @@ signatures wrapper as in tuf spec, not shown here):
162148
"keys" : {
163149
KEYID : KEY
164150
, ... } ,
165-
"threshold" : THRESHOLD }
151+
"threshold" : THRESHOLD
166152
}
167153
```
168154

169155
Where ROLE, KEYID, KEY, and THRESHOLD are as defined in the original
170-
tuf spec. The value of ROLE has to be the same as the role for the
156+
tuf specification. The value of ROLE has to be the same as the role for the
171157
delegation. The value of THRESHOLD is its new value. VERSION is
172158
the integer version number of rotate files for this role. Version
173159
numbers MUST increase by exactly 1 from the previous rotate file for
@@ -210,6 +196,8 @@ old rotate files for the old role should be deleted and removed from snapshot on
210196
the next snapshot key rotation. The client will determine the correct rotate file for the new role
211197
by starting from VERSION 1.
212198

199+
The repository SHOULD set a limit to the number of rotate files per role. This limit should be clear to all key holders (for example, it could be in repository documentation or added to root metadata). Once this number of rotate files is reached, the repository will reject rotations for this role and the delegator should create a new delegation to a new role.
200+
213201
## Client workflow
214202

215203
A client who wants to install foo now fetches Alice's targets file and will
@@ -219,16 +207,13 @@ The client will then look for all files that begin with `rotate/foo.rotate` in
219207
the snapshot metadata. The client will process these in version order (ie starting
220208
with `rotate/foo.rotate.1`, then `rotate/foo.rotate.2` by first checking for this
221209
version file in a local cache. The client will then fetch the rotate file from
222-
remote. If the remote file is a rotation to null, and is signed with the currently
223-
trusted keys, the client will halt the verification of this metadata and act as if
224-
it is unverified when continuing the update process (and look for metadata from
225-
the next role in the pre-order depth-first search). Otherwise, the client should
210+
remote. The client should then
226211
ensure that the cached file is identical to the remote version. The client will
227212
then verify the rotate file using the currently trusted public key(s) for this role.
228213
If a rotate
229214
file is successfully verified, the client will update the set of trusted keys for
230-
this role to be the set listed in the rotate files. If key data is missing
231-
or there is a rotation to null, the targets file is invalid and the client will
215+
this role to be the set listed in the rotate files. If key data is missing,
216+
the targets file is invalid and the client will
232217
proceed with the update process as if verification for this role failed (by moving
233218
on to another trusted role for this target, or reporting an error to the user).
234219

@@ -292,20 +277,6 @@ foo.rotate.2 is created, which contains the existing keyids as well as
292277
Evelyn's public key, and a threshold value of 3. This
293278
is signed with at least 2 keys from the current set of keyids.
294279

295-
## Rotation to Null
296-
297-
Clients need to check for rotations to a null key, and any delegation pointing
298-
to a rotation to a null key is invalid. The null key is a hard coded value used across
299-
tuf implementations. This enables a role to explicitly revoke their
300-
own key(s) by introducing a rotation to null.
301-
302-
**Prioritizing Self Revocation**
303-
Rotation files are immutable unless replaced with a revocation (rotate
304-
to null). This is the only case in which they can be replaced or
305-
modified. If a client wants to rotate to a different
306-
key, without having access to their currently delegated private key,
307-
this requires a key revocation by the delegating metadata.
308-
309280
Rotations which do not have any entry point anymore (the delegation they
310281
stem from has can been replaced with new keys) can be
311282
safely removed from the repository. If the delegation of foo is
@@ -325,7 +296,7 @@ The interaction between the Fulcio TAP and this TAP may impact the security
325296
considerations in this TAP. If the Fulcio server or OIDC issuer is compromised,
326297
an attacker could gain control over all TUF roles controlled by that entity.
327298
If this happens, the attacker could use TAP 8 to create large-scale rotations
328-
to null to perform a denial of service. However, this attack can be safely
299+
to perform a denial of service. However, this attack can be safely
329300
recovered from using the delegator to replace all effected keys. This is
330301
especially effective if the top-level targets is controlled by offline keys.
331302
For this reason, we recommend that both root and top-level targets are
@@ -345,31 +316,30 @@ provide a simple mechanism for extending and shrinking project membership
345316
without an individual with elevated privileges, but based
346317
on a threshold of signatures.
347318

348-
Clients need to take care to check for rotation to a null key (rotate
349-
files that contain a null key). This shall be handled in the
350-
same manner as an invalid metadata signature on by the role possessing
351-
the key. The role will be invalid until it is re-delegated to with a new key.
352-
Clients MUST use snapshot metadata to ensure that they recieve all rotate files
319+
Clients MUST use snapshot metadata to ensure that they receive all rotate files
353320
in the chain.
354321

355-
Intentionally rotating to null enables a repository, a
356-
project, and individuals to explicitly revoke their key material
357-
themselves. An individual whose key is compromised can introduce
358-
a rotation to null, and all delegations to them will be invalid.
359-
360322
For mitigation of private key compromises, rotation can be used if and
361323
only if it can be assured that the legitimate holder is faster (at the
362324
snapshot service, and/or at the client) than the attacker who got
363325
control over the private key. Because this is hard to achieve, it is
364326
recommended for proper mitigation that the delegation itself is changed from
365327
the compromised key to a new key as soon as possible. Key revocation using
366-
rotation defined in this TAP can be used as a stop-gap for delegations made
328+
rotation defined in TAP 20 can be used as a stop-gap for delegations made
367329
by offline keys that may take some time to update.
368330

369331
As a general note, this TAP only extends the possibilities of a target,
370332
but the delegation mechanism is still in place - i.e. a key higher up
371333
in the delegation can always revoke / modify the delegation itself.
372334

335+
A key holder or attacker could upload a large number of rotate files to DoS the
336+
role or repository. This is similar to an existing attack where an attacker
337+
with access to a private key can upload several different versions of the same
338+
metadata file. To mitigate this attack on rotations, the repository should
339+
set a limit on the number of rotate files per role. If a role needs to change
340+
more than this limit, the delegator must re-delegate to a new role, re-setting
341+
any rotations.
342+
373343
Baton - Baton: Certificate Agility for Android’s Decentralized Signing
374344
Infrastructure - http://people.scs.carleton.ca/~paulv/papers/wisec2014-baton.pdf
375345
- is a similar proposal to extend Android's signing infrastructure.
@@ -386,7 +356,7 @@ verify the rotation chain.
386356

387357
# Augmented Reference Implementation
388358

389-
TODO
359+
https://github.com/theupdateframework/python-tuf/pull/2257/files
390360

391361
# Copyright
392362

0 commit comments

Comments
 (0)