Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Export all data of a single user (GDPR Art. 15) #10900

Closed
samuel-p opened this issue Sep 23, 2021 · 4 comments
Closed

Export all data of a single user (GDPR Art. 15) #10900

samuel-p opened this issue Sep 23, 2021 · 4 comments
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@samuel-p
Copy link
Contributor

Description:

To fulfil data requests according to Art 15 GDPR it would be good to have a function to export all data of a user. I think there are 2 possibilities here: Either an API endpoint or a custom script.

Beside that it would be great to know which data are relevant for this.

@erikjohnston
Copy link
Member

I think python -m synapse.app.admin_cmd -c <config_file> export-data <user_id> should do you want? We should probably document that somewhere if it isn't already....

@erikjohnston erikjohnston added the X-Needs-Info This issue is blocked awaiting information from the reporter label Sep 24, 2021
@samuel-p
Copy link
Contributor Author

I could not test this, because running this in my docker setup in the main Synapse container I get the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/site-packages/synapse/app/admin_cmd.py", line 236, in <module>
    start(sys.argv[1:])
  File "/usr/local/lib/python3.8/site-packages/synapse/app/admin_cmd.py", line 190, in start
    and not config.worker_log_file
  File "/usr/local/lib/python3.8/site-packages/synapse/config/_base.py", line 340, in __getattr__
    return self._get_unclassed_config(None, item)
  File "/usr/local/lib/python3.8/site-packages/synapse/config/_base.py", line 363, in _get_unclassed_config
    raise AttributeError(item, "not found in %s" % (list(self._configs.keys()),))
AttributeError: ('worker_log_file', "not found in ['modules', 'server', 'tls', 'federation', 'caches', 'database', 'logging', 'ratelimiting', 'media', 'oembed', 'captcha', 'voip', 'registration', 'account_validity', 'metrics', 'api', 'appservice', 'key', 'saml2', 'oidc', 'cas', 'sso', 'jwt', 'auth', 'email', 'authproviders', 'push', 'spamchecker', 'room', 'groups', 'userdirectory', 'consent', 'stats', 'servernotices', 'roomdirectory', 'thirdpartyrules', 'tracing', 'worker', 'redis', 'experimental']")

Maybe I missed something to run this command or do I need to change something my config? I'm using the latest version of Synapse v1.43.0.

@erikjohnston
Copy link
Member

Ah, looks like we've broken it and haven't noticed :(

@erikjohnston
Copy link
Member

I'm going to close this in favour of #10908, as I think the admin command is exactly what you want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants