Skip to content

Commit 9794b92

Browse files
authored
Merge pull request #102 from mnm678/flexible-data-format
Replace strict JSON requirement with a flexible requirement
2 parents ad0f82b + a765b3e commit 9794b92

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

tuf-spec.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# <p align="center">The Update Framework Specification
22

3-
Last modified: **2 June 2020**
3+
Last modified: **9 June 2020**
44

5-
Version: **1.0.3**
5+
Version: **1.0.4**
66

77
We strive to make the specification easy to implement, so if you come across
88
any inconsistencies or experience any difficulty, do let us know by sending an
@@ -332,7 +332,7 @@ repo](https://github.com/theupdateframework/specification/issues).
332332

333333
The snapshot role signs a metadata file that provides information about
334334
the latest version of all targets metadata on the repository
335-
(the top-level targets.json and all delegated roles). This information allows
335+
(the top-level targets role and all delegated roles). This information allows
336336
clients to know which metadata files have been updated and also prevents
337337
mix-and-match attacks.
338338

@@ -411,34 +411,36 @@ repo](https://github.com/theupdateframework/specification/issues).
411411
+ **3.1.2 Metadata files**
412412

413413
The filenames and directory structure of repository metadata are strictly
414-
defined. The following are the metadata files of top-level roles relative
414+
defined. All metadata filenames will have an extension (EXT) based on the
415+
metaformat, for example JSON metadata files would have an EXT of json.
416+
The following are the metadata files of top-level roles relative
415417
to the base URL of metadata available from a given repository mirror.
416418

417-
/root.json
419+
/root.EXT
418420

419421
Signed by the root keys; specifies trusted keys for the other
420422
top-level roles.
421423

422-
/snapshot.json
424+
/snapshot.EXT
423425

424426
Signed by the snapshot role's keys. Lists the version numbers of all
425-
target metadata files: the top-level targets.json and all delegated
427+
target metadata files: the top-level targets.EXT and all delegated
426428
roles.
427429

428-
/targets.json
430+
/targets.EXT
429431

430432
Signed by the target role's keys. Lists hashes and sizes of target
431433
files. Specifies delegation information and trusted keys for delegated
432434
target roles.
433435

434-
/timestamp.json
436+
/timestamp.EXT
435437

436438
Signed by the timestamp role's keys. Lists hash(es), size, and version
437439
number of the snapshot file. This is the first and potentially only
438440
file that needs to be downloaded when clients poll for the existence
439441
of updates.
440442

441-
/mirrors.json (optional)
443+
/mirrors.EXT (optional)
442444

443445
Signed by the mirrors role's keys. Lists information about available
444446
mirrors and the content available from each mirror.
@@ -452,13 +454,13 @@ repo](https://github.com/theupdateframework/specification/issues).
452454

453455
A delegated role file is located at:
454456

455-
/DELEGATED_ROLE.json
457+
/DELEGATED_ROLE.EXT
456458

457459
where DELEGATED_ROLE is the name of the delegated role that has been
458-
specified in targets.json. If this role further delegates trust to a role
460+
specified in targets.EXT. If this role further delegates trust to a role
459461
named ANOTHER_ROLE, that role's signed metadata file is made available at:
460462

461-
/ANOTHER_ROLE.json
463+
/ANOTHER_ROLE.EXT
462464

463465
Delegated target roles are authorized by the keys listed in the directly
464466
delegating target role.
@@ -472,7 +474,12 @@ repo](https://github.com/theupdateframework/specification/issues).
472474

473475
* **4.1. Metaformat**
474476

475-
All documents use a subset of the JSON object format, with
477+
Implementers of TUF may use any data format for metadata files as long as
478+
all fields in this specification are included and TUF clients are able to
479+
interpret them without ambiguity. Implementers should choose a data format
480+
that allows for canonicalization, or one that will decode data
481+
deterministically by default so that signatures can be accurately verified.
482+
The examples in this document use a subset of the JSON object format, with
476483
floating-point numbers omitted. When calculating the digest of an
477484
object, we use the "canonical JSON" subdialect as described at
478485
http://wiki.laptop.org/go/Canonical_JSON
@@ -494,8 +501,8 @@ repo](https://github.com/theupdateframework/specification/issues).
494501

495502
KEYID is the identifier of the key signing the ROLE dictionary.
496503

497-
SIGNATURE is a hex-encoded signature of the canonical JSON form of
498-
ROLE.
504+
SIGNATURE is a hex-encoded signature of the canonical form of
505+
the metadata for ROLE.
499506

500507

501508
All keys have the format:
@@ -568,7 +575,7 @@ repo](https://github.com/theupdateframework/specification/issues).
568575
PUBLIC is in PEM format and a string.
569576

570577
The KEYID of a key is the hexdigest of the SHA-256 hash of the
571-
canonical JSON form of the key.
578+
canonical form of the key.
572579

573580
Metadata date-time data follows the ISO 8601 standard. The expected format
574581
of the combined date and time string is "YYYY-MM-DDTHH:MM:SSZ". Time is

0 commit comments

Comments
 (0)