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: packages/cmk-agent-receiver/README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,23 @@ B3 trace-ID middleware) lives in `cmk/agent_receiver/lib/`.
22
22
23
23
The relay sub-app is only active on editions that support relays.
24
24
25
+
### mTLS client certificate extraction
26
+
27
+
Agent and relay endpoints require mTLS authentication.
28
+
The custom `ClientCertWorker` (in `worker.py`) extends the Uvicorn worker to intercept H11 protocol frames during the TLS handshake, extract the client certificate's CN, and inject it as a `verified-uuid` HTTP header.
29
+
FastAPI endpoint dependencies then validate this header against the UUID in the URL path, preventing application-layer spoofing.
30
+
31
+
## API
32
+
33
+
The **agent-receiver** sub-app covers agent registration (including async approval workflows and legacy pairing), certificate renewal, monitoring-data upload, and registration status queries.
34
+
All endpoints that operate on a specific agent UUID require mTLS — the client certificate CN is validated against the UUID in the URL path.
35
+
36
+
The **relay** sub-app covers relay registration, certificate exchange, task management (create / fetch / update), config activation, and forwarding of monitoring data to CMC.
37
+
Relay tasks are stored in-memory with a configurable TTL and a bounded per-relay queue depth.
38
+
At startup the service schedules an asynchronous background task (with exponential-backoff retry) to push an initial relay config task — startup is not blocked while this completes.
39
+
40
+
The full endpoint list is available via FastAPI's auto-generated OpenAPI docs at `/<site>/agent-receiver/docs` and `/<site>/relays/docs` when running locally.
41
+
25
42
## Configuration
26
43
27
44
The service reads `agent_receiver_config.json` from `$OMD_ROOT` at startup.
@@ -32,6 +49,8 @@ If the file is absent, built-in defaults apply.
32
49
|`task_ttl`|`float`|`120.0`| Time-to-live for relay tasks (seconds) |
33
50
|`max_pending_tasks_per_relay`|`int`|`10`| Maximum pending tasks per relay |
34
51
52
+
The environment variables `OMD_ROOT` and `OMD_SITE` must be set (provided automatically by `omd`).
0 commit comments