More privacy friendly defaults #22

Closed
opened 2022-02-07 20:20:58 +00:00 by decentral1se · 2 comments
Owner
  • Do we really need INFO level in https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/branch/main/log.config.tmpl? I don't think so but I am not sure. Setting to WARN/ERROR would be better, I guess.

  • add option for pruning redacted messages in

    homeserver.yaml.tmpl Lines 466 to 471 in f5275b2384
    # How long to keep redacted events in unredacted form in the database. After
    # this period redacted events get replaced with their redacted form in the DB.
    #
    # Defaults to `7d`. Set to `null` to disable.
    #
    #redaction_retention_period: 28d

  • add options for server level retention periouds in

    homeserver.yaml.tmpl Lines 521 to 588 in f5275b2384
    # Message retention policy at the server level.
    #
    # Room admins and mods can define a retention period for their rooms using the
    # 'm.room.retention' state event, and server admins can cap this period by setting
    # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
    #
    # If this feature is enabled, Synapse will regularly look for and purge events
    # which are older than the room's maximum retention period. Synapse will also
    # filter events received over federation so that events that should have been
    # purged are ignored and not stored again.
    #
    retention:
    # The message retention policies feature is disabled by default. Uncomment the
    # following line to enable it.
    #
    #enabled: true
    # Default retention policy. If set, Synapse will apply it to rooms that lack the
    # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
    # matter much because Synapse doesn't take it into account yet.
    #
    #default_policy:
    # min_lifetime: 1d
    # max_lifetime: 1y
    # Retention policy limits. If set, and the state of a room contains a
    # 'm.room.retention' event in its state which contains a 'min_lifetime' or a
    # 'max_lifetime' that's out of these bounds, Synapse will cap the room's policy
    # to these limits when running purge jobs.
    #
    #allowed_lifetime_min: 1d
    #allowed_lifetime_max: 1y
    # Server admins can define the settings of the background jobs purging the
    # events which lifetime has expired under the 'purge_jobs' section.
    #
    # If no configuration is provided, a single job will be set up to delete expired
    # events in every room daily.
    #
    # Each job's configuration defines which range of message lifetimes the job
    # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
    # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
    # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
    # lower than or equal to 3 days. Both the minimum and the maximum value of a
    # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
    # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
    # which 'max_lifetime' is lower than or equal to three days.
    #
    # The rationale for this per-job configuration is that some rooms might have a
    # retention policy with a low 'max_lifetime', where history needs to be purged
    # of outdated messages on a more frequent basis than for the rest of the rooms
    # (e.g. every 12h), but not want that purge to be performed by a job that's
    # iterating over every room it knows, which could be heavy on the server.
    #
    # If any purge job is configured, it is strongly recommended to have at least
    # a single job with neither 'shortest_max_lifetime' nor 'longest_max_lifetime'
    # set, or one job without 'shortest_max_lifetime' and one job without
    # 'longest_max_lifetime' set. Otherwise some rooms might be ignored, even if
    # 'allowed_lifetime_min' and 'allowed_lifetime_max' are set, because capping a
    # room's policy to these values is done after the policies are retrieved from
    # Synapse's database (which is done using the range specified in a purge job's
    # configuration).
    #
    #purge_jobs:
    # - longest_max_lifetime: 3d
    # interval: 12h
    # - shortest_max_lifetime: 3d
    # interval: 1d

  • allow to disable identity server lookups for the defederated case in

    homeserver.yaml.tmpl Lines 1205 to 1207 in f5275b2384
    # Enable 3PIDs lookup requests to identity servers from this server.
    #
    #enable_3pid_lookup: true

  • Ensure allow_public_rooms_without_auth & allow_public_rooms_over_federation are set to false, don't rely on the defaults (might change).

  • Add option for user_ips_max_age, see https://github.com/matrix-org/synapse/pull/6098/files

Been using https://matrix.org/blog/category/privacy to help read up on this stuff.

- Do we really need `INFO` level in https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/branch/main/log.config.tmpl? I don't think so but I am not sure. Setting to WARN/ERROR would be better, I guess. - add option for pruning redacted messages in https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/f5275b2384ea07cb30e7779f3a4b71d5fb4d14c2/homeserver.yaml.tmpl#L466-L471 - add options for server level retention periouds in https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/f5275b2384ea07cb30e7779f3a4b71d5fb4d14c2/homeserver.yaml.tmpl#L521-L588 - allow to disable identity server lookups for the defederated case in https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/f5275b2384ea07cb30e7779f3a4b71d5fb4d14c2/homeserver.yaml.tmpl#L1205-L1207 - Ensure `allow_public_rooms_without_auth` & `allow_public_rooms_over_federation` are set to false, don't rely on the defaults (might change). - Add option for `user_ips_max_age`, see https://github.com/matrix-org/synapse/pull/6098/files Been using https://matrix.org/blog/category/privacy to help read up on this stuff.
Owner

Federation whitelist?

homeserver.yaml.tmpl Lines 659 to 662 in f5275b2384
#federation_domain_whitelist:
# - lon.example.com
# - nyc.example.com
# - syd.example.com

Federation whitelist? https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/f5275b2384ea07cb30e7779f3a4b71d5fb4d14c2/homeserver.yaml.tmpl#L659-L662
Author
Owner

Happy with this for now.

Happy with this for now.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/matrix-synapse#22
No description provided.