Bug 1566517

Summary: Error while refreshing manifest " Error refreshing manifest. bad component(expected userinfo component or user component): DOMAIN\user " when AD integrated proxy server is used.
Product: Red Hat Satellite Reporter: Ashish Humbe <ahumbe>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.13CC: ajoseph, ben.formosa, saydas
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-03 12:53:11 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 Ashish Humbe 2018-04-12 12:57:27 UTC
Description of problem:

On a satellite server (6.2 and 6.3) which has a proxy server configured that is integrated with windows AD server, while refreshing the manifest it fails with below error: 

Error refreshing manifest. bad component(expected userinfo component or user component): DOMAIN\user

Version-Release number of selected component (if applicable):
Satellite v 6.2 and 6.3

How reproducible:
Always when using an authenticated proxy server with AD user

Steps to Reproduce:
1. Take/setup a squid proxy server which is integrated with AD.
2. Configure the proxy details on the satellite server

# satellite-installer --scenario satellite --katello-proxy-url=http://11.22.33.44 --katello-proxy-port=3128 --katello-proxy-username='DOMAIN\user' --katello-proxy-password='secret'

3. Try to refresh the manifest on the satellite server

Actual results:

Manifest Refresh fails with "Error refreshing manifest. bad component(expected userinfo component or user component): DOMAIN\user" error.

Expected results:

Manifest refresh should work successfully 

Additional info:

Comment 3 Ben Formosa 2018-07-27 00:55:39 UTC
I've had this same issue with Satellite 6.3.2

The backslash in the username causes Pulp's JSON parser to fail.

# journalctl -xe --unit=pulp_resource_manager.service
pulp.server.initialization:ERROR: One or more plugins failed to initialize. If a new type has been added, run pulp-manage-db to load the type into the dat
celery.worker:ERROR: (42273-47840) Unrecoverable error: ValueError('Invalid \\escape: line 6 column 34 (char 119)',)

Satellite should support usernames and passwords with special characters.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1502752
https://access.redhat.com/solutions/2147711

The installer could url-encode them before writing to configuration files.

Additionally, anything that reads the proxy configuration should support url-encoded usernames and passwords.

There's an issue open on rest-client addressing this: https://github.com/rest-client/rest-client/issues/661

I can't find an issue in Pulp, but I believe it will have the same issue.
The JSON configuration file is read here:
https://github.com/pulp/pulp_ostree/blob/2-master/plugins/pulp_ostree/plugins/importers/web.py#L18

The username and password is handed to the requests module here:
https://github.com/pulp/pulp_ostree/blob/2-master/plugins/pulp_ostree/plugins/importers/steps.py#L469

Requests configuration:
https://github.com/requests/requests/blob/master/requests/auth.py#L60

Comment 4 Bryan Kearney 2019-11-04 14:33:50 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 5 Bryan Kearney 2019-12-03 12:53:11 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.