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

[NEW] GDPR - Right to access and Data Portability #9906

Merged
merged 26 commits into from Apr 21, 2018

Conversation

Projects
6 participants
@Hudell
Member

Hudell commented Feb 26, 2018

@RocketChat/core

Closes #9767
Closes #9768

This PR adds an option for users to download all their data stored in the servers, in either JSON or HTML format. This funcionality can be enabled by an admin through a new page on the administration center.

Administration Center

Once enabled, two new buttons will be added to the user's account page:
My Account

When the user clicks on one of those new buttons, the system will register the request on the new exportOperations collection. The server will then automatically export all the messages and attachments from every channel that the user has access to. When this operation is complete, the server will generate a zip file and send an email to the user with a download link.

Each button can only be used once per day. The download button will generate HTML files and the export button will generate JSON files.

@Hudell Hudell requested a review from rodrigok Feb 26, 2018

@Hudell Hudell added this to the 0.63.0 milestone Feb 26, 2018

return res.end();
}
const filePath = operation.generatedFile;

This comment has been minimized.

@geekgonecrazy

geekgonecrazy Feb 27, 2018

Member

We are making a lot of assumptions about long term storage being available on the disk. Could we store the file on the file store provider already setup on the server?

Let's just imagine that this is in a docker container. If you write the file and then the container is restarted the file is gone. Mounting a directory is possible... But in some setups this is pretty difficult

This comment has been minimized.

@Hudell

Hudell Feb 28, 2018

Member

I've added GridFS, Amazon and Google Storage as options for the location of the generated file.

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@RocketChat RocketChat deleted a comment from codacy-bot Feb 27, 2018

@Hudell Hudell changed the title from [NEW] GDPR - Right to access to [NEW] GDPR - Right to access and Data Portability Mar 5, 2018

@rodrigok rodrigok added this to Desireable in 0.63.0 via automation Mar 26, 2018

@theorenck theorenck modified the milestones: 0.63.0, 0.64.0 Apr 9, 2018

@theorenck theorenck added this to Desireable in 0.64.0 via automation Apr 9, 2018

@theorenck theorenck moved this from Desireable to Review/QA in 0.64.0 Apr 9, 2018

@Hudell Hudell removed the request for review from rodrigok Apr 17, 2018

Code was changed

@theorenck theorenck moved this from Review/QA to Ready to merge in 0.64.0 Apr 18, 2018

@theorenck theorenck moved this from Ready to merge to Review/QA in 0.64.0 Apr 18, 2018

@rodrigok rodrigok force-pushed the Hudell:right-to-access branch to 30fca01 Apr 21, 2018

@rodrigok rodrigok merged commit fee30ad into RocketChat:develop Apr 21, 2018

4 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test-with-oplog Your tests passed on CircleCI!
Details
ci/circleci: test-without-oplog Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

0.64.0 automation moved this from Review/QA to Done Apr 21, 2018

engelgabriel added a commit that referenced this pull request Apr 21, 2018

Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
* 'develop' of github.com:RocketChat/Rocket.Chat:
  [NEW] Option to mute group mentions (@ALL and @here) (#10502)
  [NEW] GDPR - Right to access and Data Portability (#9906)

@rodrigok rodrigok referenced this pull request Apr 28, 2018

Merged

Release 0.64.0 #10613

@ghost

This comment has been minimized.

ghost commented Apr 30, 2018

Just tried that but I get internal server error +

Exception while invoking method 'requestDataDownload' Error: ENOENT: no such file or directory, mkdir '/tmp/userData/HxSazvfL5T6vRHP8K'
    at Object.fs.mkdirSync (fs.js:885:18)
    at MethodInvocation.requestDataDownload (/opt/rocketchat-0.64.0/programs/server/app/app.js:10356:10)
    at MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
    at MethodInvocation.methodsMap.(anonymous function) (/opt/rocketchat-0.64.0/programs/server/packages/rocketchat_lib.js:2186:28)
    at maybeAuditArgumentChecks (/opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:1877:12)
    at DDP._CurrentMethodInvocation.withValue (/opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:902:126)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:12)
    at DDPServer._CurrentWriteFence.withValue (/opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:902:98)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:12)
    at Promise (/opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:902:46)
    at new Promise (<anonymous>:null:null)
    at Session.method (/opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:875:23)
    at /opt/rocketchat-0.64.0/programs/server/packages/ddp-server.js:754:85
@ghost

This comment has been minimized.

ghost commented Apr 30, 2018

Creating /tmp/userData solves that. Hm.

@photoninger

This comment has been minimized.

photoninger commented Apr 30, 2018

mkdir -p would avoid such errors

@Elvinra

This comment has been minimized.

Elvinra commented May 17, 2018

On docker same problem, the user rocketchat don't have the permissions on tmp folder

  • little fix: Mount a volume on /tmp/userData, put chmod 777 on the host system

Real fix: update the dockerfile to create that folder and put the permissions to rocketchat user

@photoninger

This comment has been minimized.

photoninger commented May 28, 2018

When are the exported files and zip files deleted?
Or do you depend on deleting everything in /tmp on reboot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment