Introduces the `decnet webhook` long-running worker that consumes the
internal bus and POSTs matching events to configured subscriptions.
Design: one task per (subscription, pattern) pair. Each task opens
its own bus subscription, iterates events, and dispatches via the
shared deliver() client. No intermediate queue, no in-memory filter
matching — the bus's own pattern matcher is the filter. Reloads on
`system.webhook.subscriptions_changed` signals from the CRUD router,
with a 60s fallback timer in case a signal is lost.
Shutdown propagates via CancelledError on the outer task; all inner
subscription tasks are cancelled and awaited in a finally block.
Bus unavailable → worker stays up in idle mode per the DEBT-031
pattern, logging one warning.
Registered as a master-only CLI command (agents don't configure
webhooks — the subscription store lives on master). systemd unit
mirrors the profiler template; added to decnet.target Wants= list so
`systemctl start decnet.target` brings it up alongside everything
else. `decnet init` auto-picks up the new .service.j2 via its
existing `glob("decnet-*.service.j2")` sweep.
21 lines
768 B
SYSTEMD
21 lines
768 B
SYSTEMD
[Unit]
|
|
Description=DECNET honeypot framework (all master-host workers)
|
|
Documentation=https://git.resacachile.cl/anti/DECNET/wiki/Workers
|
|
# Bring workers up in dependency order: bus first (everything else publishes
|
|
# heartbeats to it), then the API + data-plane workers. systemd resolves the
|
|
# actual ordering via each unit's own After=/Wants= on decnet-bus.service —
|
|
# this target is a convenience grouping, not an ordering primitive.
|
|
Wants=decnet-bus.service \
|
|
decnet-api.service \
|
|
decnet-web.service \
|
|
decnet-collector.service \
|
|
decnet-profiler.service \
|
|
decnet-sniffer.service \
|
|
decnet-prober.service \
|
|
decnet-mutator.service \
|
|
decnet-webhook.service
|
|
After=decnet-bus.service
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|