-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add audit tables to track IdSrv configuration data changes #61
Comments
I would like to see it not bound to MSSQL, that way people can choose what SQL technology they want to run themselves. |
@cerginio - Any suggestions about that? |
I would chose application level logging based on EF handlers. Defenetely we must store in each row for each history table username from bearer token. I would use change tracker state and save row before change into history table. That tables should be defined in separate audit db context. |
I would suggest throwing event for every action we want to be part of the audit log and allow for registering listeners in the DI for those events.
Audit log sounds like a long list of events which we would ideally like to store in database designed for doing so like EventStore. In simplest scenario we could simply dump all events there without providing UI in AdminUI for reading them. Then for auditing we could use built-in EventStore.UI to query events either live or from past. |
I think an important part here is not also not bind this functionality to a specific storage type, like EventStore. |
One of the compliance requirements for this kind of implementation would be immutability - I presume that would be handled on the implementer end rather than by the functionality handling audit events. This might require guidelines for setup on the user side. |
Currently I am working on this stuff here: |
Will this audit logging extend to logging user logins? It would be useful to have an audit log of successful (and failed) login history for each user. If presented to the user, he could notice suspicious activity |
I played a bit with simple audit implementation in db agnostic way: And it descover overhead in DAL implementation. If you update single propery in Client - let's say Description from "A" to "B", @skoruba please consider how to implement an update in a more smart and lean way. I will try to suggest PR with audit this week. |
#298
ER: 13 changes in audit log |
Done in #391 |
I am closing this issue, it was released in master branch. |
During administration clients, scopes, users, roles may be important to have control on it's history.
One of the cheap way to get changes history could be SQL server Track Data Changes feature.
https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server?view=sql-server-2017
Second options is to realize it on application level by using EF handlers and changetracker.
https://blog.tonysneed.com/2017/10/01/trackable-entities-for-ef-core/
The text was updated successfully, but these errors were encountered: