Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1395659 - Firstboot : Exception occurs while trying to register via auth proxy with invalid credentials
Firstboot : Exception occurs while trying to register via auth proxy with inv...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.9
Unspecified Unspecified
urgent Severity low
: rc
: ---
Assigned To: Chris Snyder
John Sefler
: Regression, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-16 06:18 EST by Shwetha Kallesh
Modified: 2017-03-21 06:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-21 06:57:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Exception with invalid proxy on firstboot (227.08 KB, image/png)
2016-11-16 06:18 EST, Shwetha Kallesh
no flags Details
Error dialogue (245.03 KB, image/png)
2016-11-28 03:00 EST, Shwetha Kallesh
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Github candlepin/subscription-manager/pull/1523 None None None 2016-11-21 17:03 EST
Red Hat Product Errata RHSA-2017:0698 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2017-03-21 08:39:12 EDT

  None (edit)
Description Shwetha Kallesh 2016-11-16 06:18:04 EST
Created attachment 1221108 [details]
Exception with invalid proxy on firstboot

Description of problem:
An exception occured while trying to register the system using invalid proxy

Version-Release number of selected component (if applicable):
[root@dhcp35-179 ~]# rpm -qa | grep firstboot
subscription-manager-firstboot-1.18.4-1.el6.x86_64
firstboot-1.110.15-4.el6.x86_64

How reproducible:


Steps to Reproduce:
1.launch firstboot
2.Accept license agreement --> in Setup Software update screen , select , yes I would like to register and click on forward button -----> In choose service page click on "Proxy setup" button
3.Select "I would like to connect via an http proxy" option , enter invalid server details

4. Click on close button ---> click on forward button 

5. Enter the server details and click on forward button 


Actual results:

Exception is thrown to user

Expected results:
Error dialogue saying " Server is not reachable"

Additional info:
Comment 1 Shwetha Kallesh 2016-11-16 06:25:45 EST
Steps to reproduce are not exactly the same as above, my bad I missed a step ,below are the exact steps

1. launch firstboot
2. Accept license agreement --> in Setup Software update screen , select , yes I would like to register and click on forward button -----> In choose service page click on "Proxy setup" button
3.Select "I would like to connect via an http proxy" option , enter valid authorized proxy server details 

4. Select "use authentication with http proxy" and provide invalid credentials 

5. Click on close button ---> click on forward button 

6. Enter the server details and click on forward button 

Actual results:

Exception is thrown to user

Expected results:
Error dialogue saying " Server is not reachable at <server details>"
Comment 5 Chris Snyder 2016-11-21 13:46:38 EST
Relevant traceback from a reproduction:

firstboot 1.110.15 exception report
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/subscription_manager/gui/registergui.py", line 542, in _on_proceed
    self.apply_current_screen()
  File "/usr/lib/python2.6/site-packages/subscription_manager/gui/registergui.py", line 536, in apply_current_screen
    self.current_screen.apply()
  File "/usr/lib/python2.6/site-packages/subscription_manager/gui/registergui.py", line 1867, in apply
    if not is_valid_server_info(conn):
  File "/usr/lib/python2.6/site-packages/subscription_manager/utils.py", line 142, in is_valid_server_info
    conn.ping()
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 904, in ping
    return self.conn.request_get("/status/")
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 708, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 597, in _request
    raise ProxyException(e)
ProxyException: Proxy connection failed: 407

Local variables in innermost frame:
body: None
info: None
e: Proxy connection failed: 407
self: <rhsm.connection.Restlib object at 0x250c050>
headers: {'Content-Length': '0', 'Accept-Language': 'en-us', 'x-subscription-manager-version': '1.18.4-1.el6', 'x-python-rhsm-version': '1.18.4-1.el6', 'Accept': 'application/json', 'User-Agent': 'RHSM/1.0 (cmd=firstboot)', 'Content-type': 'application/json'}
request_type: GET
handler: https://subscription.rhsm.redhat.com:443/subscription/status/
context: <M2Crypto.SSL.Context.Context instance at 0x251df38>
method: /status/
conn: <rhsm.connection.RhsmProxyHTTPSConnection instance at 0x251de18>
Comment 6 Chris Snyder 2016-11-21 17:03:26 EST
PR for a fix upstream is now attached. It seems that we were not handling the case where there is a valid connection to the proxy but invalid credentials are provided.

The PR fixes this issue. Note: The issue was fixed in a version of subman including a new progress dialog used to show a spinner to the user while validating server connection info (including proxy connection info).

The expected behaviour (if the PR is accepted) in the case above, should be for an error dialog to pop up on top of the new validate server info page containing the following message: "Proxy authentication failed, please check your settings.".
Comment 8 Shwetha Kallesh 2016-11-28 03:00 EST
Created attachment 1225164 [details]
Error dialogue

Do not see any exception but an error dialog is shown, so moving bug to verified 

[root@dhcp35-179 ~]# rpm -qa | grep firstboot
subscription-manager-firstboot-1.18.5-1.el6.x86_64
firstboot-1.110.15-4.el6.x86_64
Comment 10 errata-xmlrpc 2017-03-21 06:57:14 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0698.html

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