Enhancing log_auth Functionality: Adding IP Logging and Clarifying 2FA Process

partizanes

New Member
Apr 6, 2025
1
0
1
Hello,


It would be great if the log_auth function (found in environment.rs) could include the IP address of the successfully authenticated user, as this information is already available in the RestEnvironment structure.


Additionally, right now we receive two identical log messages: one when authenticating with the password and another when entering the 2FA code. For example:


Code:
 pvedaemon[2360938]: <root@pam> successful auth for user 'root@pam'


It would be helpful if the first message (during 2FA) clearly states that it's a pre-authorization step, and the second message specifies that it’s for 2FA authentication.


For comparison, here’s how a failed authentication log message looks, which is clear and includes all necessary information:


Code:
pvedaemon[2360938]: authentication failure; rhost=::ffff:10.10.10.10 user=root@pam msg=failed 2nd factor

Thanks!
 
Last edited: