theupdateframework / theupdateframework/specification
clarify paths vs path_hash_prefixes (once more)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 405
- Forks
- 59
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
There was an attempt to clarify paths vs path_hash_prefixes use in delegations (4.5) a few months ago but it looks like the result is still not quite finished:
The "path_hash_prefixes" and "paths" attributes are OPTIONAL, if used, exactly one of them should be set.
both fields are defined as optional yet it's undefined what happens if neither is set. Currently python-tuf Metadata API is actually not spec compliant: it requires one or the other field to be set: if neither is set, that's an error.
This seems to require a spec clarification and there seem to be two possibilities:
- spec should require either "path_hash_prefixes" or "paths" to be set OR
- spec should define what it means if neither is set
I don't have strong opinion but would like a decision. There is an obvious use case for the latter option: If paths and path_hash_prefixes are unset, then everything is delegated:
- This is a use case for pypi for example: they want a "targets" delegating everything to "bins".
- There is no obvious way otherwise to delegate everything (as
paths=["*"]does not delegate paths with directory separators)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the delegations section referenced in the issue, especially version 4.5, and compare its wording with python-tuf Metadata API behavior. The work is done when the project decides how unset paths and path_hash_prefixes should behave and updates the specification to define that behavior clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100