feat(auth): add recent activity logging to access tracker
CI / build-and-test (push) Failing after 0s
CI / build-and-test (push) Failing after 0s
* Introduced AccessLogEntry type for logging access details * Updated AccessTracker to maintain a recent activity log * Modified Metrics to include recent activity log in response * Added RecentActivityLog component to display logged activities
This commit is contained in:
@@ -12,6 +12,15 @@ export type RequestAggregate = {
|
||||
request_count: number;
|
||||
};
|
||||
|
||||
export type AccessLogEntry = {
|
||||
timestamp: string;
|
||||
key_id: string;
|
||||
ip: string;
|
||||
user_agent: string;
|
||||
tool: string;
|
||||
path: string;
|
||||
};
|
||||
|
||||
export type AccessMetrics = {
|
||||
total_requests: number;
|
||||
unique_principals: number;
|
||||
@@ -21,6 +30,7 @@ export type AccessMetrics = {
|
||||
top_ips: RequestAggregate[];
|
||||
top_agents: RequestAggregate[];
|
||||
top_tools: RequestAggregate[];
|
||||
recent_log: AccessLogEntry[];
|
||||
};
|
||||
|
||||
export type StatusResponse = {
|
||||
|
||||
Reference in New Issue
Block a user