-
Notifications
You must be signed in to change notification settings - Fork 75
docs: Add Audit logs usage and internal develop guide #786
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
docs: Add Audit logs usage and internal develop guide #786
Conversation
|
||
### Storage | ||
|
||
To maintain consistency across storage backends, such as the database and the configured search backend (e.g., OpenSearch), the Unit of Work (UoW) pattern is used. This ensures that all operations, including creation, updates, and indexing, are handled transactionally, keeping the database and search indexes synchronized. |
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.
To maintain consistency across storage backends, such as the database and the configured search backend (e.g., OpenSearch), the Unit of Work (UoW) pattern is used. This ensures that all operations, including creation, updates, and indexing, are handled transactionally, keeping the database and search indexes synchronized. | |
The Unit of Work (UoW) pattern is used to maintain consistency across storage backends, such as the database and the configured search backend (e.g., OpenSearch). This ensures that all operations, including creation, updates, and indexing, are handled transactionally, keeping the database and search indexes synchronized. |
|
||
### Permissions | ||
|
||
Access to audit logs is controlled via the Invenio permissions system. Currently only the System User can create the audit log and administrators can read. The permissions can be updated in the permission policy class to extended, for example, providing read access to the logs to other user roles. |
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.
Access to audit logs is controlled via the Invenio permissions system. Currently only the System User can create the audit log and administrators can read. The permissions can be updated in the permission policy class to extended, for example, providing read access to the logs to other user roles. | |
Access to audit logs is controlled via the Invenio permissions system. Currently only the System User can create audit logs and administrators can read them. The permissions can be updated in the permission policy class to, for example, provide read access to other user roles. |
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.
Looks good :) Couple edits
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.
good stuff! do we have it in release notes already?
ce5bb9c
to
b803fd8
Compare
uow.register(AuditLogOp(CustomActionAuditLog.build(identity, resource_id, ...))) | ||
``` | ||
|
||
By following these steps, you can extend the audit logging system to include custom actions tailored to your instance's needs. |
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.
placement notes: If the "How to track more actions" section is directed at instance operators, then it should be moved to the "Operate an Instance" section. Otherwise this can be reworded to tailored to your module's needs.
|
||
``` | ||
|
||
4. **Use the action in your module** |
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.
The numbered list resets to 1.
for each paragraph when the page is rendered. There is some spacing that needs to be fixed to address that.
|
||
The feature can be enabled by setting the `AUDIT_LOGS_ENABLED` flag to `True`. | ||
|
||
## Adminstration panel |
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.
placement: This should be moved and merged with the audit logs section in the "Use" section since it's really what this is about.
No description provided.