specification icon indicating copy to clipboard operation
specification copied to clipboard

TUF metadata terminology pet peeves and rename suggestions

Open lukpueh opened this issue 4 years ago • 7 comments

Some of the terminology used in TUF metadata is not ideal. Given that no single rename justifies the consequential migration effort, this issue shall collect terminology pet peeves and rename suggestions (plus rationale), until we have accumulated enough to warrant a flag day...

lukpueh avatar Feb 15 '21 12:02 lukpueh

meta (see #27 for details)

lukpueh avatar Feb 15 '21 12:02 lukpueh

_type

The leading underscore is probably an artifact of name shadowing prevention in Python, and at the same time marks the corresponding Python name as "protected". This language bias seem unnecessary. Alternatives, including more specific names for the field include: metadata_name, md_name, role, name, role_name.

lukpueh avatar Feb 15 '21 12:02 lukpueh

TARGETPATH vs. TARGETSPATH

I think they are the same, but used in different contexts. Probably they don't need different definitions

NOTE: These are only placeholders for value definitions in the spec, and can be changed without effect on the metadata format.

lukpueh avatar Feb 15 '21 12:02 lukpueh

TARGETPATH vs. TARGETSPATH

I think they are the same, but used in different contexts. Probably they don't need different definitions

In the latest specification (v1.0.17) they are different. TARGETSPATH in the mirrors role is the relative path of the location of target files (i.e. a directory containing all targets), whereas TARGETPATH in the target role is the path of a target file.

Given the ambiguity and that they are only placeholders in the spec (not parts of the metadata format), and therefore not a compatibility change, it makes sense to make these terms more distinct. I will propose a change.

joshuagl avatar Feb 15 '21 14:02 joshuagl

I also suggest that we replace the Timestamp meta field with snapshot_meta field. Where snapshot_meta will contain the same information as meta["snapshot.json"]. Besides simplification, this will also help with the effort of supporting metadata files with different extensions because we won't care about the snapshot file type compared to the approach we use in the reference specification with meta["snapshot.json"]

This will be a breaking change and thus we can propose it for TUF version 1.0.0

MVrachev avatar Jul 12 '21 13:07 MVrachev

Just the term "targets" is not ideal at all. Why don't we just call it "artifacts"?

trishankatdatadog avatar Jul 12 '21 16:07 trishankatdatadog

Just the term "targets" is not ideal at all. Why don't we just call it "artifacts"?

On a similar note , when describing targets metadata to people, I sometimes differentiate between intermediate 'delegation' roles and the leaf 'artifact signature' roles. However, these two purposes of targets aren't actually mutually exclusive. It would be great to have a name that encompasses both of these ideas.

mnm678 avatar Jul 12 '21 17:07 mnm678