mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 00:50:46 +08:00
Record WebCRT device login/commands and NE exec in operation audit.
Make session lifecycle and typed CLI lines searchable in audit_log with password redaction, and surface summaries plus device filters in the ops UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
497a5e048e
commit
8915455b52
12 changed files with 783 additions and 40 deletions
|
|
@ -99,8 +99,14 @@ def enqueue_audit(
|
|||
) -> None:
|
||||
global _dropped
|
||||
act = str(action or "")
|
||||
# Always persist auth / security-relevant events.
|
||||
if act.startswith("auth.") or act.startswith("users.") or act.startswith("api_tokens.") or act.startswith("webcrt."):
|
||||
# Always persist auth / security / device-op events.
|
||||
if (
|
||||
act.startswith("auth.")
|
||||
or act.startswith("users.")
|
||||
or act.startswith("api_tokens.")
|
||||
or act.startswith("webcrt.")
|
||||
or act.startswith("ne.")
|
||||
):
|
||||
pass
|
||||
elif act.startswith("http.") and not _sample_ok():
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue