prevent default tenant deletion

Bug #1297130 reported by Matthias Runge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Wishlist
Unassigned

Bug Description

when deleting the default tenant/project, esp. deleting the admin project, anything unexpected can happen.

This should be caught to prevent inexperienced users to do harm.

Tags: ux
Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

Maybe we could add a warning dialog to prevent users from falling in this situation. This should be fixed in the near future in https://blueprints.launchpad.net/horizon/+spec/tenant-deletion.

Changed in horizon:
status: New → Confirmed
Revision history for this message
Julie Pichon (jpichon) wrote :

How do we detect or define what is a "default" project though?

Julie Pichon (jpichon)
tags: added: ux
Revision history for this message
Julie Pichon (jpichon) wrote :

I wonder if any of the UX folks would have thoughts on how to handle this?

Most installation guides suggest creating a default project called 'service' for the service users from Nova, Neutron, etc to use (e.g. http://docs.openstack.org/icehouse/install-guide/install/yum/content/keystone-users.html ). This is the kind of project/tenant we would want to prevent the accidental deletion of.

We could specifically look for projects named 'service' (and whatever else) but then this becomes very limited and will not work when deployers in other languages use translated names for their projects.

We could rely on a Keystone flag of some sorts, although it looks like this would require a change to Keystone because the project table does not have an 'extra' attribute (like e.g. users do).

We could add yet another setting to Horizon whereby a deployer could set a list of project that they believe should not be deletable. This may be the most flexible option.

...This is probably blueprint material.

And in the meantime there is of course the brute-force workaround of setting identity:delete_project to a non-existent role or a specific user. (I wonder if it'd be possible to write a policy for 'is_admin + not any of these tenants'? Either in policy.json itself ideally or using the customisation module possibly.)

Then there is the matter of the messaging. Do we want to prevent deletion at all, or help the user knows what they're about to do somehow (e.g. "If you delete this project you will lose functionality" or something like that...)

Revision history for this message
Julie Pichon (jpichon) wrote :

Actually there is bug 948644 that looks to address a very similar issue. The Keystone folks make a point that "specialness" can already be handled via using separate domains. I'm not sure if it's possible for Horizon to avail of this yet considering the current issues with using v3 and domains? (I'm thinking of bug 1294396)

Revision history for this message
Liz Blanchard (lblanchard) wrote :

I definitely like the idea of warning the user (letting them know exactly what they would be doing by deleting this project) and having them confirm deletion. But it does make me wonder what really happens if the user does delete this "default" project. Is it really just a project that is set up initially for them to kickstart their cloud environment? And if they delete it and set up a new project it will run the same? In this case, I'd say we allow them to delete the project with warning/confirmation. If this default project has deeper hooks into the system and deleting it would cause issues for future projects we should probably open a blueprint to discuss this further.

My thoughts,
Liz

Revision history for this message
Julie Pichon (jpichon) wrote :

Deleting the project causes authentication issues for the other services so it is pretty serious. (One needs to recreate the project and re-add the members to fix it.)

There's a number of workarounds that can be done today already (updating the identity policy (e.g. to disallow entirely or only allow a "superadmin" role of some sort to delete projects), creating a separate domain, using the customisation module to disallow deletion based on e.g. project name) so I'm not sure how much effort is worth spending on this.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Putting into wishlist based on Julie's input (workarounds exist, and a low value for the effort)

Changed in horizon:
importance: Undecided → Wishlist
Revision history for this message
hossein zabolzadeh (zabolzadeh) wrote :

I think this patch solves the problem: https://review.openstack.org/#/c/142481/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.