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: POUFs/reference-POUF/pouf1.md
+47-14Lines changed: 47 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,24 @@
1
1
* POUF: 1
2
2
* Title: Reference Implementation Using Canonical JSON
3
-
* Version: 1
4
-
* Last-Modified: 27-June-2019
5
-
* Author: Marina Moore
3
+
* Version: 2
4
+
* Last-Modified: 06-May-2020
5
+
* Author: Marina Moore, Joshua Lock
6
6
* Status: Draft
7
7
* TUF Version Implemented: 1.0
8
+
* Implementation Version(s) Covered: v0.12.*
8
9
* Content-Type: text/markdown
9
10
* Created: 25-November-2018
10
11
11
12
# Abstract
12
13
This POUF describes the protocol, operations, usage, and formats for the TUF reference implementation written in Python by NYU.
13
14
14
-
The reference implementation includes all required features of the TUF standard, as well as many of the optional features as a reference for anyone wishing to implement TUF. The implementation uses canonical JSON encoding.
15
+
The reference implementation includes all required features of the TUF standard, as well as many of the optional features as a reference for anyone wishing to implement TUF. The implementation uses Canonical JSON encoding.
16
+
17
+
This version of the POUF covers v0.12.* of the reference implementation and has been updated to reflect that: snapshot.json only lists targets metadata (top-level and delegated), and timestamp.json includes hashes and length in METAFILES.
15
18
16
19
# Protocol
17
20
18
-
This POUF uses a subset of the JSON object format, with floating-point numbers omitted. When calculating the digest of an object, we use the "canonical JSON" subdialect as described at http://wiki.laptop.org/go/Canonical_JSON.
21
+
This POUF uses a subset of the JSON object format, with floating-point numbers omitted. When calculating the digest of an object, we use the "canonical JSON" subdialect as described at http://wiki.laptop.org/go/Canonical_JSON and implemented in [securesystemslib](https://github.com/secure-systems-lab/securesystemslib/blob/master/securesystemslib/formats.py#L666).
19
22
20
23
In this POUF, metadata files are hosted on the repository using HTTP. The filenames for these files are ROLE.json where ROLE is the associated role name (root, targets, snapshot, or timestamp). A client downloads these files by HTTP post request. The location of the repository is preloaded onto the clients.
21
24
@@ -162,7 +165,10 @@ The "signed" portion of root.json is as follows:
162
165
, ... }
163
166
}
164
167
165
-
SPEC_VERSION is the version number of the specification using semantic versioning.
168
+
SPEC_VERSION is the version number of the specification using [semantic versioning](https://semver.org/spec/v2.0.0.html).
169
+
For purposes of ensuring the spec_version matches during an update, the reference
170
+
implementation considers all spec_version's with the same major version number to
171
+
be a match.
166
172
167
173
CONSISTENT_SNAPSHOT is a boolean indicating whether the repository supports
168
174
consistent snapshots.
@@ -190,9 +196,8 @@ The "signed" portion of root.json is as follows:
190
196
191
197
### snapshot.json
192
198
The snapshot.json file is signed by the snapshot role. It lists the version
193
-
numbers of all metadata on the repository, excluding timestamp.json and
194
-
mirrors.json. For the root role, the hash(es), size, and version number
195
-
are listed.
199
+
numbers of the top-level targets metadata and all delegated targets
200
+
metadata on the repository.
196
201
197
202
The "signed" portion of snapshot.json is as follows:
198
203
@@ -213,8 +218,8 @@ The "signed" portion of root.json is as follows:
213
218
METAPATH is the the metadata file's path on the repository relative to the
214
219
metadata base URL.
215
220
216
-
VERSION is listed for the root file
217
-
and all other roles available on the repository.
221
+
VERSION is the integer version number listed in the metdata file at
222
+
METAPATH.
218
223
219
224
### targets.json and delegated target roles
220
225
The "signed" portion of targets.json is as follows:
@@ -242,6 +247,9 @@ The "signed" portion of root.json is as follows:
242
247
It is allowed to have a TARGETS object with no TARGETPATH elements. This
243
248
can be used to indicate that no target files are available.
244
249
250
+
LENGTH is an integer that specifies the size in bytes of the file at
251
+
TARGETPATH.
252
+
245
253
HASHES is a dictionary that specifies one or more hashes, including
246
254
the cryptographic hash function. For example: { "sha256": HASH, ... }. It
247
255
is required for delegated roles, and optional for all others. HASH is the
@@ -331,9 +339,27 @@ The timestamp file is signed by a timestamp key. It indicates the
331
339
"meta" : METAFILES
332
340
}
333
341
334
-
METAFILES is the same is described for the snapshot.json file. In the case
335
-
of the timestamp.json file, this will commonly only include a description of
336
-
the snapshot.json file.
342
+
METAFILES is an object whose format is the following:
343
+
344
+
{ METAPATH : {
345
+
"version" : VERSION,
346
+
"length" : LENGTH,
347
+
"hashes" : HASHES }
348
+
, ...
349
+
}
350
+
351
+
METAPATH is the the snapshot metadata file's path on the repository
352
+
relative to the metadata base URL.
353
+
354
+
VERSION is the integer version number listed in snapshot.json.
355
+
356
+
LENGTH is an integer that specifies the size in bytes of the snapshot.json
357
+
metadata file.
358
+
359
+
HASHES is a dictionary that specifies one or more hashes, including
360
+
the cryptographic hash function. For example: { "sha256": HASH, ... }.
361
+
HASH is the hexdigest of the cryptographic function computed on the
362
+
snapshot.json metadata file.
337
363
338
364
### mirrors.json
339
365
The mirrors.json file is signed by the mirrors role. It indicates which
@@ -377,3 +403,10 @@ for example, randomly select from the listed mirrors.
377
403
378
404
# Security Audit
379
405
This profile was included in TUF security audits available at https://theupdateframework.github.io/audits.html.
406
+
407
+
# Version History
408
+
409
+
## 2
410
+
Updated to reflect the latest (v0.12.2) reference implementation.
411
+
* snapshot.json lists only the top-level and delegated targets metadata
412
+
* timestamp.json includes hashes and length of snapshot.json
@@ -50,7 +50,7 @@ These statuses are maintained by the POUF author and included in the header of t
50
50
They allow POUFs in all stages to be made available while clarifying which are ready to be implemented.
51
51
52
52
POUFs may be changed over time to account for changes to the TUF specification, updates to protocols, or other design changes.
53
-
To indicate that a change has occurred, new version numbers should be assigned to the POUF. The version number will be stored in the POUF header as described in {#pouf-format}.
53
+
To indicate that a change has occurred, new version numbers should be assigned to the POUF. The version number will be stored in the POUF header as described in [POUF Format](#pouf-format).
54
54
In order for a POUF implementer to know if their implementation needs to be updated, any changes that make a POUF not backwards compatible should result in a new version number.
55
55
The format and management of version numbers is left to the POUF author, but standard formats like Semantic Versioning (https://semver.org/) are recommended for clarity and consistency with TUF. In addition, POUF authors may refer to how TUF manages updates to ensure that non backwards compatible POUFs do not interfere with TUF communication.
56
56
@@ -67,15 +67,15 @@ For example, implementers a and b may implement POUF p1.
67
67
This means that a and b will be able to interoperate, but they will not necessarily be able to interoperate with implementers of POUF p2.
68
68
It is important that implementations list in their documentation the POUF(s) that are supported as well as the version numbers for these POUF(s) so that other implementers looking to interoperate may refer to the relevant POUF.
69
69
70
-
To ensure that a POUF follows the TUF specification and that it does not introduce new security issues, we recommend a security audit for POUFs as described in {#security-audit}.
70
+
To ensure that a POUF follows the TUF specification and that it does not introduce new security issues, we recommend a security audit for POUFs as described in [Security Audit](#security-audit).
71
71
In addition to checking the POUF against the specification, this audit ensures that the encoding method or design decisions do not introduce ambiguity or an insecure implementation.
72
72
The security audit does not guarantee security, but provides some oversight.
73
73
74
74
## POUF Storage
75
75
76
76
If a POUF author wants their POUF to be publicly accessed and reviewed, it should be stored in a public location that can be accessed by other TUF implementers.
77
77
In addition to storing the current POUF, the author may maintain old versions of the POUF to allow existing implementations to continue to refer to them.
78
-
Old versions will have a unique version number in the header as described in {#pouf-format}, and may additionally be named according to the POUF version.
78
+
Old versions will have a unique version number in the header as described in [POUF Format](#pouf-format), and may additionally be named according to the POUF version.
79
79
For example a POUF repository may contain two documents, POUFNAME-1.md and POUFNAME-2.md, that contain version 1 and 2 of the POUF respectively.
80
80
81
81
A link to a public POUF can be added to the TAP repository through the pull request process.
@@ -95,12 +95,13 @@ At a minimum, a POUF shall contain the following sections:
95
95
* Title:
96
96
* Version:
97
97
* Last-Modified:
98
-
* Author: optional list of authors' real names and email addrs
98
+
* Author: optional list of authors' real names and email addresses
99
99
* Status: Draft / In Use / Obsolete
100
-
* TUF Version Implemented:
100
+
* TUF Version(s) Implemented: the release version of the TUF specification versions covered by the POUF
101
+
* Implementation Version(s) Covered: release version information of the implementation versions covered by this Version of the POUF
101
102
* Content-Type: text/markdown
102
103
* Created: date created on, in dd-mmm-yyyy format
103
-
* Abstract: Description of the POUF including an overview of design decisions. If the POUF version has been updated, the changes to the POUF should be described here.
104
+
* Abstract: Description of the POUF including an overview of design decisions. If the POUF version has been updated, a summary of high-level changes to the POUF should be described here.
104
105
* Protocol: The protocol section describes the networking operations of the implementation. This includes the protocol used to transmit data, the location and filenames of any hosted files, and a Message Handler Table. The Message Handler Table will list all messages transmitted by the implementation. Each entry in the Message Handler Table will include the sender, receiver, data, and expected response. All messages in this table must be implemented by anyone using the POUF.
105
106
* Operations: The operations section contains a description of any design elements or features that differ from the TUF specification. This section will describe any optional or additional features that are required for compatibility. The format of data does not need to be described here.
106
107
* Usage: The usage section contains an overview of how data is managed by the implementation. This includes key management, key rotation, server setup, supply chain security, and device registration.
@@ -117,7 +118,8 @@ At a minimum, a POUF shall contain the following sections:
117
118
If mirrors are supported by the POUF, their format should be described here. Information about how mirrors are used may be included in the Operations section of the POUF.
118
119
119
120
The canonical json description currently in the TUF specification (under "Document Formats") provides an example of the type definitions required for the Formats section of a POUF.
120
-
* Security Audit: The third party security audit as described in {#security-audit}.
121
+
* Security Audit: The third party security audit as described in [Security Audit](#security-audit).
122
+
* Version History: For versions beyond the initial release this should be a list of changes introduced in each new version of the POUF. This section could also map POUF versions to releases of the implementation.
0 commit comments