-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
As an
Org administrator
I want to
view all user and system actions that have occurred within my organization
So that
I can monitor activity, investigate incidents, and ensure operational accountability
✅ Acceptance Criteria
🖥️ Web Dashboard Functionality
-
Access Control:
- Only users with the
adminrole can access the Audit Log tab/page. - Users without
adminsee no link to this section.
- Only users with the
-
Audit Log Table View:
-
Display the following columns:
- Timestamp (sortable)
- User (resolved from
user_id) - Event Type (
diagnosis.run,fix.applied, etc.) - Source (
cli,slack,webhook) - Status (
success,error) - Summary (generated from context — e.g., “Diagnosed pod
api-123”)
-
-
Filtering & Search:
-
Filters:
- Date range
- Event type
- Source
- Status
-
Keyword search across
pod name,user name,command
-
-
Drill-Down View:
-
Click a row to open a modal or drawer with:
- Full
contextJSON (prettified) - Raw metadata for auditing or debugging
- (Optional) Links to related objects: pod, diagnosis
- Full
-
-
Pagination:
- 50 logs per page with pagination controls
-
Performance:
- Logs should load within 1s for typical orgs (indexes required)
🛠 GitHub Tasks
Frontend
- [UI] Audit Log Page (Admin Only)
- [UI] Table Component for Log Events
- [UI] Filters & Search Input
- [UI] Expandable Row or Modal for JSON Drill-Down
- [UI] User RBAC Enforcement
Backend
- [API]
GET /audit/logsfor Admins - [Query] Indexing for Fast Filters (org_id, timestamp, event_type)
- [API] Result Pagination + Sorting
- [Security] Field Redaction Middleware (if needed)
📌 Additional Notes
- ❌ No CLI access to logs — all audit visibility is centralized in the dashboard
- ✅ This matches the future v2 goal of having org-wide observability and incident history
- 📦 You can build this atop Postgres and extend later to export logs via CSV