Replies: 2 comments
|
Thank you for your interest in contributing to our community! We currently only accept discussions created through the GitHub UI using our provided discussion templates. Please re-submit your discussion by navigating to the appropriate category and using the template provided. This discussion has been closed because it was not submitted through the expected format. If you believe this was a mistake, please reach out to the maintainers. |
|
In the OCI Distribution Specification, the For your preflight client:
|
Uh oh!
There was an error while loading. Please reload this page.
Question about GHCR upload cancellation
Which same-origin
Locationformats canghcr.ioreturn when opening a blob upload, and what repository scope does GHCR expect when canceling that specific upload? Documenting the supported format would help a preflight verify write access without publishing an image or requesting permission to delete packages.Reproduction and observed result
packages: writefor a repository connected to a public GHCR package. Use a disposable package for an independent reproduction.https://ghcr.io/tokenwithservice=ghcr.ioandscope=repository:<owner>/<image>:pull,push.POSTtohttps://ghcr.io/v2/<owner>/<image>/blobs/uploads/with that bearer token. Expect HTTP 202 and resolve the response'sLocationagainst the request URL. For this report, compare only its origin and whether its pathname starts with the request's upload path. Redact the entire header, including the query and upload identifiers.In Router's November 30 GitHub-hosted release job, the request reached the HTTP 202 handling and
Locationvalidation. The origin matchedhttps://ghcr.io, while the pathname did not pass the local repository upload prefix check. The client therefore did not sendDELETE. This is a hosted-service response rather than a versioned client release. The receipt is the registry preflight job at the tagged client source.The OCI Distribution Specification describes cancellation as a
DELETEto the server-provided upload location. The usual repository upload path is an implementer example. Router keeps a same-origin and repository-path guard to limit the scope of authenticatedDELETErequests. A documented GHCR upload-only URI format or a supported write-scope preflight endpoint would give clients an explicit way to accommodate the observed response. Is a repository-scoped upload URI guaranteed under some conditions, and can it be canceled withpull,push?All reactions