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

[GDPR] As a Che user, I want to have a possibility to delete all the data related to my account #17541

Closed
ibuziuk opened this issue Jul 31, 2020 · 18 comments
Assignees
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Jul 31, 2020

Is your task related to a problem? Please describe.

As a Che user, I want to have the possibility to delete all the data related to my account. Currently, curl -X DELETE http(s)://{che-host}/api/user/{id}` API only deletes a user from the db, but not from keycloak.

Describe the solution you'd like

In order to be GDPR compliant https://www.eclipse.org/che/docs/che-7/removing-user-data/#gdpr

curl -X DELETE http(s)://{che-host}/api/user/{id}`` should not only delete user from db, but also delete it from the keycloak

Describe alternatives you've considered

N/A

Additional context

in the next iteration, we could also consider removal all the k8s namespaces associated with the user (not part of this task - initially clenup of db + keycloak is enough)

@ibuziuk ibuziuk added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Jul 31, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 31, 2020
@ibuziuk ibuziuk added this to the 7.18 milestone Jul 31, 2020
@ibuziuk ibuziuk added team/hosted-che area/che-server severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jul 31, 2020
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Jul 31, 2020
@vparfonov vparfonov self-assigned this Aug 10, 2020
@vparfonov
Copy link
Contributor

Technically solve this issue not hard we can call KeyClock REST API on BeforeUserRemovedEvent, but problem is Che-server doesn't have KeyClock Admin password. Maybe we can add it as secret @skabashnyuk?

@ibuziuk
Copy link
Member Author

ibuziuk commented Aug 19, 2020

@vparfonov can't we simply retrieve the secret during the che server startup (for the internal keycloak I mean). Basically we need to retrieve the che-identity-secret:

image

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Aug 26, 2020

Can we cover this task as documentation? Explaining for admin what to do. I think Che server should not be responsible for deleting users from keycloak. They are already too much coupled. CC @l0rd

@ibuziuk
Copy link
Member Author

ibuziuk commented Aug 26, 2020

@skabashnyuk we can document it, but we do need to automate this process - single API call removes all the user-related data

@ibuziuk ibuziuk modified the milestones: 7.18, 7.19 Aug 26, 2020
@vparfonov
Copy link
Contributor

@l0rd What do you think? Looks like we need your point of view here.

@ibuziuk
Copy link
Member Author

ibuziuk commented Sep 2, 2020

@vparfonov I believe Mario already provided his POV in the doc related issue - #17500 (comment)

@metlos
Copy link
Contributor

metlos commented Sep 10, 2020

Are we really sure we want to complicate Che with something that is IMHO a disputable solution? IMHO the IDM server is in the large percentage of cases used by more than just Che, in which case this functionality makes no sense.

Wouldn't it be easier to have a separate script/microservice dedicated to this rather than complicate Che server with something that only a (IMHO) small minority of users will appreciate?

@ibuziuk ibuziuk modified the milestones: 7.19, 7.20 Sep 11, 2020
@l0rd
Copy link
Contributor

l0rd commented Sep 14, 2020

If the Che server creates a new user in Keycloak the Che server API should provide an option to delete every bit related to that user from Keycloak.

@alexeykazakov
Copy link

I also would like to notice that using DELETE http(s)://{che-host}/api/user/{id} programmaticaly is complicated because of AuthN.
If I'm not mistaken this API requires a user token. In case of Che/CRW operator and built-in Keycloak which is installed by the operator it's supposed to be an access token from that Keycloak. This is something only the user itself can get after logging into the Keycloak.
It's a problem in Dev Sandbox (aka Hosted Toolchain). In our setup it's a CRW operator with built-in Keycloak. Configured to use OpenShift OAuth. We can't programmaticaly generate a Che Keycloak user token to use DELETE http(s)://{che-host}/api/user/{id} endpoint.
There should be an option to use some Service Account or Che admin credentials or something like this to use that API.

@vparfonov
Copy link
Contributor

This issue about removing user data As a Che user

@alexeykazakov
Copy link

#17541 (comment)

@l0rd pointed me to this issue as the upstream issue for deleting users on behalf of the user. @l0rd, @ibuziuk it seems that it's actually a different issue then? Do you have any issue for the Toolchain case or we need to create a new one?

@vparfonov
Copy link
Contributor

Probably for Toolchain will be enough just disable user in Keycloak, in this case user can't login anymore and don't need to remove any data. WDYT @alexeykazakov ?

@alexeykazakov
Copy link

Unfortunately it won't be enough.

  1. User deactivation usecase. The flow is the following:
  • CRW in Dev Sandbox (aka Hosted Toolchain) configured to use OpenShift OAuth and use the existing {username}-code namespace for workspaces. User does not have permissions to create new namespaces.
  • When user is deactivated he/she is basically removed from OpenShift. OpenShift user/identity/namespaces are deleted.
  • If I just delete the user from the Che Keycloak without deleting the user from the Che DB too then when the user is re-activated (openshift user/identity/namespaces are re-created) then it's impossible to run/create a workspace anymore. Che tries to create a new namespace instead of using the existing {username}-code one for some reason. Maybe it's not using the correct OpenShift token in this case. I don't know.
  • If user is also deleted from Che itself (not only from KC) then everything works.
  1. GDPR. For GDPR requests we need to be able to fully delete the user from Che.

@skabashnyuk
Copy link
Contributor

I just delete the user from the Che Keycloak without deleting the user from the Che DB too then when the user is re-activated (openshift user/identity/namespaces are re-created) then it's impossible to run/create a workspace anymore.

@alexeykazakov can you disable user instead of removing it from keycaloak?

@alexeykazakov
Copy link

If I don't delete the user from KC then I can't even login to Che after re-creating the OpenShift user.
Just for the clarification. During deactivation the OpenShift user and identity is deleted. Then the user can re-signup and the OpenShift user/identity are recreated.

@gazarenkov
Copy link
Contributor

It seems we have more data associated with user which have to be deleted as well.
@skabashnyuk could you please help to identify those entities?

@skabashnyuk
Copy link
Contributor

@gazarenkov you don't need to worry about that. All associated with user entities would be automatically removed during user removal.

@gazarenkov
Copy link
Contributor

thanks, I probably misunderstand of what we previously discussed (specifically related to workspaces). Good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

8 participants