Bug 1914803

Summary: Some of the "filters" permission changed after the upgrade.
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: Content ViewsAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: medium Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, chrobert, jsherril, pcreech, sbible
Target Milestone: 6.11.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: https://projects.theforeman.org/issues/33146
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:28:38 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 Devendra Singh 2021-01-11 09:23:43 UTC
Description of problem: Some of the "filters" permission changed after the upgrade.


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

How reproducible:
always

Steps to Reproduce:
1. Install the 6.8 base version.
2. Check the filter's permission before the upgrade.

{'id': '361', 'resource type': 'katello::syncplan', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'organization admin', 'permissions': 'view_sync_plans, create_sync_plans, edit_sync_plans, destroy_sync_plans'}

{'id': '365', 'resource type': 'katello::gpgkey', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'viewer', 'permissions': 'view_gpg_keys, view_content_credentials'}

4. Upgrade the satellite from 6.8 to 6.9.
5. permission of "katello::syncplan" and "katello::gpgkey" change.

{'id': '361', 'resource type': 'katello::syncplan', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'organization admin', 'permissions': 'view_sync_plans, create_sync_plans, edit_sync_plans, destroy_sync_plans, sync_sync_plans'}

{'id': '365', 'resource type': 'katello::gpgkey', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'viewer', 'permissions': 'view_content_credentials, view_content_credentials'}

Actual results:
permission of "katello::syncplan" and "katello::gpgkey" changed after upgrade.

Expected results:
permission of "katello::syncplan" and "katello::gpgkey" should not change after upgrade.

Additional info:

Comment 1 Justin Sherrill 2021-01-15 00:14:26 UTC
Devendra,

We've been working on fixing some permission issues we've recently found.  The sync plan changes are 100% expected, as previously the ability to 'sync' a sync plan wasn't even governed by a permission, and thus only an admin user could do that.  

For the Gpg key permissions, these have been replaced with content_credentials.  in 6.7 and older, there was a mix of content credentials and gpg key permissions and neither really covered the full apis.  However it looks like we might need to 'delete' the old gpg key permissions, i'll leave this bug open to do that.

Comment 2 Justin Sherrill 2021-02-15 18:11:29 UTC
After digging into this more, its actually working as expected.  "Content Credentials' are called 'GpgKeys' under the hood.  We've renamed just about everything else (Permission names, for example view_content_credentials, controller name, UI), but this internal model name is still around we can work on changing it too, but i think its too risky for 6.9 as its a good bit of refactoring.

Comment 3 Brad Buckingham 2021-02-16 14:45:47 UTC
Based upon comment 2, moving this one to 6.10 as it should have no negative impact on users.

Comment 7 Justin Sherrill 2021-07-23 15:27:09 UTC
Proposing we move to 7.0 due to the risk of backporting this, but going ahead and doing the work now so that it will be ready for 7.0 (and doesn't get kicked down the road again).

Comment 8 Bryan Kearney 2021-07-26 16:06:08 UTC
Upstream bug assigned to chrobert

Comment 9 Bryan Kearney 2021-07-26 16:06:10 UTC
Upstream bug assigned to chrobert

Comment 14 Devendra Singh 2022-04-11 14:23:13 UTC
Verified on 6.11 Snap15.

Before Upgrade the filter's permission


Permissions: "view_sync_plans, create_sync_plans, edit_sync_plans, destroy_sync_plans, sync_sync_plans"

After Upgrade the filter's permission 

Permissions: "view_sync_plans, create_sync_plans, edit_sync_plans, destroy_sync_plans, sync_sync_plans"

Comment 17 errata-xmlrpc 2022-07-05 14:28:38 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.11 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-2022:5498