Bug 872602 - API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
Summary: API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
Alias: None
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
(Show other bugs)
Version: 1.2
Hardware: Unspecified Unspecified
Target Milestone: rc
: ---
Assignee: Katello Bug Bin
QA Contact: Tazim Kolhar
Depends On: 866359
Blocks: sam12-tracker
TreeView+ depends on / blocked
Reported: 2012-11-02 14:21 UTC by Adam Price
Modified: 2016-04-26 00:54 UTC (History)
5 users (show)

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

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0544 normal SHIPPED_LIVE Important: Subscription Asset Manager 1.2 update 2013-02-26 04:08:04 UTC

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

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"}

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.


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