Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1491305 - [API] User cannot access resources through organization path
Summary: [API] User cannot access resources through organization path
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1373844
TreeView+ depends on / blocked
 
Reported: 2017-09-13 13:23 UTC by Jitendra Yejare
Modified: 2019-08-12 14:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-17 08:54:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jitendra Yejare 2017-09-13 13:23:57 UTC
Description of problem:
User is unable to view/list resources(in my case domains) through path of organization, even though the user has a permission to access resources(domains) in that organization

Version-Release number of selected component (if applicable):
Satellite 6.3 snap 15

How reproducible:
Always

Steps to Reproduce:
1. Create Domain in Org A and Loc A
2. Create Role with Org A and Loc A 
3. Create Domain Filter in above role without override
4. Create User with Org A and Loc A
5. Assign above role to the user
6. Attempt to GET domains above through Organization path
# curl -u $creds -X GET --header "Content-Type:application/json" "https://FQDN/api/organizations/1/domains" --insecure

Actual results:
API returns,
{"message":"Organization not found by id '1'"}

Expected results:
I know that could be the expected behavior as the user don't have permissions to access organizations but then its really difficult to get the domains listed in particular organizations to which user has permission.

Additional info:

Comment 1 Jitendra Yejare 2017-09-13 13:24:40 UTC
This issue is affecting 6.3 feature Canned Role Org Admin.

Comment 3 Marek Hulan 2017-09-13 13:36:44 UTC
Isn't it possible to list all domains with search like organization_id = 1? If user does not have view_organizations permission, he/she should not have access to it.

Comment 4 Jitendra Yejare 2017-09-13 13:43:30 UTC
Thats True mhulan,
It is not possible to list all domains with a search like organization_id = 1, and the user doesn't have view organizations permission.

The question is how do I list domains in particular org ??

Comment 5 Marek Hulan 2017-09-15 14:40:34 UTC
Jitendra, I was able to list domains of a particular org with the search I provided, e.g. like this

> hammer domain list --search "organization_id = 1"

The only permission that the user has is view_domains. Just make sure that the filter is unlimited. If it does not work for you, please provide a reproducer. My current impression is this is not a bug. Users can list resources without needing to see the organization as long as they don't use organization nested routes.

Comment 8 Jitendra Yejare 2017-10-17 08:54:29 UTC
Hey Marek, 

Extremely sorry that I didn't follow the correct command/way to get the domains as per command 5. Actually, I wasn't aware of --search option.

But now I did, and I can list the domains with given command and API path.


I think we are good to close this bug as there is a way to get the domains in particular org and loc.


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