You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds new mechanism to audit document changes, through a new shared library, audit. The library is injected into every call that handles requests (PouchDb fetch and couch-request).
When a monitored API is called (POST to create a doc, PUT to update a doc or _bulk_docs), the response is analyzed and entries are added into a new database medic-audit.
In medic-audit, each document has an audit doc which contains the last 10 entries of received changes. Each entry includes the rev of the change in question, the user that made the change, the request_id (in case this was a direct client request), the service that made the change (api or sentinel) and the date when the change was registered.
When an audit doc has 10 history entries, a rotation mechanism will save the old audit entry in a new doc, and the existing document trail will only contain the new change.
Moves getDeployInfo into its own shared library to avoid circular dependencies.
closesmedic#9885
0 commit comments