Bug 758813 - Error message for unauthorized access to API when in Katello OAuth mode is misleading
Summary: Error message for unauthorized access to API when in Katello OAuth mode is mi...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installer
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 894390
TreeView+ depends on / blocked
 
Reported: 2011-11-30 18:37 UTC by Mike McCune
Modified: 2019-09-26 13:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 894390 (view as bug list)
Environment:
Last Closed: 2013-09-19 18:09:38 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch taken from the pull request. (2.11 KB, patch)
2012-12-13 21:39 UTC, Bryan Kearney
no flags Details | Diff

Description Mike McCune 2011-11-30 18:37:02 UTC
If you have Candlepin setup to use OAuth for Katello:

module.config.katello=org.fedoraproject.candlepin.katello.KatelloModule
candlepin.auth.oauth.enabled = true

and try to access the webservice API with something like curl you get a misleading error message:

$ curl -k -u admin:admin https://somebox.example.com:8443/candlepin/status

{"displayMessage":"Error contacting user service"}

ideally this would say something like:

{"displayMessage":"Candlepin is configured for OAuth access only, username and password not allowed."}

Comment 1 Bryan Kearney 2012-12-13 21:37:13 UTC
This is due to basic auth being enabled in the katello install. Full information can be seen at:

https://github.com/Katello/katello/pull/1256

I am moving this to the installer component of System Engine.

Comment 2 Bryan Kearney 2012-12-13 21:39:02 UTC
Created attachment 663207 [details]
Patch taken from the pull request.

Comment 3 Lukas Zapletal 2012-12-18 16:01:30 UTC
Ok I will test this for you :-)

Comment 4 Lukas Zapletal 2012-12-19 11:31:27 UTC
Merged the https://github.com/Katello/katello/pull/1256

Comment 5 Bryan Kearney 2013-01-25 18:57:54 UTC
commit ba2d5131de181dcffc833aeb80ea3fde55754a55
Author: Bryan Kearney <bkearney>
Date:   Thu Dec 13 16:30:19 2012 -0500

    758813: Disable basic and trusted auth in the candlepin engine since it is not required.
    
    This manifested as an an error seen by curl which when using basic auth there was an error
    contacting the user service. Basic auth should never be used. With these settings, the output
    is
    
    [root@samdev ~]# curl -k -u admin:admin https://localhost:8443/candlepin/owners
    {"displayMessage":"Invalid credentials."}
    
    Note, this will make development harder since people may use curl to access candlepin.
    Developers can set these to true and then restart candlepin

Comment 6 Mike McCune 2013-09-19 18:09:38 UTC
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM.  If this is a mistake feel free to re-open.


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