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

SMQ-2626 - Add audit logs service for monitoring state changes in entities #2755

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

felixgateru
Copy link
Contributor

What type of PR is this?

This is a feature as the audit logs feature, including a new audit-logs service and database to track changes within the system.

What does this do?

  • Adds a new audit-logs service to manage audit logs and sets up a PostgreSQL database for storing audit logs.
  • Integrates audit logging with the existing authentication and authorization mechanisms.
  • Adds API endpoints for retrieving audit logs by ID or retrieving all audit logs with filtering options.
  • Implements an event consumer to process events from the event store and create audit logs.
  • Adds a audit-logs service as a new subscriber to the Event Store

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No

Did you document any new/modified feature?

Yes, incode documentation

Notes

sequenceDiagram
    participant ES as Event Store
    participant AL as AuditLogsService
    participant DB as AuditLogsDB

    ES->>AL: Event received
    activate AL
    AL->>AL: Transform event to AuditLog
    AL->>DB: Save AuditLog
    activate DB
    DB-->>AL: Confirmation
    deactivate DB
    deactivate AL
Loading

Signed-off-by: Felix Gateru <[email protected]>
}

al := auditlogs.AuditLog{
RequestID: requestID,
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we get the previous state ?

}
delete(data, "domain")

operation, ok := data["operation"].(string)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to consume all the events

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.

Feature: Audit Log for Monitoring State Changes in Clients, Channels, Groups, and Domains
2 participants