Bug 1022662 - Pulp http proxy with authentication seems broken
Summary: Pulp http proxy with authentication seems broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 2.2.1
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 1021662
Blocks: 950743 1021669
TreeView+ depends on / blocked
 
Reported: 2013-10-23 18:12 UTC by Sayli Karmarkar
Modified: 2015-03-23 01:12 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 1021662
Environment:
Last Closed: 2013-12-09 14:36:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Sayli Karmarkar 2013-10-23 18:12:18 UTC
+++ This bug was initially created as a clone of Bug #1021662 +++

Description of problem:

Attempting to configure pulp using the global auth file for yum content:

/etc/pulp/server/plugins.conf.d/yum_importer.json

With either:

{
    "num_threads" : 4,
    "proxy_host" : "http://1.2.3.4",
    "proxy_username": "admin",
    "proxy_password": "redhat",
    "proxy_port" : 8888
}

or


{
    "num_threads" : 4,
    "proxy_host" : "http://admin:redhat@1.2.3.4",
    "proxy_port" : 8888
}


or


{
    "num_threads" : 4,
    "proxy_host" : "http://admin:redhat@1.2.3.4:8888",
    "proxy_port" : 8888
}


Does not seem to work. In most cases I get:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py"
, line 109, in run
    metadata_files = self.get_metadata()
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py"
, line 194, in get_metadata
    raise FailedException(str(e))
FailedException: Proxy Authentication Required


According to my squid log, pulp isn't sending the auth user name

1382375504.460      0 1.2.3.4 TCP_DENIED/407 3969 GET http://lzap.fedorapeople.org/fakerepos/zoo5/repodata/repomd.xml - NONE/- text/html


whereas with curl (passing an incorrect password), i see:


1382375255.594      0 1.2.3.4 TCP_DENIED/407 4105 GET http://lzap.fedorapeople.org/fakerepos/zoo5/repodata/repomd.xml admin NONE/- text/html


Note 'admin' (the user) is missing when pulp tries to access it.

Note that it works fine using curl with the correct password.  

curl -X GET http://google.com/  --proxy http://admin:redhat@1.2.3.4:8888

It very well could be my proxy configuration, however I would expect it to work with basic or digest auth. 



If it 'works', it would be great to get some instructions for setting up a proxy requiring authentication that works with pulp.

--- Additional comment from Sayli Karmarkar on 2013-10-23 14:10:37 EDT ---

This was a bug in python-requests when using the documented way to specify proxy authentication. They are working on fixing the issue, but meanwhile, we found an alternate way of handling this and implemented it.  https://github.com/pulp/nectar/pull/12/

Comment 1 Preethi Thomas 2013-10-24 12:36:06 UTC
Since 2.2 has not built yet, moving it back to modified

Comment 3 Jeff Ortel 2013-11-01 18:50:24 UTC
build: 2.2.1-0.1.beta

Comment 4 Preethi Thomas 2013-11-12 15:25:01 UTC
verified
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.2.1-0.2.beta.el6.noarch
[root@pulp-v2-server ~]# 

[root@pulp-v2-server ~]# cat /etc/pulp/server/plugins.conf.d/yum_importer.json{
    "num_threads" : 4,
    "proxy_host" : "http://pulp-proxy.usersys.redhat.com",
    "proxy_username": "admin",
    "proxy_password": "admin",
    "proxy_port" : 8888
}
[root@pulp-v2-server ~]#

Comment 5 Preethi Thomas 2013-12-09 14:36:54 UTC
Released pulp 2.2.1


Note You need to log in before you can comment on or make changes to this bug.