Bug 1015583 - Consumers can't request applicability generation for themselves
Consumers can't request applicability generation for themselves
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: ---
: 2.4.0
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 10:24 EDT by Justin Sherrill
Modified: 2015-03-22 21:12 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-09 02:54:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2013-10-04 10:24:44 EDT
Description of problem:

Currently when generating applicability for a single consumer, authentication is denied if the consumer is the one requesting it.  Using a normal user it works fine.


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

How reproducible:
Always

Steps to Reproduce:
1. Authentication as a consumer request applicability to be generated for that one consumer id

Actual results:
Authentication denied

Expected results:
Success!
Comment 1 Sayli Karmarkar 2014-03-25 01:46:46 EDT
https://github.com/pulp/pulp/pull/866
Comment 2 Jeff Ortel 2014-04-03 09:35:35 EDT
build: 2.4.0-0.7.beta
Comment 4 Preethi Thomas 2014-07-10 14:15:07 EDT
verified
[root@yttrium ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.23.beta.el6.noarch
[root@yttrium ~]# 


>>> headers=dict({'pulp-user':'el5'}.items())
>>> pic.POST('/v2/consumers/el5/actions/content/regenerate_applicability/', 'headers=headers')
Request Body
"headers=headers"
Response Body
{
  "spawned_tasks": [
    {
      "_href": "/pulp/api/v2/tasks/f78aef25-5358-430d-87a9-705bbbf94793/", 
      "task_id": "f78aef25-5358-430d-87a9-705bbbf94793"
    }
  ], 
  "result": null, 
  "error": null
}
(202, {u'spawned_tasks': [{u'_href': u'/pulp/api/v2/tasks/f78aef25-5358-430d-87a9-705bbbf94793/', u'task_id': u'f78aef25-5358-430d-87a9-705bbbf94793'}], u'result': None, u'error': None})
>>> 
>>> 
>>> 
[root@yttrium ~]# pulp-admin tasks details --task-id f78aef25-5358-430d-87a9-705bbbf94793
+----------------------------------------------------------------------+
                              Task Details
+----------------------------------------------------------------------+
 
Operations:       consumer_content_applicability_regeneration
Resources:        
State:            Successful
Start Time:       2014-07-10T17:11:21Z
Finish Time:      2014-07-10T17:11:21Z
Result:           N/A
Task Id:          f78aef25-5358-430d-87a9-705bbbf94793
Progress Report:  
 

>>> pic.POST('/v2/consumers/content/applicability/', body={"criteria":{"filters":{"id":{"$in":["el5"]}},}})
Request Body
{
  "criteria": {
    "filters": {
      "id": {
        "$in": [
          "el5"
        ]
      }
    }
  }
}
Response Body
[]
(200, [])
>>>
Comment 5 Randy Barlow 2014-08-09 02:54:20 EDT
This has been fixed in Pulp 2.4.0-1.

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