You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tap14.md
+55-48Lines changed: 55 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,19 +256,70 @@ specification versions in new
256
256
directories. In addition, root metadata on a repository MUST add a `supported_versions` field
257
257
to indicate which specification versions are supported.
258
258
259
+
In order to fascilitate the upgrade to a new specification version, root metadata for all supported spec versions MUST add a `supported_versions` field before upgrading to spec version 2.0.0.
260
+
This field will serve two purpose.
261
+
262
+
263
+
First, not all TUF repositories have a mechanism that is able to list all directories
264
+
in a folder (the equivalent of the `ls` command). For these repositories (such
265
+
as OCI registries or http servers), as well as to prevent specification version
266
+
freeze attacks, the `supported_versions` field will lists
267
+
all versions supported by the repository to allow for client discovery.
268
+
269
+
Second, the root metadata format or versioning scheme may change between major specification versions.
270
+
The `supported_versions` field will contain the filename and a secure hash of the first root metadata file that should be used in the new specification version.
271
+
272
+
As it is
273
+
included in root metadata, the contents of `supported_versions` will be signed by a threshold of root keys, securing against a specification version rollback, and signing the new trusted root metadata.
274
+
This field will contain the following:
275
+
276
+
```
277
+
{ ...,
278
+
"supported_versions" : [
279
+
{ "version": MAJOR_VERSION,
280
+
"path": VERSION_PATH,
281
+
"features": FEATURES_STRING,
282
+
"root-filename": ROOT_FILENAME,
283
+
"root-digest": ROOT_DIGEST
284
+
},
285
+
...
286
+
]
287
+
}
288
+
289
+
```
290
+
291
+
where `MAJOR_VERSION` is the integer representing a supported major version
292
+
For backwards compatability, version 1 should be assumed to be in the top-level
293
+
repository with no directory named 1. `ROOT_FILENAME` is the name of the root metadata file in the new specification version. `ROOT_DIGEST` is the digest of the new root metadata file.
294
+
`VERSION_PATH` is the path to the directory for this version. In many cases, this will match the specification version, ie "2/".
295
+
`FEATURES_STRING` is a string for the features supported in this version. This string may be used to include an API version for a particular implementation, or to indicate which features in a new specification version are supported. This field MAY be empty, but if it is used, the client MUST ensure that they support the features used. A combination of the specification version and features string will be used to determine which version the client should use.
296
+
297
+
All entries in `supported-versions` will be in priority order so that a client will use the last specification version and feature combination that they support.
298
+
299
+
The `root-digest` field MUST be empty for the supported version that matches the
300
+
specification version and features string used by the current root metadata file. `supported_versions`
301
+
MAY leave out the specification version used by the current root metadata, and any
302
+
older specification versions. So all supported versions greater than the specification
303
+
version of the root metadata MUST be included, and any less than or equal to
304
+
the current specification version MAY be included.
305
+
306
+
A repository should generate all TUF metadata, including root metadata, for all
307
+
TUF versions that the repository supports. Any update to TUF targets or delegations should be reflected across
308
+
all of these versions.
309
+
259
310
As described in the [Rationale](#rationale), repositories should support multiple
260
311
TUF specification versions. In order to do so, this TAP proposes a new directory
261
312
structure for repositories. When a repository manager chooses to upgrade to a
262
-
new major TUF specification version, they create a new directory on the repository named
263
-
for the major version (for example 2). This directory will contain all
313
+
new major TUF specification version, they create a new directory on the repository
314
+
for the major version and feature set (for example "2" for version 2). This directory will contain all
264
315
metadata files for the new specification version, but target files will remain in the
265
316
parent directory to save space. In this case the metadata files (in directories according to their spec
266
317
version) can point to target files relative to the parent directory. After creating
267
318
the directory, the repository creates and signs root, snapshot, timestamp, and
268
319
top-level targets metadata using the new TUF specification version and places these
269
320
metadata files in the directory. The root file should be signed by the new root keys
270
321
listed in the file. A digest of the signed root metadata, along with the new
271
-
supported version numver will then be added to the `supported_versions` field in
322
+
supported version number will then be added to the `supported_versions` field in
272
323
a new root metadata file for all previously supported specififcation versions.
273
324
Clients will now be able to use the new metadata files once their TUF specification
274
325
versions are also updated. After an update to version 2.0.0, the repository
@@ -286,7 +337,7 @@ structure may look like:
286
337
Repository updates to a new minor or patch specification version shall be done
287
338
by uploading new metadata files in the new format to the proper directory. So if
288
339
a repository updates from 2.0.0 to 2.1.0, the 2.1.0 metadata would go in the
289
-
directory named 2. Minor and patch version changes are backwards compatible,
340
+
same directory. Minor and patch version changes are backwards compatible,
290
341
so clients using version 2.0.0 will still be able to parse metadata written
291
342
using version 2.1.0.
292
343
@@ -362,50 +413,6 @@ upgrades from version 1.x.y to version 2.0.0 may look like:
362
413
|- 2.x.y metadata files
363
414
```
364
415
365
-
In order to fascilitate the upgrade to a new specification version, root metadata for all supported spec versions MUST add a `supported_versions` field before upgrading to spec version 2.0.0.
366
-
This field will serve two purpose.
367
-
368
-
369
-
First, not all TUF repositories have a mechanism that is able to list all directories
370
-
in a folder (the equivalent of the `ls` command). For these repositories (such
371
-
as OCI registries or http servers), as well as to prevent specification version
372
-
freeze attacks, the `supported_versions` field will lists
373
-
all versions supported by the repository to allow for client discovery.
374
-
375
-
Second, the root metadata format or versioning scheme may change between major specification versions.
376
-
The `supported_versions` field will contain the filename and a secure hash of the first root metadata file that should be used in the new specification version.
377
-
378
-
As it is
379
-
included in root metadata, the contents of `supported_versions` will be signed by a threshold of root keys, securing against a specification version rollback, and signing the new trusted root metadata.
380
-
This field will contain the following:
381
-
382
-
```
383
-
{ ...,
384
-
"supported_versions" : [
385
-
{ "version": MAJOR_VERSION,
386
-
"root-filename": ROOT_FILENAME,
387
-
"root-digest": ROOT_DIGEST
388
-
},
389
-
...
390
-
]
391
-
}
392
-
393
-
```
394
-
395
-
where `MAJOR_VERSION` is the integer representing a supported major version
396
-
For backwards compatability, version 1 should be assumed to be in the top-level
397
-
repository with no directory named 1. `ROOT_FILENAME` is the name of the root metadata file in the new specification version. `ROOT_DIGEST` is the digest of the new root metadata file.
398
-
399
-
The `root-digest` field MUST be empty for the supported version that matches the
400
-
specification version used by the current root metadata file. `supported_versions`
401
-
MAY leave out the specification version used by the current root metadata, and any
402
-
older specification versions. So all supported versions greater than the specification
403
-
version of the root metadata MUST be included, and any less than or equal to
404
-
the current specification version MAY be included.
405
-
406
-
A repository should generate all TUF metadata, including root metadata, for all
407
-
TUF versions that the repository supports. Any update to TUF targets or delegations should be reflected across
408
-
all of these versions.
409
416
410
417
### Generating metadata for multiple specification versions
0 commit comments