-
Notifications
You must be signed in to change notification settings - Fork 41.2k
X-Registry-Auth header sent to Docker Engine API contains field "authHeader" #42905
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
Comments
🥺I'm new in this project, I don't know which branch I need to merge, so I choose |
Thanks @1328032567. Applying the changes to |
Or you can tell my which branch would to be applied #42910 PR, I can create a new branch🥺, and also fix the same bug🥰. But, if this operate would to |
Closing in favor of PR #42910 - Thanks @1328032567 |
One day I'll try to fix another |
Hey @1328032567, we merged your PR, thanks a lot for your contribution ❤️ What you see above your comment is just our usual workflow: we create an issue, and when a PR is created which would solve the issue, we close the issue with "status: superseded" and merge the PR. |
TAT😭, thank u for your reply also merging my PR🥺. Im so appreciated for the whole spring-boot dev team that give a simple issue with tag |
Uh oh!
There was an error while loading. Please reload this page.
When constructing the header value for
X-Registry-Auth
when talking to the Docker Engine API,org.springframework.boot.buildpack.platform.docker.configuration.JsonEncodedDockerRegistryAuthentication#getAuthHeader
is called. This getter is backed by the fieldauthHeader
, which is filled fromorg.springframework.boot.buildpack.platform.docker.configuration.JsonEncodedDockerRegistryAuthentication#createAuthHeader
.This uses
SharedObjectMapper.get().writeValueAsBytes(this)
. However, the JSON from that serialization not only includes the necessary fields likeusername
andpassword
, but also the fieldauthHeader
, which is only used for caching the constructed header.We should annotate the
authHeader
field with@JsonIgnore
and verify in the tests (DockerRegistryUserAuthenticationTests
andDockerRegistryTokenAuthenticationTests
) that the header doesn't contain theauthHeader
field in the JSON.What it looks like:
What it should look like (note the removed
authHeader
field):The text was updated successfully, but these errors were encountered: