Bug 1830247

Summary: Ansible variables not visible to user role containing the filter view_ansible_variables
Product: Red Hat Satellite Reporter: mithun kalyat <mkalyat>
Component: Ansible - Configuration ManagementAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Danny Synk <dsynk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: dmatoule, dsynk, egolov, mhulan, rhbgs.10.bigi_gigi
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_ansible-6.3.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:12 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:

Description mithun kalyat 2020-05-01 09:51:30 UTC
Description of problem:

Ansible variables not visible to user containing the filter "Ansible variable": view_ansible_variables

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

Red Hat Satellite 6

How to reproduce :

The variables present in Satellite.

Users view if no filter is set (permission denied).

The filter which will be applied: view_ansible_variables.

Users view if permission is granted: empty list.


Steps to Reproduce:

1. Create user and role from Satellite webui :

  Administer --> Users

  Administer --> Roles 

Assign the role to the user.

2. Create filter for the role :

  Resource Type ---> Ansible variable ---> Choose view_ansible_variables ---> Save filter and role

3. Login as new user, access Configure ---> Variables list is empty. As admin user, able to see the list.

Actual results:

Unable to view the roles with given filter.

Expected results:

Should be able to view the roles with given filter.

Additional info:

1) I tried the same for roles with view_ansible_roles filter which works fine.

2) Even tried the following filters for variable, still list it empty for the new user.

 create_ansible_variables, edit_ansible_variables, import_ansible_variables

Comment 3 Dominik Matoulek 2020-06-10 11:26:07 UTC
Created redmine issue https://projects.theforeman.org/issues/30090 from this bug

Comment 4 Bryan Kearney 2021-03-26 12:03:39 UTC
Upstream bug assigned to mhulan

Comment 5 Bryan Kearney 2021-03-26 12:03:42 UTC
Upstream bug assigned to mhulan

Comment 6 Bryan Kearney 2021-04-28 04:03:17 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30090 has been resolved.

Comment 7 Danny Synk 2021-06-21 16:26:32 UTC
Steps to test:

1. As the admin user, import the redhatofficial.rhel7_stig role, which includes 246 variables.
2. Create a role with only the "view_ansible_variables" permission filter.
3. Create a user and add only the role created in step 2.
4. Log in to the Satellite webUI as the user created in step 3.
5. Navigate in the webUI to Configure > Variables page.

Expected Results:

246 Ansible variables are visible to the user.

Actual Results:

246 Ansible variables are visible to the user.

Verified on Satellite 6.10, snap 5 (tfm-rubygem-foreman_ansible-6.3.0-1.el7sat.noarch).

Comment 10 errata-xmlrpc 2021-11-16 14:09:12 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 (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702