Skip to content

Add Audit Logging and Archive Reason Tracking #746

@curtishall

Description

@curtishall

Add comprehensive audit logging and archive reason tracking to improve system transparency and troubleshooting capabilities.

Current Limitations

  • No tracking of why media files are deleted/archived
  • No audit trail for system changes
  • Limited visibility into user actions
  • No logging of device configuration changes

New Audit Log Table
Create a new table for comprehensive audit logging:

CREATE TABLE AuditLog (
    id BIGINT PRIMARY KEY AUTO_INCREMENT,
    timestamp DATETIME NOT NULL,
    user_id INT,
    action VARCHAR(50) NOT NULL,
    entity_type VARCHAR(50) NOT NULL,
    entity_id INT,
    old_value TEXT,
    new_value TEXT,
    ip_address VARCHAR(45),
    user_agent TEXT,
    additional_info TEXT
);

Track the following events:

  • Media file deletions/archives
  • Device configuration changes
  • User login/logout
  • Storage threshold changes
  • System settings modifications
  • User permission changes

Implementation Details

  • Add audit logging to bc-cleaner.cpp for storage cleanup operations
  • Modify bc-server.cpp to log device changes
  • Add user session tracking
  • Implement API endpoints for audit log retrieval
  • Add UI components to view audit history

UI Requirements

  • New audit log viewer interface
  • Filtering by date, user, action type
  • Export capabilities
  • Archive reason display in media history
  • Device change history view

Benefits

  • Improved system transparency
  • Better troubleshooting capabilities
  • Compliance with audit requirements
  • Enhanced security monitoring
  • Better understanding of system behavior

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions