-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Optimize docker registry response code #33053
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
Optimize docker registry response code #33053
Conversation
|
I do not think it is right, it seems to be an abuse of "UNSUPPORTED" |
Currently I think UNSUPPORTED will have detailed errors, at least better than InternalServerError. There is no InternalServerError error for docker registry. log: ERROR: failed commit on ref "manifest-sha256:33896528d2ebc8dd157f0f4e6e1a8d28e2580e1fde51ab5655a89158d143a73a": unexpected status from PUT request to https://demo.gitea.com/v2/skydust2b/multiarchtest/manifests/latest: 500 Internal Server Error |
|
|
Even you do not care about server-side sensitive information, always returning "unsupported' is definitely an abuse to the docker status code.
So I'd like to suggest do not spend more time on this, unless you have a clear plan to use it in some real cases. |
lafriks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not return unsupported for internal errors (ex when the database could be unavailable for a moment etc), also returning internal error message to client is no go from security perspective
Again, do not spend time on it unless you have a clear picture about it. |


Use
UNSUPPORTEDresponse code instead ofInternalServerErrorresponse code.Ref: https://github.com/distribution/distribution/blob/main/docs/content/spec/api.md#errors-2