From d02c1a404a3259f2e7ff85c2956350201a8925e7 Mon Sep 17 00:00:00 2001 From: ywoly <63653608+ywoly@users.noreply.github.com> Date: Tue, 14 Apr 2020 21:53:34 +0200 Subject: [PATCH] Add env variables for two-factor auth --- README.md | 2 ++ root/etc/ansible/entrypoint.yml | 2 ++ root/etc/ansible/templates/parameters.yml.j2 | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bce0dd..86d2521 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Default login is `wallabag:wallabag`. - `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user) - `-e SYMFONY__ENV__MAILER_PASSWORD=...`(defaults to "~", the SMTP password) - `-e SYMFONY__ENV__FROM_EMAIL=...`(defaults to "`wallabag@example.com`", the address wallabag uses for outgoing emails) +- `-e SYMFONY__ENV__TWOFACTOR_AUTH=...` (defaults to "true", enable or disable two-factor authentication) +- `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails) - `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration) - `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation) - `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-url-instance.com`", the URL of your wallabag instance) diff --git a/root/etc/ansible/entrypoint.yml b/root/etc/ansible/entrypoint.yml index 5a90096..e8a95b6 100644 --- a/root/etc/ansible/entrypoint.yml +++ b/root/etc/ansible/entrypoint.yml @@ -26,6 +26,8 @@ mailer_encryption: "{{ lookup('env', 'SYMFONY__ENV__MAILER_ENCRYPTION')|default('~', true) }}" mailer_auth_mode: "{{ lookup('env', 'SYMFONY__ENV__MAILER_AUTH_MODE')|default('~', true) }}" from_email: "{{ lookup('env', 'SYMFONY__ENV__FROM_EMAIL')|default('wallabag@example.com', true) }}" + twofactor_auth: "{{ lookup('env', 'SYMFONY__ENV__TWOFACTOR_AUTH')|default('true', true) }}" + twofactor_sender: "{{ lookup('env', 'SYMFONY__ENV__TWOFACTOR_SENDER')|default('no-reply@wallabag.org', true) }}" registration: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_REGISTRATION')|default('true', true) }}" registration_mail_confirmation: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_CONFIRMATION')|default('true', true) }}" domain_name: "{{ lookup('env', 'SYMFONY__ENV__DOMAIN_NAME')|default('https://your-wallabag-url-instance.com', true) }}" diff --git a/root/etc/ansible/templates/parameters.yml.j2 b/root/etc/ansible/templates/parameters.yml.j2 index a65718d..40ab7b4 100644 --- a/root/etc/ansible/templates/parameters.yml.j2 +++ b/root/etc/ansible/templates/parameters.yml.j2 @@ -27,8 +27,8 @@ parameters: secret: {{ secret }} # two factor stuff - twofactor_auth: true - twofactor_sender: no-reply@wallabag.org + twofactor_auth: {{ twofactor_auth }} + twofactor_sender: {{ twofactor_sender }} # fosuser stuff fosuser_registration: {{ registration }}