alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
216 stars 76 forks source link

logging features -- config file toggle, and external logging? #131

Closed pgnd closed 3 years ago

pgnd commented 3 years ago

currently, 2FA failure logging's enable by src code mod of private vars in

    plugins/twofactor_gauthenticator/twofactor_gauthenticator.php

        ...
        // log errors
-       private $_enable_logs = false;
+       private $_enable_logs = true;
        // relative from RC home dir, not plugin directory
        private $_logs_file = '/logs/log_errors_2FA.txt';

Can we get that enable_logs toggle into

    twofactor_gauthenticator.config.inc.php

as a config option? e.g.,

    $rcmail_config['enable_fail_logs'] = true;

also, an option to get formatted failure log messages into either webserver (nginx/php-fpm) logs, &/or systemd journal -- specifically OUR of the the RC src tree -- would be helpful.

once done, subsequent processing with fail2ban, or redirection to logging services, becomes trivial.

alexandregz commented 3 years ago

Good appointment. Can you check this, plz?