-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable cloud_tenant based RBAC for additional models #14036
Conversation
d3c2605
to
bd1e24b
Compare
8359a2a
to
e471dbb
Compare
41e394d
to
2385dda
Compare
This pull request is not mergeable. Please rebase and repush. |
Adds CloudTenancyMixin to CloudNetwork CloudObjectStoreContainer CloudObjectStoreObject CloudSubnet CloudTenant CloudVolumeSnapshot Flavor FloatingIp LoadBalancer NetworkPort NetworkRouter SecurityGroup Modified OpenStack CloudManager to also update the network provider's tenant_mapping_enabled value.
@rwsu Can you add specs for CloudTenant and Flavor, please ? |
CloudTenant and Flavor have specialized tenant_joins_clauses that warrant additional tests.
Checked commits rwsu/manageiq@3bf5b01~...a3f8cba with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@lpichler, specs added for CloudTenant and Flavor. |
@gtanzillo, can you review? I think @lpichler might be ooto. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Fixes RBAC for select cloud_tenant based models when tenant_mapping_enabled is turned on. Previously, anyone can see any tenant's objects. The fix adds CloudTenancyMixin to a model which in turn causes the correct AR joins and where clauses to be generated during tenant scoping in Filterer.search.
This patch adds CloudTenancyMixin to
CloudNetwork
CloudObjectStoreContainer
CloudObjectStoreObject
CloudSubnet
CloudTenant
CloudVolumeSnapshot
Flavor
FloatingIp
LoadBalancer
NetworkPort
NetworkRouter
SecurityGroup
Modified OpenStack CloudManager to also update the network
provider's tenant_mapping_enabled value.
Depends on #13535
Steps for Testing/QA