From 627c225101852ca8526f47c4d2dd44fdd4440b4b Mon Sep 17 00:00:00 2001 From: vractal Date: Wed, 29 Jul 2020 12:38:07 -0400 Subject: [PATCH] Enable ma1sd hashing by default --- roles/matrix-ma1sd/defaults/main.yml | 3 +++ roles/matrix-ma1sd/templates/ma1sd.yaml.j2 | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/roles/matrix-ma1sd/defaults/main.yml b/roles/matrix-ma1sd/defaults/main.yml index 713dd3ed..63bc5a59 100644 --- a/roles/matrix-ma1sd/defaults/main.yml +++ b/roles/matrix-ma1sd/defaults/main.yml @@ -83,6 +83,9 @@ matrix_ma1sd_verbose_logging: false matrix_ma1sd_v1_enabled: true matrix_ma1sd_v2_enabled: true +# Fix for missing 3PIDS bug +matrix_ma1sd_hashing_enabled: true + # Default ma1sd configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/matrix-ma1sd/templates/ma1sd.yaml.j2 b/roles/matrix-ma1sd/templates/ma1sd.yaml.j2 index 0deef3d8..8f3569b1 100644 --- a/roles/matrix-ma1sd/templates/ma1sd.yaml.j2 +++ b/roles/matrix-ma1sd/templates/ma1sd.yaml.j2 @@ -63,6 +63,19 @@ threepid: {% endif %} {% endif %} +{% if matrix_ma1sd_hashing_enabled %} +hashing: + enabled: true # enable or disable the hash lookup MSC2140 (default is false) + pepperLength: 20 # length of the pepper value (default is 20) + rotationPolicy: per_requests # or `per_seconds` how often the hashes will be updating + hashStorageType: sql # or `in_memory` where the hashes will be stored + algorithms: + - none # the same as v1 bulk lookup + - sha256 # hash the 3PID and pepper. + delay: 2m # how often hashes will be updated if rotation policy = per_seconds (default is 10s) + requests: 10 +{% endif %} + synapseSql: enabled: {{ matrix_ma1sd_synapsesql_enabled }} type: {{ matrix_ma1sd_synapsesql_type }}