Bug 872602

Summary: API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
Product: [Retired] Subscription Asset Manager Reporter: Adam Price <adprice>
Component: katelloAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED ERRATA QA Contact: Tazim Kolhar <tkolhar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.2CC: brad, cwelton, jomara, omaciel, tomckay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 866359 Environment:
Last Closed: 2013-02-21 19:18:41 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:
Bug Depends On: 866359    
Bug Blocks: 816564    

Comment 3 Brad P. Crochet 2012-11-15 16:16:45 UTC
Steps to reproduce:
1. Register a system
2. Cert/key in /etc/pki/entitlement
3. curl -v --trace-ascii debug.out -d '' -k -X POST --cert /full/path/to/cert.cert --key /full/path/to/key.key https://samserver/sam/api/consumers/{consumer id}/entitlements

debug.out should show the proper header (Content-type: application/json) when there is an empty return

Comment 4 Tazim Kolhar 2012-11-20 12:58:17 UTC
FAILED QA :

1. Register a system
2. Cert/key in /etc/pki/entitlement
3.# curl -v --trace-ascii debug.out -d '' -k -X POST --cert /etc/pki/entitlement/1631851920083658511.pem --key /etc/pki/entitlement/1631851920083658511-key.pem https://kvm-guest-05.rhts.eng.bos.redhat.com/sam/api/consumers/ff93b357-dddd-4a21-ab80-c55a082fa6b9/entitlements

Warning: --trace-ascii overrides an earlier trace/verbose option
{"errors":["User 8a90c5193b1bee04013b1c6258140031 is not allowed to access api/candlepin_proxies/post"],"displayMessage":"User 8a90c5193b1bee04013b1c6258140031 is not allowed to access api/candlepin_proxies/post"}
4.

Comment 5 Tom McKay 2012-11-20 13:38:53 UTC
That is not the correct test for this BZ. The message you show below is a failure, not an empty result. Please try again for the case where there isn't an error but instead there are no entitlements.

Comment 6 Brad P. Crochet 2012-11-20 15:03:43 UTC
Verified against the same host. It works. Verified.

Comment 8 errata-xmlrpc 2013-02-21 19:18:41 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-0544.html