Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TARGETPATH and PATHPATTERN recommendations #67

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions tuf-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,13 @@ repo](https://github.com/theupdateframework/specification/issues).
}

Each key of the TARGETS object is a TARGETPATH. A TARGETPATH is a path to
a file that is relative to a mirror's base URL of targets. It should not
have a leading path separator to avoid surprising behavior when constructing
paths on disk.
a file that is relative to a mirror's base URL of targets. To avoid
surprising behavior when resolving paths, it is RECOMMENDED that a
TARGETPATH uses the forward slash (/) as directory separator and does not
start with a directory separator. The recommendation for TARGETPATH aligns
with the ["path-relative-URL string"
definition](https://url.spec.whatwg.org/#path-relative-url-string) in the
WHATWG URL specification.

It is allowed to have a TARGETS object with no TARGETPATH elements. This
can be used to indicate that no target files are available.
Expand Down Expand Up @@ -881,8 +885,11 @@ repo](https://github.com/theupdateframework/specification/issues).
match file paths "targets/foo.tgz" and "targets/bar.tgz", but not
"targets/foo.txt". Likewise, path pattern "foo-version-?.tgz" matches
"foo-version-2.tgz" and "foo-version-a.tgz", but not "foo-version-alpha.tgz".
It should not have a leading path separator to avoid surprising behavior when
constructing paths on disk.
To avoid surprising behavior when matching targets with PATHPATTERN, it is
RECOMMENDED that PATHPATTERN uses the forward slash (/) as directory
separator and does not start with a directory separator, akin to
TARGETSPATH.


Prioritized delegations allow clients to resolve conflicts between delegated
roles that share responsibility for overlapping target paths. To resolve
Expand Down