From 0eaf14609c54b457ed4e1e9c6c4602daf15bd03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Sat, 26 Oct 2024 10:32:43 +0200 Subject: [PATCH] [task-183] [mod] authelia-for-synapse --- roles/authelia-for-synapse/tasks/main.json | 8 ++++++++ .../templates/authelia-client-conf.json.j2 | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/authelia-for-synapse/tasks/main.json b/roles/authelia-for-synapse/tasks/main.json index 25aa632..dd134d1 100644 --- a/roles/authelia-for-synapse/tasks/main.json +++ b/roles/authelia-for-synapse/tasks/main.json @@ -1,4 +1,12 @@ [ + { + "name": "configuration | compute client secret hash", + "become": true, + "ansible.builtin.shell": { + "cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_synapse_client_secret}} | cut --delimiter=' ' --fields='2-'" + }, + "register": "temp_authelia_for_synapse_client_secret_hashed" + }, { "name": "configuration | emplace", "become": true, diff --git a/roles/authelia-for-synapse/templates/authelia-client-conf.json.j2 b/roles/authelia-for-synapse/templates/authelia-client-conf.json.j2 index 3f91cdf..245e75a 100644 --- a/roles/authelia-for-synapse/templates/authelia-client-conf.json.j2 +++ b/roles/authelia-for-synapse/templates/authelia-client-conf.json.j2 @@ -1,6 +1,6 @@ { "client_id": "{{var_authelia_for_synapse_client_id}}", - "client_secret": "{{var_authelia_for_synapse_client_secret}}", + "client_secret": "{{temp_authelia_for_synapse_client_secret_hashed.stdout}}", "client_name": "Synapse", "public": false, "authorization_policy": "one_factor",