che icon indicating copy to clipboard operation
che copied to clipboard

Unable to delete stack that was created by non existing user

Open toorog opened this issue 8 years ago • 8 comments

Description

I created a stack with a user that does no longer exist. Now I want to update that stack. Even with ManageSystem Permissions I am not able to modify or even view the stack. Also assigning permissions to my admin account for that stack fails with 403.

I also tried setting SYSTEM_SUPER__PRIVILEGED__MODE to true which also did not help. As of now I see no way how to delete that stack.

Reproduction Steps

  1. Login with user1
  2. Create Stack
  3. Delete user from keycloak
  4. Login with admin user
  5. Try to modify / update / delete stack

OS and version:
Che 6.7.0 @ Kubernetes

toorog avatar Aug 29 '18 14:08 toorog

@toorog i do not think admin can delete objects that other users have created. @skabashnyuk or @sleshchenko will keep me honest though.

ghost avatar Aug 30 '18 08:08 ghost

@eivantsov If that is the case, che will clutter up with stacks that are owned by no longer existing users. IMHO a user with ManageSystem permissions (and maybe SYSTEM_SUPER__PRIVILEGED__MODE enabled) should at least be able to give itself permissions on every stack in the system.

toorog avatar Aug 30 '18 09:08 toorog

@toorog you need to delete this using using Che API, and all associated resources will be deleted.

To delete a a user, you need to have ManageUsers permissions which your admin user should have.

curl -X DELETE http://che-server/api/user/{id}

ghost avatar Aug 30 '18 10:08 ghost

@toorog have you tried @eivantsov idea https://github.com/eclipse/che/issues/10986#issuecomment-417273720? Can we close this issue?

skabashnyuk avatar Sep 10 '18 08:09 skabashnyuk

@skabashnyuk Yes that resolved the issue. I would kindly ask to add that to the documentation as well.

toorog avatar Sep 10 '18 08:09 toorog

https://github.com/eclipse/che-docs/blob/234ffc2670dfa8222eb70db3eb362bb25cd641aa/src/main/pages/setup-openshift/openshift-admin-guide.adoc#gdpr

ghost avatar Sep 10 '18 08:09 ghost

@eivantsov I would have never searched in a document that is about openshift setup. As this is a general functionality - not related to openshift at all - this should be in the non openshift documentation also.

toorog avatar Sep 10 '18 08:09 toorog

@toorog agreed

https://github.com/eclipse/che-docs/issues/483

ghost avatar Sep 10 '18 08:09 ghost