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 2000063 - Some of the filters permission needs to be clean
Summary: Some of the filters permission needs to be clean
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.10.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.10.0
Assignee: Partha Aji
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-01 09:53 UTC by Devendra Singh
Modified: 2021-11-16 14:13 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-4.1.1.35-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:13:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33527 0 Normal New Import/Export Permission Upgrade task not getting run 2021-09-20 20:33:40 UTC
Foreman Issue Tracker 33678 0 Normal Ready For Testing Import/Export Permission Upgrade task not deleting duplicate entries 2021-10-11 19:04:05 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:13:50 UTC

Description Devendra Singh 2021-09-01 09:53:00 UTC
Description of problem: Some of the filters permission needs to be clean


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

How reproducible:
always

Steps to Reproduce:
1. Prepare the satellite's base version using upgrade template
2. Collect the filter's cli data before the upgrade.

{'id': '219', 'resource type': 'organization', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'manager', 'permissions': 'view_organizations, create_organizations, edit_organizations, destroy_organizations, assign_organizations, import_library_content, export_library_content'}

3. Run the upgrade
4. Collect the filter's cli data after the upgrade.
{'id': '219', 'resource type': 'organization', 'search': 'none', 'unlimited?': 'true', 'override?': 'false', 'role': 'manager', 'permissions': 'view_organizations, create_organizations, edit_organizations, destroy_organizations, assign_organizations, import_library_content, export_library_content, import_content, export_content'}

5. Some of the permission changed after the upgrade, a few of them are expected like export_content, import_content but the rest will need to remove.


Actual results:
Some of the permission changed after the upgrade

Expected results:
Need to remove non-required permission from the list.

Additional info:

Comment 1 Brad Buckingham 2021-09-02 14:22:31 UTC
Triaging to 6.10 to get confirmation that the permissions observed after upgrade are correct and expected.

Comment 2 Partha Aji 2021-09-20 20:33:39 UTC
Connecting redmine issue https://projects.theforeman.org/issues/33527 from this bug

Comment 3 Partha Aji 2021-09-20 20:36:03 UTC
Sounds like a fixable legit issue. See https://projects.theforeman.org/issues/33527 for more information

Meanwhile Devendra can ya try running this command after upgrade and confirm those perms get removed :) 
`foreman-rake katello:upgrades:4.1:update_content_import_export_perms`

Comment 4 Brad Buckingham 2021-09-24 12:44:29 UTC
Moving to POST as upstream PR is merged.

Comment 6 Devendra Singh 2021-09-29 09:21:25 UTC
(In reply to Partha Aji from comment #3)
> Sounds like a fixable legit issue. See
> https://projects.theforeman.org/issues/33527 for more information
> 
> Meanwhile Devendra can ya try running this command after upgrade and confirm
> those perms get removed :) 
> `foreman-rake katello:upgrades:4.1:update_content_import_export_perms`


Before "foreman-rake katello:upgrades:4.1:update_content_import_export_perms" ran:

# hammer filter info --id 219
Id:            219
Resource type: Organization
Search:        none
Unlimited?:    yes
Override?:     no
Role:          Manager
Permissions:   view_organizations, create_organizations, edit_organizations, destroy_organizations, assign_organizations, import_library_content, export_library_content, import_content, export_content
Created at:    2018/03/21 11:10:20
Updated at:    2018/03/21 11:10:20

After `foreman-rake katello:upgrades:4.1:update_content_import_export_perms` ran:

# foreman-rake katello:upgrades:4.1:update_content_import_export_perms
'ErbParser' is ignored.
'RubyParser' is ignored.

hammer filter info --id 219
Id:            219
Resource type: Organization
Search:        none
Unlimited?:    yes
Override?:     no
Role:          Manager
Permissions:   view_organizations, create_organizations, edit_organizations, destroy_organizations, assign_organizations, import_content, import_content, export_content, export_content
Created at:    2018/03/21 11:10:20
Updated at:    2018/03/21 11:10:20

It seems the command ` foreman-rake katello:upgrades:4.1:update_content_import_export_perms` creates some duplicate permissions.

Comment 11 Partha Aji 2021-10-11 19:04:04 UTC
Connecting redmine issue https://projects.theforeman.org/issues/33678 from this bug

Comment 13 Brad Buckingham 2021-10-13 19:25:40 UTC
Moving to POST as PR associated with redmine 33678 is now merged.

Comment 15 Devendra Singh 2021-10-19 16:49:41 UTC
Verified on 6.10 snap23

- Upgraded the satellite from 6.9.z to 6.10 snap23.
- Checked the filter permission, didn't see the duplicate entry and non-required permissions.

 hammer filter info --id 219
Id:            219
Resource type: Organization
Search:        none
Unlimited?:    yes
Override?:     no
Role:          Manager
Permissions:   view_organizations, create_organizations, edit_organizations, destroy_organizations, assign_organizations, import_content, export_content
Created at:    2018/03/21 11:10:20
Updated at:    2018/03/21 11:10:20

Comment 18 errata-xmlrpc 2021-11-16 14:13:42 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


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