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

added logging for user ip and email on log-in #133

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

MadelaineJ
Copy link
Collaborator

Problem
Currently no audit trail for log ins

Solution

  • added logging of email, date, and ip address when the user succeeds and fails log in

Ticket URL
https://mediform.atlassian.net/browse/MEDI-88

Documentation
NA

Tests Run

  • make testapi
  • tested that logs show in expected cases

Copy link
Collaborator

@critch646 critch646 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Since these logs are for internal purposes, I think it would be a good idea to distinguish each of the three login fail messages to indicate why (invalid usergroup, email not found, invalid password). This would be helpful for development and also could be helpful for security investigations as well.

@MadelaineJ
Copy link
Collaborator Author

Looks good. Since these logs are for internal purposes, I think it would be a good idea to distinguish each of the three login fail messages to indicate why (invalid usergroup, email not found, invalid password). This would be helpful for development and also could be helpful for security investigations as well.

I didn't think it was necessary since the httpexception details explain why it failed. but i guess those might not appear next to each other conveniently. I added it.

Problem
Currently no audit trail for log ins

Solution
- added logging of email, date, and ip address when the user succeeds and fails log in

Ticket URL
https://mediform.atlassian.net/browse/MEDI-88

Documentation
NA

Tests Run
- make testapi
- tested that logs show in expected cases
Copy link
Collaborator

@critch646 critch646 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent.
Ship it!

@MadelaineJ MadelaineJ merged commit 0790649 into main Mar 18, 2024
@MadelaineJ MadelaineJ deleted the madelaine-sanctuary branch March 18, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants