Unable to delete stack that was created by non existing user
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
- Login with user1
- Create Stack
- Delete user from keycloak
- Login with admin user
- Try to modify / update / delete stack
OS and version:
Che 6.7.0 @ Kubernetes
@toorog i do not think admin can delete objects that other users have created. @skabashnyuk or @sleshchenko will keep me honest though.
@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 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}
@toorog have you tried @eivantsov idea https://github.com/eclipse/che/issues/10986#issuecomment-417273720? Can we close this issue?
@skabashnyuk Yes that resolved the issue. I would kindly ask to add that to the documentation as well.
https://github.com/eclipse/che-docs/blob/234ffc2670dfa8222eb70db3eb362bb25cd641aa/src/main/pages/setup-openshift/openshift-admin-guide.adoc#gdpr
@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 agreed
https://github.com/eclipse/che-docs/issues/483