Skip to content

docs(adr): propose ADR-0127, relay neo's log through morpheus - #1659

Merged
Gerrrt merged 2 commits into
mainfrom
gerrrt/adr-neo-remote-syslog
Nov 23, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
gerrrt/adr-neo-remote-syslog

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What changed

This adds ADR-0127, Proposed, about getting neo's log off the switch. Nothing is deployed and no rule changes. README.md's ADR count goes from 125 to 126.

The decision:

  • neo sends syslog over UDP to morpheus at 10.7.7.1:5514, on the switch LAN.
  • syslog-ng on morpheus stamps those lines as neo's and relays them over the TLS connection it already holds to Alloy.
  • Alloy gets a second sender rule: connection address 10.0.99.1 and hostname neo give host="neo".
  • The only firewall change is one pass on igc0, from 10.7.7.2 to the gateway's own address. Nothing is added into or out of Winterfell.

Why

The neo audit of 2026-11-13 found the log kept in RAM only. It holds 1,000 lines, Home Assistant's API logins keep filling it, and a reboot empties it. Two facts rule out the obvious answers:

So neo can't talk to the existing intake directly. A direct UDP listener would bring back the forgeable path #1049 removed. The ADR sets out why the UDP hop on the switch LAN is different: pfSense's antispoof rule, read from the live ruleset on 2026-11-23, drops a 10.7.7.0/24 source arriving on any other interface. It also explains why trusting a hostname that syslog-ng writes itself is safe.

Refs #1049

Blast radius

None until the ADR is accepted and applied. Applying it will touch:

  • neo's logging;
  • one switch-LAN pass on morpheus;
  • syslog-ng on morpheus;
  • syslog.alloy;
  • the current-state docs the ADR lists.

The pass, the syslog-ng source and the Alloy rule all go in the applying PR, with the runbook section.

  • No change to network segmentation or firewall rules (this PR only proposes one)
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • scripts/check_docs.py: passed (docs OK).
  • ./scripts/lint.sh: no failures.
  • make validate was not run, because the change is docs only. CI runs it.
  • RouterOS's protocol limits come from MikroTik's Log documentation and have not been tested on neo. The applying PR should confirm them on the switch before relying on them.

PR 1503 has an open ADR numbered 0126, so this one is 0127, and whichever merges second rebases the README count.

  • make validate passes
  • Deployed to the lab and confirmed working
  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

RouterOS sends syslog over UDP only and cannot present a client
certificate, so it cannot reach the pinned TLS intake directly. Relay it
through morpheus's syslog-ng on the switch LAN instead, with one pass to
the gateway and none into Winterfell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

App-only alert selectors allow forged logs labelled host="neo" to trigger security alerts or suppress FirewallLogsStopped, requiring host-scoped rules and cross-host isolation tests before enabling the relay.

3 open issues
What changed in this PR

Proposes ADR-0127 to send neo’s logs through morpheus to the existing TLS-protected Alloy intake, addressing the switch’s volatile log storage. This is documentation only; nothing is deployed and no firewall rules change.

Changes:

  • Defines the proposed UDP-to-TLS relay and sender labelling.
  • Documents security assumptions, rollout order, recovery needs, and alerting considerations.
  • Updates the README’s ADR count from 125 to 126.
File Description
README.md Updates both documented ADR counts.
docs/​adr/​0127-relay-neos-log-through-morpheus.md Adds the proposed relay decision, rationale, and implementation requirements.

Review effort: Balanced

@Gerrrt
Gerrrt enabled auto-merge (squash) November 23, 2026 15:06
…ore gap

Review of #1659 found the firewall's Loki rules select by app alone, so a
line on the neo path tagged filterlog could raise or silence them. ADR-0127
now fixes app for host="neo" in Alloy and scopes those rules to
host="morpheus", as prerequisites of pointing neo at the relay. The quoted
antispoof rule body is replaced by prose, and the restore consequence now
says restore-the-firewall.md has no syslog-ng step and must gain one.

Refs #1659

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit 54ffa08 into main Nov 23, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/adr-neo-remote-syslog branch November 23, 2026 17:27
Gerrrt added a commit that referenced this pull request Nov 23, 2026
…elay rewrite first

Every line on the syslog path carries source="network", so Loki renamed
the regexp's `source` capture to source_extracted and the rule compared
"network": every login to neo, expected or not, would have paged. The
capture is now login_from, and the fixtures carry source: network as
production lines do; the old rule fails all three login cases against
them. ship-firewall-logs.md §10 now makes morpheus's r_host_morpheus
rewrite a checked first step, before Alloy trusts the hostname neo.

Refs #1659

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt added a commit that referenced this pull request Nov 23, 2026
* feat(logs): relay neo's log through morpheus, and keep it out of the firewall's alerts (ADR-0127)

syslog.alloy stores a line as host="neo" only when it arrives on
morpheus's pinned connection with hostname neo, and gives it a fixed
app="routeros" so no tag on that path reads as filterlog, Suricata or
Kea. The firewall's Loki selectors also require host="morpheus". Two
rules read the new stream: SwitchLoginFromUnexpectedSource and
SwitchLogsStopped, the second against a five-minute heartbeat because
Home Assistant's logins came once in four hours.

ship-firewall-logs.md §3 now describes the syslog-ng config that runs,
whose generated source cannot take flags(no-hostname), and §10 is the
neo procedure. restore-the-firewall.md checks both streams come back.
ADR-0127 is accepted, and README's ADR count is corrected to 127.

Refs #1659

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(logs): capture neo's login address as login_from, and order the relay rewrite first

Every line on the syslog path carries source="network", so Loki renamed
the regexp's `source` capture to source_extracted and the rule compared
"network": every login to neo, expected or not, would have paged. The
capture is now login_from, and the fixtures carry source: network as
production lines do; the old rule fails all three login cases against
them. ship-firewall-logs.md §10 now makes morpheus's r_host_morpheus
rewrite a checked first step, before Alloy trusts the hostname neo.

Refs #1659

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants