Apple
fe6e3d30ae
feat(matrix-bridge-dagi): add operator allowlist for control commands (M3.0)
New: app/control.py
- ControlConfig: operator_allowlist + control_rooms (frozensets)
- parse_control_config(): validates @user:server + !room:server formats, fail-fast
- parse_command(): parses !verb subcommand [args] [key=value] up to 512 chars
- check_authorization(): AND(is_control_room, is_operator) → (bool, reason)
- Reply helpers: not_implemented, unknown_command, unauthorized, help
- KNOWN_VERBS: runbook, status, help (M3.1+ stubs)
- MAX_CMD_LEN=512, MAX_CMD_TOKENS=20
ingress.py:
- _try_control(): dispatch for control rooms (authorized → audit + reply, unauthorized → audit + optional ⛔)
- join control rooms on startup
- _enqueue_from_sync: control rooms processed first, never forwarded to agents
- on_control_command(sender, verb, subcommand) metric callback
- CONTROL_UNAUTHORIZED_BEHAVIOR: "ignore" | "reply_error"
Audit events:
matrix.control.command — authorised command (verb, subcommand, args, kwargs)
matrix.control.unauthorized — rejected by allowlist (reason: not_operator | not_control_room)
matrix.control.unknown_cmd — authorised but unrecognised verb
Config + main:
- bridge_operator_allowlist, bridge_control_rooms, control_unauthorized_behavior
- matrix_bridge_control_commands_total{sender,verb,subcommand} counter
- /health: control_channel section (enabled, rooms_count, operators_count, behavior)
- /bridge/mappings: control_rooms + control_operators_count
- docker-compose: BRIDGE_OPERATOR_ALLOWLIST, BRIDGE_CONTROL_ROOMS, CONTROL_UNAUTHORIZED_BEHAVIOR
Tests: 40 new → 148 total pass
Made-with: Cursor
2026-03-05 01:50:04 -08:00
..
2026-03-02 08:11:13 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-02-09 08:46:46 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-02-09 08:46:46 -08:00
2026-02-09 08:46:46 -08:00
2026-03-03 07:14:14 -08:00
2026-02-27 05:24:09 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:38:54 -08:00
2026-03-05 01:50:04 -08:00
2026-03-05 00:54:14 -08:00
2026-03-05 01:41:20 -08:00
2026-03-05 01:41:20 -08:00
2026-03-05 01:07:04 -08:00
2026-03-05 00:54:14 -08:00
2026-03-05 01:21:07 -08:00
2026-03-03 07:14:14 -08:00
2026-02-27 02:55:44 -08:00
2026-02-27 02:44:05 -08:00
2026-02-27 02:44:05 -08:00
2026-02-27 02:44:05 -08:00
2026-02-09 08:46:46 -08:00
2026-02-09 08:46:46 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-02-19 00:14:06 -08:00
2026-02-27 02:55:44 -08:00
2026-03-03 07:14:14 -08:00
2026-03-02 09:42:10 -08:00
2026-03-02 09:42:10 -08:00
2026-03-02 09:29:14 -08:00
2026-03-02 08:12:19 -08:00
2026-03-02 04:03:30 -08:00
2026-03-02 04:03:30 -08:00
2026-03-02 04:03:30 -08:00
2026-03-02 08:00:35 -08:00
2026-03-03 04:36:52 -08:00
2026-03-03 07:14:14 -08:00
2026-03-02 08:18:59 -08:00
2026-03-02 09:08:54 -08:00
2026-03-02 04:52:04 -08:00
2026-03-02 09:24:21 -08:00
2026-03-03 05:07:52 -08:00
2026-03-03 04:49:19 -08:00
2026-03-03 04:57:22 -08:00
2026-03-02 08:24:54 -08:00
2026-02-09 08:46:46 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00