pulp / pulp/pulpcore

HTTP Connections using proxy authentication do not transmit authentication

Open
#6,768 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Version
Pulp OCI 3.82.0

Describe the bug
When a remote (tested on both pulp-rpm and pulp-deb) is configured to use a proxy with authentication and the destination url is http, the proxy authentication is only sent through for the first request and not the following ones.

By default, squid sets client_persistent_connections on, settings this to off resolves the issue.

To Reproduce

pulp rpm remote create --name test-nfv --url http://mirror.aarnet.edu.au/pub/rocky/9.6/NFV/x86_64/os/ --proxy-url http://squid.my.domain:3128 --proxy-username user1 --proxy-pass pass1
pulp rpm repository create --name test-nfv --remote test-nfv
pulp rpm repository sync --name test-nfv

Output of sync:

pulp rpm repository sync --name test-nfv
Started background task /pulp/api/v3/tasks/0197ebbc-b660-7807-aee1-dd788a421e06/
..Error: Task /pulp/api/v3/tasks/0197ebbc-b660-7807-aee1-dd788a421e06/ failed: '407, message='Proxy Authentication Required', url='http://mirror.aarnet.edu.au/pub/rocky/9.6/NFV/x86_64/os/.treeinfo''

TCP Dump headers

GET http://mirror.aarnet.edu.au/pub/rocky/9.6/NFV/x86_64/os/repodata/repomd.xml HTTP/1.1
Host: mirror.aarnet.edu.au
User-Agent: pulpcore/3.82.0 (cpython 3.9.21-final0, Linux x86_64) (aiohttp 3.12.13)
Accept: */*
Accept-Encoding: gzip, deflate
Proxy-Authorization: Basic XXXXXXXXXXXXXXXXXXXXX==


HTTP/1.1 200 OK
Date: Tue, 08 Jul 2025 20:31:44 GMT
Server: Apache
Last-Modified: Fri, 27 Jun 2025 07:02:51 GMT
ETag: "1036-6388844376260"
Accept-Ranges: bytes
Content-Length: 4150
referrer-policy: no-referrer
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cross-origin-embedder-policy: require-corp
cross-origin-resource-policy: same-origin
cross-origin-opener-policy: same-origin
Content-Type: text/xml
x-frame-options: SAMEORIGIN
Age: 126
X-Cache: HIT from squid
X-Cache-Lookup: HIT from squid:3128
Via: 1.1 ka-proxy-1 (squid/4.15)
Connection: keep-alive
....
....
DOCUMENT CONTENT HERE
....
....
GET http://mirror.aarnet.edu.au/pub/rocky/9.6/NFV/x86_64/os/.treeinfo HTTP/1.1
Host: mirror.aarnet.edu.au
User-Agent: pulpcore/3.82.0 (cpython 3.9.21-final0, Linux x86_64) (aiohttp 3.12.13)
Accept: */*
Accept-Encoding: gzip, deflate


HTTP/1.1 407 Proxy Authentication Required
Server: squid/4.15
Mime-Version: 1.0
Date: Tue, 08 Jul 2025 20:33:50 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3783
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: en
Proxy-Authenticate: Basic realm="proxy"
X-Cache: MISS from ka-proxy-1
X-Cache-Lookup: NONE from squid:3128
Via: 1.1 squid (squid/4.15)
Connection: keep-alive

Expected behavior
A remote repository sync is expected to complete

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sync with the shown Pulp RPM command, an authenticated persistent Squid proxy, and the aiohttp request sequence in the report. Trace why Proxy-Authorization is present on the first HTTP request but absent on the reused connection; done means the remote repository sync completes through the authenticated proxy.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.