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
Each event type has a specific path structure and data format.
66
+
Each event type has a specific path structure and data format. The path is an array of strings that categorizes the event, while the data contains relevant information specific to that event type.
52
67
53
68
## Security Considerations
54
69
55
70
Audit events are stored locally on the node and are only accessible to authorized users with appropriate permissions. When retrieving audit events from another node, proper authentication and authorization are required.
56
71
72
+
The audit system is designed to be secure and tamper-resistant, ensuring that audit events cannot be modified or deleted without proper authorization.
73
+
57
74
## Integration with Other Components
58
75
59
76
The audit system is integrated with various components of the Polykey system:
@@ -62,11 +79,35 @@ The audit system is integrated with various components of the Polykey system:
62
79
- The agent service exposes audit functionality through RPC methods
63
80
- Node connections can access audit events from connected nodes
64
81
82
+
Example of how the audit system is integrated with the PolykeyAgent:
83
+
84
+
```typescript
85
+
// In PolykeyAgent.ts
86
+
const agentService =agentServerManifest({
87
+
audit: this.audit,
88
+
acl: this.acl,
89
+
db: this.db,
90
+
keyRing: this.keyRing,
91
+
// ... other components
92
+
});
93
+
```
94
+
95
+
## Implementation Details
96
+
97
+
The audit system is implemented using the following key files:
98
+
99
+
-`src/audit/Audit.ts`: The main Audit class implementation
100
+
-`src/audit/types.ts`: Type definitions for audit events
101
+
-`src/audit/utils.ts`: Utility functions for audit operations
102
+
-`src/nodes/agent/handlers/NodesAuditEventsGet.ts`: Handler for retrieving audit events
103
+
-`src/nodes/agent/callers/nodesAuditEventsGet.ts`: Caller for the audit events RPC method
104
+
65
105
## Future Enhancements
66
106
67
107
Future versions of the audit system may include:
68
108
69
-
- Additional event types
70
-
- Enhanced filtering capabilities
71
-
- Export functionality for audit logs
72
-
- Integration with external logging systems
109
+
- Additional event types for more comprehensive auditing
110
+
- Enhanced filtering capabilities based on event paths and data
111
+
- Export functionality for audit logs to common formats (CSV, JSON)
112
+
- Integration with external logging systems (Syslog, ELK stack)
0 commit comments