-
Notifications
You must be signed in to change notification settings - Fork 3
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
Audit logging #440
Audit logging #440
Conversation
c2274ad
to
e7d31e5
Compare
72585f0
to
cf7f660
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good job! I left some comments, please take a look at them.
NOTE: Django-auditlog provides a generic view access log mixin out of the box: https://django-auditlog.readthedocs.io/en/latest/usage.html#automatically-logging-changes. This should be usable with DRF. |
KK-1113 KK-1125.
KK-1113. Use Python context manager to set a request path to the LogEntry instance's additional data field when it's available, the same way as the `set_actor` of the `django-auditlog` sets the ip address and user to the LogEntry instance.
bc3e629
to
2cb2341
Compare
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
1a8b62b
to
87182c3
Compare
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
5b61cc9
to
07b1261
Compare
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KK-1113
KK-1113.
07b1261
to
d76c637
Compare
Okay, I finally had time to test this and it the test result is that the contextvar works wrong: it persists through multiple requests. I need to find a proper fix for that or manipulate the request object instead. |
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
KK-1113. Replace the contextvar usage with a request object manipulation, since the contextvar was not reinitialized for every Django request.
KUKKUU-API branch is deployed to platta: https://kukkuu-pr440.api.dev.hel.ninja 🚀🚀🚀 |
Quality Gate passedIssues Measures |
TestCafe result is success for https://kukkuu-pr440.api.dev.hel.ninja 😆🎉🎉🎉 |
Kukkuu audit logging
Audit logging is implemented with
django-auditlog
, but it has some extended features applied withhel_django_auditlog_extra
-app.Audit log extension
This pull request introduces
hel_django_auditlog_extra
, a Django application that enhances django-auditlog with the following features:This PR is splitted so that it would contain only the new
hel_django_auditlog_extra
-app. The Kukkuu configuration is added in another PR: #441.