diff --git a/roles/authelia-for-wiki_js/tasks/main.json b/roles/authelia-for-wiki_js/tasks/main.json index 185f052..d39307f 100644 --- a/roles/authelia-for-wiki_js/tasks/main.json +++ b/roles/authelia-for-wiki_js/tasks/main.json @@ -1,4 +1,14 @@ [ + { + "name": "configuration | compute client secret hash", + "become" true, + "ansible.builtin.command": { + "cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_wiki_js_client_secret}}" + }, + "set_fact": { + "temp_authelia_for_wiki_js_client_secret_hashed": "{{ command_output.stdout }}" + } + }, { "name": "configuration | emplace", "become": true, diff --git a/roles/authelia-for-wiki_js/templates/authelia-client-conf.json.j2 b/roles/authelia-for-wiki_js/templates/authelia-client-conf.json.j2 index 8537aea..bdc2046 100644 --- a/roles/authelia-for-wiki_js/templates/authelia-client-conf.json.j2 +++ b/roles/authelia-for-wiki_js/templates/authelia-client-conf.json.j2 @@ -1,6 +1,6 @@ { "client_id": "{{var_authelia_for_wiki_js_client_id}}", - "client_secret": "{{var_authelia_for_wiki_js_client_secret}}", + "client_secret": "{{temp_authelia_for_wiki_js_client_secret_hashed}}", "client_name": "Wiki.js", "public": false, "authorization_policy": "one_factor",