Bug #16884

Create permissions do not check filter limits

Added by Marek Hulán 12 months ago. Updated about 1 month ago.

Status:Closed
Priority:Normal
Assigned To:Marek Hulán
Category:Authorization
Target version:Team Marek Iteration 18
Difficulty: Bugzilla link:1384035
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4705, https://github.com/theforeman/foreman/pull/4030
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

Description of problem:
The user is able to create resource in taxonomies which were not added/associated to resource filter of role.
Also the search condition is ignored on creation.

Version-Release number of selected component (if applicable):
Foreman 1.5+ (including 1.14-dev) / Satellite 6.3 snap 3.0

How reproducible:
Always

Steps to Reproduce:
1. Create role with Organization A and Location A taxonomies.
2. Create a filter for resource type for which taxonomies can be applied and without overriding it.
e.g Domain Filter
3. Create a new user with different taxonomies than above role. Suppose Organization B and Location B.
4. Assign the role to user.
5. Login with new user.
6. Attempt to create a domain(or any resource type filter added in role) in user taxonomies(which are not the same as filter taxonomies).

Similarly in step 3, search condition can be specified, e.g. name ~ a

Actual results:
1. Create permission is not honoring the resourse filter limits.
2. The resource is created in the user associated taxonomies which are not permitted by resource filter.

Similarly the resource is created if name ~ a condition was specified in filter and name "b" was used.

Expected results:
1.Create permissions should check filter limits.
2. The resource should not be created by user in taxonomies to which filter doesn't gives permission.
3. Some informative message should be displayed for unable to create resource due to no permissions from resource filter end.


Related issues

Related to Foreman - Tracker #4552: New permissions/authorization system issues New 03/05/2014
Related to Katello - Bug #20135: Fix tests after create and edit permissions started to be... Closed 06/28/2017
Related to foreman-tasks - Bug #20136: Ignore create_tasks permission verification Closed 06/28/2017
Related to foreman-tasks - Bug #20333: Similar to create permission, we need to ignore update pe... Closed 07/18/2017
Related to Foreman - Bug #20385: rake db:seed fails for plugins Closed 07/23/2017
Related to Foreman - Bug #20384: Initial db:seed fails Closed 07/21/2017
Related to Foreman Remote Execution - Bug #20391: Tests are failing due to permission changes Closed 07/24/2017
Related to Foreman Remote Execution - Refactor #20455: Replace execute permission with create_template_invocation New 07/31/2017
Related to virt-who configure - Bug #21065: Can't create configuration as a user with just "Manager" ... Ready For Testing 09/21/2017

Associated revisions

Revision 8dcc90be
Added by Marek Hulán 2 months ago

Fixes #16884 - enforce granular filters even during save

Revision 7adb7fa2
Added by Marek Hulán about 1 month ago

Refs #16884 - add minitest stubbing to test helper

History

#1 Updated by Marek Hulán 12 months ago

  • Subject changed from Create permissions do not check filter limits to Create permissions do not check filter limits
  • Target version set to Team Marek backlog

#2 Updated by Marek Hulán 12 months ago

  • Related to Tracker #4552: New permissions/authorization system issues added

#3 Updated by Marek Hulán 11 months ago

  • Target version changed from Team Marek backlog to Team Marek Iteration 5

#4 Updated by Marek Hulán 11 months ago

  • Status changed from New to Assigned
  • Assigned To set to Marek Hulán

#5 Updated by Marek Hulán 11 months ago

  • Target version changed from Team Marek Iteration 5 to Team Marek Iteration 6

#6 Updated by The Foreman Bot 10 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4030 added

#7 Updated by Marek Hulán 10 months ago

  • Target version changed from Team Marek Iteration 6 to Team Marek Iteration 7

#8 Updated by Marek Hulán 9 months ago

  • Target version changed from Team Marek Iteration 7 to Team Marek Iteration 8

#9 Updated by Marek Hulán 9 months ago

  • Target version changed from Team Marek Iteration 8 to Team Marek Iteration 9

#10 Updated by Marek Hulán 8 months ago

  • Target version changed from Team Marek Iteration 9 to Team Marek Iteration 10

#11 Updated by Marek Hulán 7 months ago

  • Target version changed from Team Marek Iteration 10 to Team Marek Iteration 11

#12 Updated by Marek Hulán 6 months ago

  • Target version changed from Team Marek Iteration 11 to Team Marek Iteration 12

#13 Updated by Marek Hulán 6 months ago

  • Target version changed from Team Marek Iteration 12 to Team Marek Iteration 13

#14 Updated by Marek Hulán 5 months ago

  • Target version changed from Team Marek Iteration 13 to Team Marek Iteration 14

#15 Updated by Marek Hulán 4 months ago

  • Target version changed from Team Marek Iteration 14 to Team Marek Iteration 15

#16 Updated by Marek Hulán 4 months ago

  • Target version changed from Team Marek Iteration 15 to Team Marek backlog

#17 Updated by Marek Hulán 3 months ago

  • Related to Bug #20135: Fix tests after create and edit permissions started to be enforced added

#18 Updated by Marek Hulán 3 months ago

  • Related to Bug #20136: Ignore create_tasks permission verification added

#19 Updated by Marek Hulán 2 months ago

  • Related to Bug #20333: Similar to create permission, we need to ignore update permission added

#20 Updated by Marek Hulán 2 months ago

  • Target version changed from Team Marek backlog to Team Marek Iteration 18

#21 Updated by Anonymous 2 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#22 Updated by Marek Hulán 2 months ago

  • Release set to 1.16.0

#23 Updated by Marek Hulán 2 months ago

  • Related to Bug #20385: rake db:seed fails for plugins added

#24 Updated by Marek Hulán 2 months ago

  • Related to Bug #20384: Initial db:seed fails added

#25 Updated by Adam Ruzicka 2 months ago

  • Related to Bug #20391: Tests are failing due to permission changes added

#26 Updated by The Foreman Bot about 1 month ago

  • Pull request https://github.com/theforeman/foreman/pull/4705 added

#27 Updated by Marek Hulán about 1 month ago

  • Related to Refactor #20455: Replace execute permission with create_template_invocation added

#28 Updated by Marek Hulán 3 days ago

  • Related to Bug #21065: Can't create configuration as a user with just "Manager" and "Virt-who Manager" roles added

Also available in: Atom PDF