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
Copy file name to clipboardExpand all lines: docs/features/audit-log.mdx
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,8 @@ All audit events are JSON objects with a common structure:
61
61
"actor": "alice@example.com",
62
62
"provider": "google",
63
63
"ip": "192.168.1.100",
64
-
"success": true
64
+
"success": true,
65
+
"source": "web"
65
66
}
66
67
```
67
68
@@ -71,6 +72,7 @@ All audit events are JSON objects with a common structure:
71
72
|`ip`| Client IP address |
72
73
|`success`| Whether login succeeded |
73
74
|`error`| Error message (if failed) |
75
+
|`source`| Event origin: currently `"web"`|
74
76
75
77
### auth.logout
76
78
@@ -79,10 +81,16 @@ All audit events are JSON objects with a common structure:
79
81
"type": "audit",
80
82
"ts": "2024-01-15T10:35:00.000Z",
81
83
"action": "auth.logout",
82
-
"actor": "alice@example.com"
84
+
"actor": "alice@example.com",
85
+
"source": "web"
83
86
}
84
87
```
85
88
89
+
| Field | Description |
90
+
|-------|-------------|
91
+
|`actor`| User who logged out |
92
+
|`source`| Event origin: currently `"web"`|
93
+
86
94
### sql.execute
87
95
88
96
```json
@@ -96,7 +104,8 @@ All audit events are JSON objects with a common structure:
96
104
"sql": "SELECT * FROM users WHERE active = true",
97
105
"success": true,
98
106
"duration_ms": 45,
99
-
"row_count": 150
107
+
"row_count": 150,
108
+
"source": "web"
100
109
}
101
110
```
102
111
@@ -109,7 +118,7 @@ All audit events are JSON objects with a common structure:
109
118
|`duration_ms`| Execution time in milliseconds |
110
119
|`row_count`| Number of rows returned (optional) |
111
120
|`error`| Error message (if failed) |
112
-
|`source`|`"mcp"`when the query came from the [MCP Server](/features/mcp-server) (omitted otherwise) |
121
+
|`source`|Query origin: `"web"`for the web app, `"mcp"` for the [MCP Server](/features/mcp-server)|
113
122
|`tool`| MCP tool name that ran the query (only when `source` is `"mcp"`) |
114
123
|`agent`| The [agent](/configuration/config#agents) id that ran the query (only when `source` is `"mcp"`). For a delegated agent the `actor` is the user it acts for; for a pure agent the `actor` is `agent:<id>`|
115
124
@@ -125,7 +134,8 @@ All audit events are JSON objects with a common structure:
125
134
"database": "postgres",
126
135
"sql": "SELECT * FROM users WHERE active = true",
127
136
"row_count": 150,
128
-
"format": "csv"
137
+
"format": "csv",
138
+
"source": "web"
129
139
}
130
140
```
131
141
@@ -136,6 +146,7 @@ All audit events are JSON objects with a common structure:
136
146
|`sql`| SQL query that produced the exported data |
0 commit comments