Skip to content

Commit 7331a80

Browse files
authored
Merge pull request #113 from joshuagl/joshuagl/POUF1
Suggested changes to TAP 11 and POUF 1
2 parents 3130ba1 + 656a051 commit 7331a80

File tree

3 files changed

+60
-25
lines changed

3 files changed

+60
-25
lines changed

POUFs/reference-POUF/pouf1.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
* POUF: 1
22
* 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
66
* Status: Draft
77
* TUF Version Implemented: 1.0
8+
* Implementation Version(s) Covered: v0.12.*
89
* Content-Type: text/markdown
910
* Created: 25-November-2018
1011

1112
# Abstract
1213
This POUF describes the protocol, operations, usage, and formats for the TUF reference implementation written in Python by NYU.
1314

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.
1518

1619
# Protocol
1720

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).
1922

2023
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.
2124

@@ -162,7 +165,10 @@ The "signed" portion of root.json is as follows:
162165
, ... }
163166
}
164167

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.
166172

167173
CONSISTENT_SNAPSHOT is a boolean indicating whether the repository supports
168174
consistent snapshots.
@@ -190,9 +196,8 @@ The "signed" portion of root.json is as follows:
190196

191197
### snapshot.json
192198
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.
196201

197202
The "signed" portion of snapshot.json is as follows:
198203

@@ -213,8 +218,8 @@ The "signed" portion of root.json is as follows:
213218
METAPATH is the the metadata file's path on the repository relative to the
214219
metadata base URL.
215220

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.
218223

219224
### targets.json and delegated target roles
220225
The "signed" portion of targets.json is as follows:
@@ -242,6 +247,9 @@ The "signed" portion of root.json is as follows:
242247
It is allowed to have a TARGETS object with no TARGETPATH elements. This
243248
can be used to indicate that no target files are available.
244249

250+
LENGTH is an integer that specifies the size in bytes of the file at
251+
TARGETPATH.
252+
245253
HASHES is a dictionary that specifies one or more hashes, including
246254
the cryptographic hash function. For example: { "sha256": HASH, ... }. It
247255
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
331339
"meta" : METAFILES
332340
}
333341

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.
337363

338364
### mirrors.json
339365
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.
377403

378404
# Security Audit
379405
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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* [TAP 6: Include specification version in metadata](tap6.md)
1010
* [TAP 9: Mandatory metadata signing schemes](tap9.md)
1111
* [TAP 10: Remove native support for compressed metadata](tap10.md)
12+
* [TAP 11: Using POUFs for Interoperability](tap11.md)
1213

1314
## Draft
1415

1516
* [TAP 8: Key rotation and explicit self-revocation](tap8.md)
16-
* [TAP 11: Using POUFs for Interoperability](tap11.md)
1717
* [TAP 12: Improving keyid flexibility](tap12.md)
1818

1919
## Rejected

tap11.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
* TAP:
1+
* TAP: 11
22
* Title: Using POUFs for Interoperability
33
* Version: 1
4-
* Last-Modified: 26-June-2019
4+
* Last-Modified: 17-Jul-2020
55
* Author: Marina Moore, Santiago Torres, Trishank Kuppusamy, Sebastien Awwad, Justin Cappos
6-
* Status: Draft
6+
* Status: Accepted
77
* Content-Type: text/markdown
88
* Created: 9-November-2018
99

@@ -50,7 +50,7 @@ These statuses are maintained by the POUF author and included in the header of t
5050
They allow POUFs in all stages to be made available while clarifying which are ready to be implemented.
5151

5252
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).
5454
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.
5555
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.
5656

@@ -67,15 +67,15 @@ For example, implementers a and b may implement POUF p1.
6767
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.
6868
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.
6969

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).
7171
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.
7272
The security audit does not guarantee security, but provides some oversight.
7373

7474
## POUF Storage
7575

7676
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.
7777
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.
7979
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.
8080

8181
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:
9595
* Title:
9696
* Version:
9797
* Last-Modified:
98-
* Author: optional list of authors' real names and email addrs
98+
* Author: optional list of authors' real names and email addresses
9999
* 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
101102
* Content-Type: text/markdown
102103
* 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.
104105
* 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.
105106
* 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.
106107
* 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:
117118
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.
118119

119120
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.
121123

122124
## Security Audit
123125

0 commit comments

Comments
 (0)