Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Logging to show login attempts #656

Closed
talkingseedling opened this issue May 20, 2024 · 1 comment
Closed

[Enhancement]: Logging to show login attempts #656

talkingseedling opened this issue May 20, 2024 · 1 comment
Labels
question Further information is requested

Comments

@talkingseedling
Copy link

Type of Enhancement:
Server Backend

Describe the Feature/Enhancement:
Currently there is no log output for successful or unsuccessful login attempts. Ideally they'd be present, and include timestamp, username, ip address, X-Forwarded-For.

Why would this be helpful?:
Use case is parsing logs in elastic/logstash/kibana/beats to generate notifications for login attempts.

Future Implementation:
{timestamp} WARN: [AuthService] Failed login attempt for user {username} from ip address {ip address} (Reason: wrong password)

@talkingseedling talkingseedling added the a:feature New feature or request label May 20, 2024
@jmattheis
Copy link
Member

There is. You can filter the access log by the 401 status code. Gotify logs this to stdout.

2024-05-20T18:13:17+02:00 | 401 |     300.313µs |       127.0.0.1 | POST     "/client"
Error #01: you need to provide a valid access token or user credentials to access this api
2024-05-20T18:14:17+02:00 | 401 |     168.481µs |             ::1 | POST     "/message"
Error #01: you need to provide a valid access token or user credentials to access this api

In most cases there isn't a username, so logging it doesn't really make sense.

@jmattheis jmattheis added question Further information is requested and removed a:feature New feature or request labels May 20, 2024
@jmattheis jmattheis closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants