Giter Club home page Giter Club logo

Comments (2)

tonistiigi avatar tonistiigi commented on July 22, 2024

Is there some way we can make requests against such server or could you save the traffic with mitmdump for example so the request/response headers can be inspected.

from buildkit.

themaxx76 avatar themaxx76 commented on July 22, 2024

Hi @tonistiigi,
Thank you for the quick reply.

Is there some way we can make requests against such server or could you save the traffic with mitmdump for example so the request/response headers can be inspected.

I partially reported the info, simplifying the scenario and focusing to important ones; now I will report the complete Dockerfile I have, to reproduce the issue:

FROM quay.io/keycloak/keycloak:24.0.3
ADD --chown=keycloak:keycloak https://nexus.d4science.org/nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=protocol-mapper&v=LATEST /opt/keycloak/providers/protocol-mapper.jar
ADD --chown=keycloak:keycloak https://nexus.d4science.org/nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=keycloak-d4science-script&v=LATEST /opt/keycloak/providers/keycloak-d4science-script.jar
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev", "--verbose"]

The HTTP traffic dump for the first successful build is:

GET /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=protocol-mapper&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
Traceparent: 00-8f9f3c0a9182c30a211a07773d5b277a-3d440319a9279593-01
User-Agent: Go-http-client/1.1

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 06 Jun 2024 15:19:07 GMT
Content-Type: application/java-archive
Content-Length: 10891
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Last-Modified: Thu, 21 Sep 2023 09:20:54 GMT
ETag: "{SHA1{9ef33fe404496b9aeceef365bf39514552b7af16}}"
Content-Disposition: attachment; filename="protocol-mapper-2.1.0.jar"
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept

PK���������
[file content follows]
GET /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=keycloak-d4science-script&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
Traceparent: 00-8f9f3c0a9182c30a211a07773d5b277a-fe4431d4ba3ab78b-01
User-Agent: Go-http-client/1.1

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 06 Jun 2024 15:19:07 GMT
Content-Type: application/java-archive
Content-Length: 7386
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Last-Modified: Thu, 21 Sep 2023 09:20:31 GMT
ETag: "{SHA1{735c1c09f9cdc92e02c40aa536b7ecad1c95713f}}"
Content-Disposition: attachment; filename="keycloak-d4science-script-2.1.0.jar"
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept

PK��������
[file content follows]

And for the subsequent build that fails is:

HEAD /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=keycloak-d4science-script&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
If-None-Match: "{SHA1{735c1c09f9cdc92e02c40aa536b7ecad1c95713f}}", "{SHA1{9ef33fe404496b9aeceef365bf39514552b7af16}}"
Traceparent: 00-c16532c36b5bc12701bf00ca34ae8887-7e28ca1d4b49e382-01
User-Agent: Go-http-client/1.1

HTTP/1.1 304 Not Modified
Server: nginx
Date: Thu, 06 Jun 2024 15:20:57 GMT
Content-Length: 0
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
HEAD /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=protocol-mapper&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
If-None-Match: "{SHA1{735c1c09f9cdc92e02c40aa536b7ecad1c95713f}}", "{SHA1{9ef33fe404496b9aeceef365bf39514552b7af16}}"
Traceparent: 00-c16532c36b5bc12701bf00ca34ae8887-4e0d9808127e7ed7-01
User-Agent: Go-http-client/1.1

HTTP/1.1 304 Not Modified
Server: nginx
Date: Thu, 06 Jun 2024 15:20:57 GMT
Content-Length: 0
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
GET /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=keycloak-d4science-script&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
If-None-Match: "{SHA1{735c1c09f9cdc92e02c40aa536b7ecad1c95713f}}", "{SHA1{9ef33fe404496b9aeceef365bf39514552b7af16}}"
Traceparent: 00-c16532c36b5bc12701bf00ca34ae8887-e7badec3b9a4fb09-01
User-Agent: Go-http-client/1.1

HTTP/1.1 304 Not Modified
Server: nginx
Date: Thu, 06 Jun 2024 15:20:57 GMT
Content-Length: 0
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
GET /nexus/service/local/artifact/maven/content?r=gcube-releases&g=org.gcube.iam&a=protocol-mapper&v=2.1.0 HTTP/1.1
Host: nexus.d4science.org
Accept-Encoding: gzip
Connection: close
Content-Length: 0
If-None-Match: "{SHA1{735c1c09f9cdc92e02c40aa536b7ecad1c95713f}}", "{SHA1{9ef33fe404496b9aeceef365bf39514552b7af16}}"
Traceparent: 00-c16532c36b5bc12701bf00ca34ae8887-27ed3b3518046562-01
User-Agent: Go-http-client/1.1

HTTP/1.1 304 Not Modified
Server: nginx
Date: Thu, 06 Jun 2024 15:20:58 GMT
Content-Length: 0
Connection: close
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept

from buildkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.