-
Notifications
You must be signed in to change notification settings - Fork 386
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
Docker signature transport uses reserved URI characters #187
Comments
/cc @mtrmac |
related issue #120 |
Ouch. Anyway, to be more specific, quoting that RFC:
(emphasis mine) Then, looking at
so
which… changes nothing? And then
The HTTP specification says nothing in that respect, but
if we include Anyway, with
the issue of (That’s not to say that this isn’t an issue and we can just define it away… but if we care about what Artifactory accepts, then we need to know what it refuses so that any possible replacement to the scheme isn’t rejected again.) |
I believe we care what Artifactory accepts. Should we open a conversation with them? |
For reference, here's the code (line 101): I'll bump this thread. |
I guess this could be because of https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx , the impossibility to use colons in file names on Windows? That does seem to be important for cross-platform portability. |
So from my reading these characters are out.
|
Suggestions:
|
|
Based on https://github.com/docker/distribution/blob/master/reference/reference.go ,
(This duplicates some of the exclusions mentioned above, repeating to explicitly associate them with the semantics / rationale.) |
Does that leave from my original list.
|
Update for mtrmac/image:api-changes
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
So the URI reserved characters are really a red herring; containers/image does already percent-encode them in the path when sending the request, and HTTP servers obviously percent-decode. This can be demonstrated by applying #201 and configuring e.g. docker:
docker.io/library:
sigstore: https://example.com/a:b/A%3AB/c[d/e]f/g@h in a
(note how both
“specifically allowed’ characters are not percent-encoded) So, the binding constraints are only 1) Windows pathname restrictions, 2) characters which already have defined meanings in docker digest references, prohibiting That leaves us quite a few options. To make things simple for naive clients constructing HTTP by pasting strings, we can use one of the “specifically allowed” characters for And to make things simple for us and copy&paste in shell, let’s only consider characters which are not treated by The intersection is |
I like it. '=' it is. |
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
i.e. use …/busybox@sha256=… instead of ../busybox@sha256:… . See containers/image#187 for more discussion. Signed-off-by: Miloslav Trmač <[email protected]>
Per implementation (also doc #120) the manifest digest reference for the "docker" transport type is HASH_FUNCTION:HASH_VALUE, using a colon (:) delimiter. The "at" symbol (@) is also used the delimit image and manifest digest (again, see #120). Per URI: Generic Syntax these are reserved delimiting characters.
Impact
The colon in the URI is blocking uploading of signatures to JFrog's Artifactory repository management platform, returning 500 error:
Percent-encoding the path (
%3A
) does not help. Artifactory has not responded to this related issueThe text was updated successfully, but these errors were encountered: