Project admin gets treated as Global Admin with Secure RBAC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
New
|
Critical
|
Unassigned | ||
Wallaby |
New
|
Undecided
|
Unassigned | ||
Xena |
New
|
Undecided
|
Unassigned | ||
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
User that has been assigned admin role within their project gets treated as de-fact admin in Glance even when project scoped "Secure RBAC" feature is enabled.
Secure RBAC personas were introduced in Wallaby cycle creating project scope. If user is granted admin rights within the project scope based on the Secure RBAC roles model the user gets treated as admin in Glance.
stack@ubnt-
+------
| Field | Value |
+------
| description | |
| domain_id | default |
| enabled | True |
| id | ed7b2d168e44412
| is_domain | False |
| name | privilege-test |
| options | {} |
| parent_id | default |
| tags | [] |
+------
NOTE THE PROJECT ID.
stack@ubnt-
+------
| Field | Value |
+------
| default_project_id | ed7b2d168e44412
| domain_id | default |
| email | <email address hidden> |
| enabled | True |
| id | eb0d6ce9c6bc42e
| name | privtest |
| options | {'ignore_
| password_expires_at | None |
+------
stack@ubnt-
stack@ubnt-
+------
| Role | User | Group | Project | Domain | System | Inherited |
+------
| admin | | admins@Default | admin@Default | | | False |
| anotherrole | alt_demo@Default | | alt_demo@Default | | | False |
| member | alt_demo@Default | | alt_demo@Default | | | False |
| anotherrole | | nonadmins@Default | alt_demo@Default | | | False |
| member | | nonadmins@Default | alt_demo@Default | | | False |
| anotherrole | | nonadmins@Default | demo@Default | | | False |
| member | | nonadmins@Default | demo@Default | | | False |
| admin | nova@Default | | service@Default | | | False |
| service | nova@Default | | service@Default | | | False |
| admin | placement@Default | | service@Default | | | False |
| service | placement@Default | | service@Default | | | False |
| service | glance@Default | | service@Default | | | False |
| member | demo@Default | | invisible_
| anotherrole | demo@Default | | demo@Default | | | False |
| member | demo@Default | | demo@Default | | | False |
| service | cinder@Default | | service@Default | | | False |
| admin | privtest@Default | | privilege-
| service | neutron@Default | | service@Default | | | False |
| admin | admin@Default | | admin@Default | | | False |
| admin | admin@Default | | alt_demo@Default | | | False |
| admin | admin@Default | | demo@Default | | | False |
| admin | admin@Default | | | Default | | False |
| admin | admin@Default | | | | all | False |
+------
NOTE: that the 'privtest@Default' user has no other roles than admin in 'privilege-
stack@ubnt-
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
stack@ubnt-
OS_REGION_
OS_PROJECT_
OS_CACERT=
OS_AUTH_URL=http://
OS_TENANT_
OS_USER_
OS_USERNAME=
OS_VOLUME_
OS_AUTH_
OS_PROJECT_
OS_PASSWORD=<SNIP>
OS_IDENTITY_
NOTE: Using the privtest:
stack@ubnt-
+------
| Property | Value |
+------
| checksum | b874c39491a2377
| container_format | bare |
| created_at | 2021-06-
| disk_format | qcow2 |
| hw_rng_model | virtio |
| id | ca2eea09-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-
| os_hash_algo | sha512 |
| os_hash_value | 6b813aa46bb90b4
| | 5e5f53dc4492341
| os_hidden | False |
| owner | 03ba31a4978e465
| owner_specified
| owner_specified
| owner_specified
| protected | True |
| size | 16300544 |
| status | active |
| tags | [] |
| updated_at | 2021-06-
| virtual_size | 117440512 |
| visibility | public |
+------
stack@ubnt-
+------
| Property | Value |
+------
| checksum | b874c39491a2377
| container_format | bare |
| created_at | 2021-06-
| disk_format | qcow2 |
| hw_rng_model | virtio |
| id | ca2eea09-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-
| os_hash_algo | sha512 |
| os_hash_value | 6b813aa46bb90b4
| | 5e5f53dc4492341
| os_hidden | False |
| owner | 03ba31a4978e465
| owner_specified
| owner_specified
| owner_specified
| protected | False |
| size | 16300544 |
| status | active |
| tags | [] |
| updated_at | 2021-06-
| virtual_size | 117440512 |
| visibility | public |
+------
The owner of the image is _NOT_ privilege-test project as one can compare the project id with the owner field.
Any deployment utilizing Secure RBAC and assigning admin-role within any of the 3 scopes (Project, Domain or System) grants full admin privileges in Glance for that user.
This behaviour is not just limited to Secure RBAC but carried over to it and more likely used.
Since this report concerns a possible security risk, an incomplete
security advisory task has been added while the core security
reviewers for the affected project or projects confirm the bug and
discuss the scope of any vulnerability along with potential
solutions.