UPC / ravada

Remote Virtual Desktops Manager
https://ravada.upc.edu/
GNU Affero General Public License v3.0
543 stars 174 forks source link

Log failed login #1141

Closed frankiejol closed 4 years ago

frankiejol commented 5 years ago

When login is failed raise a log showing the username and client IP.

jadijadi commented 5 years ago

Hi. It seems this issue is not taken yet. May I start working on it?

frankiejol commented 5 years ago

Hey @jadijadi please go ahead. Don't you hesitate to ask any questions about the source or whatever you need.

jadijadi commented 5 years ago

Dear @frankiejol ,

  1. I did not find any specific logging tool being used. Should I just do a print on failed logins? it will be seen in outputs of rv_front.pl. Or if the project has a logging system, can you please point me to it?
  2. My idea is finding the ip from mojolicious and showing it alongside username with a "Failed login from user" message.
  3. I will use PO files for the messages.
  4. The print will happen near the "push @error,("Access denied");" on rvd_front.pl (line 1297)

If my finding are fine, I will send a PR for them.

Thanks for the help in advance.

frankiejol commented 4 years ago

@jadijadi sorry I thought I already answered you. You are in the right path, please go ahead. We do not use any logging tool, warns are logged to syslog.

andinus commented 4 years ago

Hi, @frankiejol what's the current state of this issue? From what I understand, I'll just have to log the failure to STDERR before https://github.com/UPC/ravada/blob/develop/script/rvd_front#L2297, is that right?

frankiejol commented 4 years ago

Hey @andinus I am afraid this issue was fixed recently when we added Mojo log feature. I am sorry we missed to close this one. https://github.com/UPC/ravada/blob/f1c78734d36acc71b11db3ff1118e69e16d18b07/script/rvd_front#L1594