Skip to content

Conversation

austinvazquez
Copy link
Contributor

Docker API v1.4 and lower expected registry authentication to be sent in the request body when pushing or pulling ("creating") images. API v1.5 (Docker v0.6.1) changed this to this to use a X-Registry-Auth header instead.

This change was implemented in d04beb7, which kept a fallback for clients using old (< v1.5) API versions which would send authentication in the request body.

Given that we no longer support API versions older than v1.24, and clients using API v1.5 would be over 12 Years old.

(cherry picked from commit ea29dff)

- What I did
Backports #50371 to 28.x stable branch.

- How I did it

git cherry-pick -xsS ea29dffaa541289591aa44fa85d2a596ce860e16

- How to verify it

- Human readable description for the release notes

`POST /images/{name:}/push`: remove compatibility with API v1.4 auth-config in body.

- A picture of a cute animal (not mandatory but encouraged)

Docker [API v1.4] and lower expected registry authentication to be sent in
the request body when pushing or pulling ("creating") images. [API v1.5]
(Docker v0.6.1) changed this to this to use a `X-Registry-Auth` header
instead.

This change was implemented in d04beb7,
which kept a fallback for clients using old (< v1.5) API versions which
would send authentication in the request body.

Given that we no longer support API versions older than v1.24, and clients
using API v1.5 would be over 12 Years old.

[API v1.4]: https://github.com/moby/moby/blob/v0.6.1/docs/sources/api/docker_remote_api_v1.4.rst#push-an-image-on-the-registry
[API v1.5]: https://github.com/moby/moby/blob/v0.6.2/docs/sources/api/docker_remote_api_v1.5.rst#push-an-image-on-the-registry

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ea29dff)
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
@austinvazquez
Copy link
Contributor Author

Probably fine for 28.3.3?

@thaJeztah
Copy link
Member

Yeah, I think this should be fine; even worth considering including in the LTS branches; nothing should depend on this feature since ... 10+ Years, and it looks like the side-effects were worse than the benefits.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit f173e45 into moby:28.x Jul 22, 2025
232 of 233 checks passed
@austinvazquez austinvazquez deleted the cherry-pick-ea29dffaa541289591aa44fa85d2a596ce860e16-to-28.x branch July 22, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants