SYMC: [RBAC] Net-list returning network it shouldn't
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenContrail |
New
|
Undecided
|
Unassigned |
Bug Description
This is single node contrail setup with 2.21.1-15. In the example below, the owner of the "devnet" network is the service tenant, while the owner of the "demonet1" network is the demo tenant. The devnet network is also marked as "shared", but not sure if it is relevant. When I run the net-list command with the --tenant-id option, it works as expected in the admin context. However, in the Member context for the demo tenant and demo user, it is always returning the network from the tenant that the user is scoped to. This is an incorrect behavior, since the --tenant-id option should return only the network that is owned by the tenant that is passed as an argument. If the user is not supposed to read the tenant's objects by the RBAC logic, then it should return an empty list.
The behavior is correct and expected when the demo user is made an "admin" in the demo tenant. Please note, that by default the demo user has Member, netadmin and sysadmin roles in the demo tenant.
rudrajit_
rudrajit_
+------
| ID | Name |
+------
| 02802a1544384ac
| 5dbb22338f9c463
| 919b90e909f1439
| df1983beb83c41f
+------
rudrajit_
+------
| id | name | subnets |
+------
| b7e60a13-
| 7e3f88de-
| 0bad6921-
| 76765a07-
| ef138496-
| 18fad0f4-
+------
rudrajit_
+------
| id | name | subnets |
+------
| ef138496-
+------
rudrajit_
+------
| id | name | subnets |
+------
| 18fad0f4-
+------
rudrajit_
rudrajit_
rudrajit_
+------
| id | name | subnets |
+------
| 18fad0f4-
+------
rudrajit_
+------
| id | name | subnets |
+------
| 18fad0f4-
+------
could you repeat the commands above with neutron --debug net-list with debug=True, verbose=True in /etc/neutron/ neutron. conf and include output of /var/log/ neutron/ server. log for the specific get_network() API. The log will print API requested and its corresponding response.
Also does removing 'shared' on demonet1 make no network appear for demo user in demo project?