Bug 1882518
| Summary: | yum Received HTTP code 407 from proxy after CONNECT | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Dan Seals <dseals> |
| Component: | Build | Assignee: | Adam Kaplan <adam.kaplan> |
| Status: | CLOSED WORKSFORME | QA Contact: | wewang <wewang> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.5 | CC: | aos-bugs, kelly.brown1, pbertera, wzheng |
| Target Milestone: | --- | ||
| Target Release: | 4.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-10-01 14:20:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dan Seals
2020-09-24 19:22:59 UTC
Can you please verify that the HTTP_PROXY and HTTPS_PROXY environment variables are set properly within the build container? You can do this with the following Dockerfile: ``` FROM registry.access.redhat.com/ubi8/ubi:latest RUN echo $HTTP_PROXY RUN echo $HTTPS_PROXY ``` I suspect that these environment variables are present, but either a) do not have the correct username:password, or b) there is a configuration issue with the proxy. Cannot reproduce on 4.5 CI cluster with authenticated proxy.
Proxy settings (note - this is an authenticated MITM proxy with a self-signed certificate):
```
$ oc get proxy/cluster -o yaml
kind: Proxy
apiVersion: config.openshift.io/v1
metadata:
name: cluster
...
spec:
httpProxy: http://<user>:<password>@<proxy-ip>:<proxy-port>/
httpsProxy: http://<user>:<password>@<proxy-ip>:<proxy-port>/
trustedCA:
name: user-ca-bundle
```
BuildConfig:
```
$ oc new-build https://github.com/sclorg/nginx-ex.git --name rhel8-nginx -D $'FROM registry.redhat.io/rhel8/nginx-116\nUSER root\nRUN yum -y install --disableplugin=subscription-manager python3\nUSER 1001'
```
Just for the records: by default dnf (yum) has the option `proxy_auth_method` set to `auto`. This makes dnf doing a discovery of the authentication method required by the server: - dnf sends the first request without the `Proxy-Authorization` - the proxy should answer with 407 containing the `Proxy-Authenticate` header with the authentication type required - dnf sends the request with all the authentication headers needed If the proxy do not send the `Proxy-Authenticate` dnf cannot continue the authentication and terminates. Setting `proxy_auth_method` to the proper method makes dnf sending the authorization headers at the first request. |