WeBWorK Main Forum

Login log and LTI

Re: Login log and LTI

by Nathan Wallach -
Number of replies: 0
I think this is possibly a bug.

I do see log records for LTI logins for students, but apparently not for staff users.

A slightly edited sample is:

[Sat Mar 07 19:08:05 2020] LOGIN OK user_id=username@campus.technion.ac.il login_type=normal credential_source=LTIAdvanced host=ip_address port=60259 UA=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

The "LOGIN OK" messages are generated by lib/WeBWorK/Authen.pm only when the $self->{initial_login} flag is on. It seems that LTIAdvanced.pm turns it on when "maybe_update_user" (or "create_user") is called, but that only happens if the course/site has "LMSManageUserData" turned on. On my server I do have "$LMSManageUserData=1;" set in webwork2/conf/authen_LTI.conf which explains why I see "LOGIN OK" log records. Can you check if turning that on fixes the issue for your server.

About the lack of records for "staff" account: Since "maybe_update_user" does not attempt to update users of too high a permission, and the line to set the $self->{initial_login} flag is at the end of the block not run for such "power" users - such logins do get the flag turned on, so no log record will be generated.

I suspect that both issues should be fixed: the main issue can be fixed by adding a new block after the "elsif ($ce->{LMSManageUserData})" block to turn on $self->{initial_login} when LMSManageUserData is not on.