-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Podman behind forward proxy problem. Any requirements like which http headers must not be altered/removed? #11993
Comments
Manifest does not match provided manifest digest sha256:5f57680f3fc9632b0e6db4a9a8804d347108e96c38bc769b03e4158576035895 Interesting. @mtrmac @vrothberg PTAL |
The protocol is documented at https://github.com/distribution/distribution/blob/main/docs/spec/api.md .
To directly go after the error message, it would be necessary to capture the HTTP response (including the body), maybe using Wireshark, and then try re-computing the digest (or just read the response if it is clearly not an image manifest). (I can, at least, confirm that pulling that image directly from Quay does work.) This could happen for quite a few reasons; the proxy modifying the contents for whatever reason, or maybe corrupt storage on a transparent cache, or something like that.
This is more suggestive — I’d pretty much bet on that proxy injecting a HTML… something (either an error page or a login form) instead of just forwarding the request/response as we’d assume. The debug log does list the HTTP verbs and URLs being involved; for starters, try accessing the last one (the one that ends with … That is not certain to work (notably just blindly using |
Thank you very much @mtrmac will try to get some further information related to that. |
@mtrmac, I reviewed the suggested protocol and tried to play around with the Postman and curl code in code snapin
however, I can not get any information about the manifests or blobs which should be like
so I tried
but only get Any hint?
curl command with -vvv
|
That’s not the right path, per the protocol; it’s not even the right hostname. The
curl to a proxy has, in principle no way to tell what the proxy does with the received requests (i.e. whether it sends it anywhere at all, and if so, how is it modified). |
Thank you @mtrmac, In regards to
I expressed myself incorrectly. I meant if I run that curl command without proxy and then with proxy and compare the results, will I be clear about what has been changed by the proxy. In regards to the wrong path: I think I got it now with some hints from https://gist.github.com/alexanderilyin/8cf68f85b922a7f1757ae3a74640d48a. If I run the so, for querying the manifests I would need to:
and run the command
with beautify result I can find the image diggest
With the image digest I would export the following additional variables with the image digest that I got in previous step as the last variable.
I can now run the following command:
in beautified json part of response I could get the config as well as layers digests:
if I then further export the content digest
I can get the image config information from the blob store with the following command:
similarly if I export the variable with the layer digest and file name I can save the layer into a local file with the command below:
if I compare the file size with the layer size provided for the layer in the image blob query we can see the size of the file is the same as provided for the layer in the image info.
With all these -vvv outputs I hope I have all ready to run the same commands behind the proxy and compare results and see if something was altered or omitted. Would that be it? And thank you very much for your help |
I don’t see how that could be possible, nor how that question differs from the question I answered. |
OK then, but thanks anyway. :-) |
Where are we with this, is this still an issue or can it be closed? |
We can say it is not a bug for sure. However, it may be cool if the debug would provide even further information that you can get with the curl -vvv. But that would be more as enhancement request. What do you think about sense of further debugging info? But in any case we can close the issue. |
Eventually we’ll hopefully get containers/image#201 over the finish line. Of course that would still not be able to show how the proxy modified the request when passing it on, if it did. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When I tried to to pull images from quay.io or docker.io with podman behind the proxy I am experience errors and I suspect that the forward proxy may be changing http headers.
is the any list of requirements which header fields must not be altered for podman to work?
the podman can login successfully to docker.io and quay.io.
Steps to reproduce the issue:
steps can not be reproduced as the proxy vendor and settings info are unknown. however the steps done are:
login to quay.io or docker.io
run the commands:
# podman pull quay.io/openshift-release-dev/ocp-release@sha256:5f57680f3fc9632b0e6db4a9a8804d347108e96c38bc769b03e4158576035895
or# podman pull docker.io/borazem/boa-nodejsexpress
Describe the results you received:
example 1 (quay.io):
# podman pull quay.io/openshift-release-dev/ocp-release@sha256:5f57680f3fc9632b0e6db4a9a8804d347108e96c38bc769b03e4158576035895
example2 (docker.io)
# podman pull docker.io/borazem/boa-nodejsexpress
Describe the results you expected:
I would expect the images would download.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes, I checked Podman Troubleshooting Guide
No, I am not sure if the used podman is of the latest version
Additional environment details (AWS, VirtualBox, physical, etc.):
Environment VMWare vSphere.
The text was updated successfully, but these errors were encountered: