Bug 1566275 - Unable to modify a Subnet from a specific Organization Context if one of its Domain is from another Organization
Summary: Unable to modify a Subnet from a specific Organization Context if one of its ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Networking
Version: 6.2.14
Hardware: All
OS: Linux
unspecified
low vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-11 23:49 UTC by Christian Marineau
Modified: 2019-08-12 14:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-03 12:05:38 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Christian Marineau 2018-04-11 23:49:50 UTC
Description of problem:
-----------------------
When a user is in the context of a specific Organization and tries to modify a Subnet which has 1 or more Domain from other Organization(s), nothing will happens in the WebUI when the user clicks on "Submit".


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


How reproducible:
-----------------
100%


Steps to Reproduce:
-------------------
1. Have a Satellite with 2 different Organization:
     Organization-1
     Organization-2

2. Set your current context to "Any Organization" and "Any Location"
   
3. Create domain "org1.domain.com" and assign it to "Organization-1"

4. Create domain "org2.domain.com" and assign it to "Organization-2"

5. Create subnet "SN_multi_orgs" with any network settings and assign the following:
   For Domains, assign both "org1.domain.com" and "org2.domain.com"
   For Organization, assign both "Organization-1" and "Organization-2"

6. Change your current context for "Organization-1" and try to modify any settings for subnet "SN_multi_orgs" ... it will not work.


Actual results:
---------------
When clicking "Submit", nothing happens from the WebUI.

From /var/log/foreman/production.log, the following logs can be observed:
[...]
2018-04-11 23:38:45 7a4f59b2 [app] [I] Started PATCH "/subnets/6-SN_multi_orgs" for 192.168.20.1 at 2018-04-11 23:38:45 +0000
2018-04-11 23:38:45 7a4f59b2 [app] [I] Processing by SubnetsController#update as */*
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"HuRbvwn/e5HnhDKaVuDUdJcDx8wHhf4ltNFjF8m0SP4=", "subnet"=>{"name"=>"SN_multi_orgs", "network"=>"10.10.11.0", "mask"=>"255.255.255.0", "gateway"=>"", "dns_primary"=>"", "dns_secondary"=>"", "ipam"=>"DHCP", "from"=>"", "to"=>"", "vlanid"=>"", "boot_mode"=>"DHCP", "domain_ids"=>["7", ""], "dhcp_id"=>"", "tftp_id"=>"", "dns_id"=>"", "discovery_id"=>"", "remote_execution_proxy_ids"=>[""], "location_ids"=>[""], "organization_ids"=>["", "12", "13"]}, "redirect"=>"", "id"=>"6-SN_multi_orgs"}
2018-04-11 23:38:45 7a4f59b2 [app] [I] Failed to save: Subnet domains is invalid
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Rendered subnets/_fields.html.erb (4.5ms)
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Rendered common/_edit_habtm.html.erb (5.7ms)
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb (18.3ms)
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Rendered subnets/_form.html.erb (61.0ms)
2018-04-11 23:38:45 7a4f59b2 [app] [I]   Rendered subnets/edit.html.erb (61.4ms)
2018-04-11 23:38:45 7a4f59b2 [app] [I] Completed 200 OK in 140ms (Views: 53.4ms | ActiveRecord: 26.6ms)
[...]

We can see one of the domain id is empty:
  "domain_ids"=>["7", ""]

And the following log is showing:
  [I] Failed to save: Subnet domains is invalid 


Expected results:
-----------------
1. Can we confirm it is intentional behavior to do not allow the modification of a Subnet in such a context. 

2. If this behavior is intentional for permission/security purpose, we should have a Warning in the WebUI with enough information to explain the user what is happening.

Additional info:
----------------

Comment 2 Ondřej Pražák 2018-09-11 13:02:13 UTC
This behaviour is no longer reproducible on 6.4, could QE verify?

Comment 3 Jameer Pathan 2018-11-15 13:03:46 UTC
still able to reproduce this bug on @satellite 6.5.0 snap 3

Steps:
-------------------
1. Have a Satellite with 2 different Organization:
     Organization-1
     Organization-2

2. Set your current context to "Any Organization" and "Any Location"
   
3. Create domain "org1.domain.com" and assign it to "Organization-1"

4. Create domain "org2.domain.com" and assign it to "Organization-2"

5. Create subnet "SN_multi_orgs" with any network settings and assign the following:
   For Domains, assign both "org1.domain.com" and "org2.domain.com"
   For Organization, assign both "Organization-1" and "Organization-2"

6. Change your current context for "Organization-1" and try to modify any settings for subnet "SN_multi_orgs" ... it will not work.
----------

observation:
-When clicking "Submit", nothing happens from the WebUI.

-
2018-11-15T07:44:31 [I|app|a47f6]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"32v+UgbjTQCopczWPNd3xDIq08NB7XMObfXV6c0aoBKPLEI7AydC+YmqWiNASiP/Z8ntpxNwDQOs+5ofc6YSig==", "subnet"=>{"name"=>"SN_multi_orgs", "description"=>"", "network"=>"192.168.140.0", "cidr"=>"24", "mask"=>"255.255.255.0", "gateway"=>"", "dns_primary"=>"", "dns_secondary"=>"", "ipam"=>"None", "from"=>"", "to"=>"", "vlanid"=>"0", "mtu"=>"1502", "boot_mode"=>"DHCP", "domain_ids"=>["", "5"], "dhcp_id"=>"", "tftp_id"=>"", "dns_id"=>"", "template_id"=>"", "discovery_id"=>"", "remote_execution_proxy_ids"=>[""], "location_ids"=>[""], "organization_ids"=>["", "24", "25"]}, "redirect"=>"", "commit"=>"Submit", "id"=>"3-SN_multi_orgs"}
2018-11-15T07:44:31 [I|app|a47f6] Current user set to admin (admin)
2018-11-15T07:44:31 [E|app|a47f6] Failed to save: Subnet domains is invalid
2018-11-15T07:44:31 [I|app|a47f6]   Rendering subnets/edit.html.erb within layouts/application
2018-11-15T07:44:32 [I|app|a47f6]   Rendered subnets/_fields.html.erb (26.4ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered common_parameters/_parameter.html.erb (4.3ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered common_parameters/_parameters.html.erb (13.8ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered taxonomies/_loc_org_tabs.html.erb (62.9ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered subnets/_form.html.erb (222.4ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered subnets/edit.html.erb within layouts/application (224.7ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendered layouts/_application_content.html.erb (1.9ms)
2018-11-15T07:44:32 [I|app|a47f6]   Rendering layouts/base.html.erb
2018-11-15T07:44:32 [I|app|a47f6]   Rendered layouts/base.html.erb (65.2ms)
2018-11-15T07:44:32 [I|app|a47f6] Completed 200 OK in 467ms (Views: 268.7ms | ActiveRecord: 54.5ms)

Comment 6 Bryan Kearney 2019-05-02 19:06:52 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 7 Bryan Kearney 2019-06-03 12:05:38 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.


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