Bug 729780 - Candlepin returns 403 instead of 404 for superadmin
Candlepin returns 403 instead of 404 for superadmin
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
Unspecified Solaris
unspecified Severity medium
: ---
: ---
Assigned To: Bryan Kearney
John Sefler
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-08-10 15:32 EDT by Andrew Edwards
Modified: 2016-04-18 02:00 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-30 09:16:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
trace from the 403 error (7.96 KB, text/plain)
2011-08-10 15:39 EDT, Andrew Edwards
no flags Details

  None (edit)
Description Andrew Edwards 2011-08-10 15:32:51 EDT
Description of problem:
Candlepin will return a 403 "insufficient permissions" error instead of a 404 for the super admin user if the resource it is looking for doesn't exist.

Version-Release number of selected component (if applicable):
0.4.10

How reproducible:
100%

Steps to Reproduce:
1. issue a request to candlepin for a owner that doesn't exist http://<url_to_candlepin>/candlepin/owners/bogusowner
  
Actual results:
403 "insufficient permissions"

Expected results:
404 "not found"

Additional info:
Comment 1 Andrew Edwards 2011-08-10 15:39:44 EDT
Created attachment 517680 [details]
trace from the 403 error
Comment 2 Bryan Kearney 2011-08-17 09:34:43 EDT
Fixed in 30caf1ecfb3c73d721ccc0fe3346ec4ce25d2ee6 in master candlepin.
Comment 3 J.C. Molet 2011-08-18 14:08:43 EDT
Looks like the correct error message shows now:

[jmolet@jmolet ~]$ curl -k -u admin:admin GET https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/owners/bogusowner | json_reformat

curl: (6) Could not resolve host: GET; Cannot allocate memory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    64  100    64    0     0    201      0 --:--:-- --:--:-- --:--:--   260

{
    "displayMessage": "Owner with id bogusowner could not be found"
}




candlepin: "version": "0.4.10"

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