From e7d769448ee3a92641aaa1cf0f93ce88af829366 Mon Sep 17 00:00:00 2001 From: Sabine Laszakovits Date: Sat, 15 May 2021 10:38:57 +0200 Subject: [PATCH] added maubot crypto db settings --- group_vars/matrix_servers | 3 +++ .../matrix-maubot/templates/maubot_config.yaml.j2 | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 0e96d3bb6..d5c2f5f4f 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1195,6 +1195,9 @@ matrix_maubot_systemd_required_services_list: | (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else []) }} +matrix_maubot_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}" +matrix_maubot_shared_secret: true + matrix_maubot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}" matrix_maubot_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'maubot.db') | to_uuid }}" diff --git a/roles/matrix-maubot/templates/maubot_config.yaml.j2 b/roles/matrix-maubot/templates/maubot_config.yaml.j2 index b3809ad04..20f2e4e55 100644 --- a/roles/matrix-maubot/templates/maubot_config.yaml.j2 +++ b/roles/matrix-maubot/templates/maubot_config.yaml.j2 @@ -5,6 +5,19 @@ # Postgres: postgres://username:password@hostname/dbname database: {{ matrix_maubot_storage_database|to_json }} +# Database for encryption data. +crypto_database: + # Type of database. Either "default", "pickle" or "postgres". + # When set to default, using SQLite as the main database will use pickle as the crypto database + # and using Postgres as the main database will use the same one as the crypto database. + # + # When using pickle, individual crypto databases are stored in the pickle_dir directory. + # When using non-default postgres, postgres_uri is used to connect to postgres. + # + # WARNING: The pickle database is dangerous and should not be used in production. + type: default + postgres_uri: {{ matrix_maubot_storage_database|to_json }} + pickle_dir: {{ matrix_maubot_container_data_dir }}/crypto plugin_directories: # The directory where uploaded new plugins should be stored. @@ -36,7 +49,7 @@ server: # Set to "generate" to generate and save a new token at startup. unshared_secret: generate -{% if maubot_shared_secret %} +{% if matrix_maubot_shared_secret %} # Shared registration secrets to allow registering new users from the management UI registration_secrets: {{ matrix_domain }}: