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
{{ message }}
Repository navigation
Does timestamp.json still require length and hashes? #38
In 4.6 of the spec, the timestamp role METAFILES is described as:
METAFILES is the same is described for the snapshot.json file. In the case of the timestamp.json file, this will commonly only include a description of the snapshot.json file.
Where the METAFILES described in snapshot.json is:
METAFILES is an object whose format is the following:
{ METAPATH : {
"version" : VERSION }
, ...
}
METAPATH is the metadata file's path on the repository relative to the metadata base URL.
VERSION is listed for the root file and all other roles available on the repository.
However, the example in the spec includes the size and hashes field:
Are the length and hashes field optional for the timestamp.json role, or are they required? I'm not sure if the arguments made in theupdateframework/python-tuf#451 and theupdateframework/python-tuf#465 to make these fields optional for the snapshot role also apply to the timestamp role.
Since timestamp.json is always constant size in practice (but even if attackers inflate the file, we have upper bounds on downloading files in practice), this is not a problem. It would be appreciated if you could send a PR clarifying this :)
The TUF specification is currently written to require that timestamp list hashes for snapshot, yes; this is explicit in 2.1.4 in the spec.
I cannot now think of a reason that the hash of snapshot in timestamp (instead of just the version of snapshot in timestamp) is really that helpful. I may be forgetting something. Anyone else?
(And to be clear, yeah, Eric, your spec quotes make it clear that it's worth a little cleanup where the Timestamp section refers to Snapshot's meta section but they don't actually have the same requirements. 😃)
Activity
trishankatdatadog commentedon Mar 25, 2019
Since
timestamp.jsonis always constant size in practice (but even if attackers inflate the file, we have upper bounds on downloading files in practice), this is not a problem. It would be appreciated if you could send a PR clarifying this :)awwad commentedon Apr 4, 2019
As to Eric's question about the hashes:
The TUF specification is currently written to require that timestamp list hashes for snapshot, yes; this is explicit in 2.1.4 in the spec.
I cannot now think of a reason that the hash of snapshot in timestamp (instead of just the version of snapshot in timestamp) is really that helpful. I may be forgetting something. Anyone else?
(And to be clear, yeah, Eric, your spec quotes make it clear that it's worth a little cleanup where the Timestamp section refers to Snapshot's meta section but they don't actually have the same requirements. 😃)
Clarify timestamp.json METAFILES format
Clarify timestamp.json METAFILES format
Clarify timestamp.json METAFILES format
Clarify timestamp.json METAFILES format
Clarify timestamp.json METAFILES format
Clarify timestamp.json METAFILES format