Skip to content
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

"Add New Cloud Volume" dialog does not restrict cloud tenants for non-admins users. #14836

Closed
ITD27M01 opened this issue Apr 21, 2017 · 9 comments
Assignees
Labels

Comments

@ITD27M01
Copy link

Hi guys, for restricted users that should have access only to owned cloud tenant there is ability to select cloud tenants during cloud volume provisioning. Even those that the user should not see. In my environment there is OpenStack Newton with v3 api as a Cloud Provider with cloud tenants synchronization. And Cinder as a Volume Storage Provider.
image

@lpichler
Copy link
Contributor

@ITD27M01 thanks

@miq-bot assign @lpichler

@lpichler
Copy link
Contributor

#15143
#15145

@ITD27M01
Copy link
Author

ITD27M01 commented May 19, 2017

@lpichler
If rbac is tag-based filtering then this PRs is not the solution for my issue. By default (out of the box) tags are not used by users and this is a very difficult way to enable it. Because you need to tag every element in the infrastructure for which user need to access - cloud tenants that does not accessible from web-interface, vms, created volumes...

@ITD27M01
Copy link
Author

ITD27M01 commented May 20, 2017

Hi @lpichler
In the environment with multiple OpenStack Regions ManageIQ display cloud tenant multiple times for each OpenStack Keystone region. In this way this string of code does not work for multi-region environments:
https://github.com/lpichler/manageiq/blob/fce2cbfd43bff2fc540424a458fbaa6c86557244/app/controllers/cloud_volume_controller.rb#L267
because hash value for the same tenant name get the last selected tenant id from CloudTenants array. And not all tenants are displayed. For correct work there should be some additional value for Cloud Tenant Region (For MIQ it is just another provider - ext_management_system).
image

This code work for me:

Rbac.filtered(CloudTenant).each { |tenant| @cloud_tenant_choices["#{tenant.name} - #{tenant.ext_management_system.name}"] = tenant.id }

image

@ITD27M01
Copy link
Author

ITD27M01 commented May 20, 2017

@lpichler but all this PRs and my overrides does not help to create volume from ManageIQ because of this piece of code from "def create" function:

          CloudVolume.create_volume(cloud_tenant.ext_management_system, options)
          add_flash(_("Creating %{volume} \"%{volume_name}\"") % {
            :volume      => ui_lookup(:table => 'cloud_volume'),
            :volume_name => options[:name]})

For cloud volumes ext_management_system is Cinder Manager but not Cloud Provider. In this way all may request for creating volumes is stuck in "creating" state because of wrong ems for this operation:

image

@lpichler
Copy link
Contributor

@ITD27M01 Thank you for your feedback.

If rbac is tag-based filtering then this PRs is not the solution for my issue. By default (out of the box) tags are not used by users and this is a very difficult way to enable it. Because you need to tag every element in the infrastructure for which user need to access - cloud tenants that does not accessible from web-interface, vms, created volumes...

RBAC is not only about tags, it is also about tenancy and other filters.
For using RBAC for Cloud entities (like CloudTenant(this is only in), and RBAC for other cloud objects like CloudVolumes,... is in FINE only ))

#14836 (comment)
It is another issue I am preferring to create GitHub issue and we can discuss it and do it globally.

#14836 (comment) :
Can you create GitHub issue for it ? with specification of you set up (which version Miq, OpenStack)
I tried it with OpenStack v3 and on the latest code base and cloud volumes have been created successfully.

@miq-bot
Copy link
Member

miq-bot commented Nov 27, 2017

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@miq-bot miq-bot added the stale label Nov 27, 2017
@JPrause
Copy link
Member

JPrause commented Jan 23, 2019

@ITD27M01 is this still a valid issue. If not can you close.
If there's no update by next week, I'll be closing this issue.

@JPrause
Copy link
Member

JPrause commented Jan 29, 2019

Closing issue. If you feel the issue needs to remain open, please let me know and it will be reopened.
@miq-bot close_issue

@miq-bot miq-bot closed this as completed Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants