ソースを参照

Revert "Auto-generate matrix_bot_matrix_registration_bot_bot_password via group vars"

This reverts commit bf95ad2235.

This was a bad idea.
It's better to have people manually define the password.

Otherwise, `matrix_homeserver_generic_secret_key` changing some day in
the future would break the bot and one would have to figure out how to
reset its password manually.

Using an explicit password is more stable.
pull/3086/head
Slavi Pantaleev 2年前
コミット
998e9ce655
4個のファイルの変更7行の追加4行の削除
  1. +4
    -1
      docs/configuring-playbook-bot-matrix-registration-bot.md
  2. +0
    -1
      group_vars/matrix_servers
  3. +1
    -0
      roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml
  4. +2
    -2
      roles/custom/matrix-bot-matrix-registration-bot/tasks/validate_config.yml

+ 4
- 1
docs/configuring-playbook-bot-matrix-registration-bot.md ファイルの表示

@@ -21,6 +21,9 @@ matrix_bot_matrix_registration_bot_enabled: true
# To use a different username, uncomment & adjust the variable below:
# matrix_bot_matrix_registration_bot_matrix_user_id_localpart: bot.matrix-registration-bot

# Generate a strong password here. Consider generating it with `pwgen -s 64 1`
matrix_bot_matrix_registration_bot_bot_password: PASSWORD_FOR_THE_BOT

# Enables registration
matrix_synapse_enable_registration: true

@@ -28,7 +31,7 @@ matrix_synapse_enable_registration: true
matrix_synapse_registration_requires_token: true
```

The bot's user account will be created automatically.
The bot account will be created automatically.

## Installing



+ 0
- 1
group_vars/matrix_servers ファイルの表示

@@ -1714,7 +1714,6 @@ matrix_bot_matrix_registration_bot_systemd_required_services_list: |
(['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
}}

matrix_bot_matrix_registration_bot_bot_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'registration.bot', rounds=655555) | to_uuid }}"

######################################################################
#


+ 1
- 0
roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml ファイルの表示

@@ -22,6 +22,7 @@ matrix_bot_matrix_registration_bot_data_path: "{{ matrix_bot_matrix_registration
matrix_bot_matrix_registration_bot_bot_server: "https://{{ matrix_server_fqn_matrix }}"
matrix_bot_matrix_registration_bot_api_base_url: "https://{{ matrix_server_fqn_matrix }}"


# The bot's password (can also be used to login via a client like element)
matrix_bot_matrix_registration_bot_bot_password: ''



+ 2
- 2
roles/custom/matrix-bot-matrix-registration-bot/tasks/validate_config.yml ファイルの表示

@@ -1,6 +1,6 @@
---

- name: Fail if required matrix-registration-bot settings not defined
- name: Fail if required settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item }}`).
@@ -8,7 +8,7 @@
with_items:
- "matrix_bot_matrix_registration_bot_bot_password"

- name: (Deprecation) Catch and report old matrix-registration-bot settings
- name: (Deprecation) Catch and report old settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which is deprecated - Please check the documentation on how to configure the matrix-registration-bot.


読み込み中…
キャンセル
保存