Bug 872602 - API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Katello Bug Bin
Tazim Kolhar
:
Depends On: 866359
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-11-02 10:21 EDT by Adam Price
Modified: 2016-04-25 20:54 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 866359
Environment:
Last Closed: 2013-02-21 14:18:41 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Comment 3 Brad P. Crochet 2012-11-15 11:16:45 EST
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 07:58:17 EST
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 08:38:53 EST
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 10:03:43 EST
Verified against the same host. It works. Verified.
Comment 8 errata-xmlrpc 2013-02-21 14:18:41 EST
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

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