Skip to content

docs(trinity): keys-only sshd step, and no host firewall by decision - #1595

Merged
Gerrrt merged 2 commits into
mainfrom
docs/trinity-sshd-and-firewall-stance
Nov 20, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
docs/trinity-sshd-and-firewall-stance

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 20, 2026

Copy link
Copy Markdown
Owner

What changed

build-the-sensitive-tier-host.md §3 gains a keys-only sshd step for trinity (a 10-trinity.conf drop-in that outranks cloud-init's, with root and X11 forwarding refused, authorized_keys trimmed to prometheus and Hicks, and both halves proved). security.md gains a threat row that records "closed at sshd, no host firewall" for trinity as a decision. Nothing changes on the running lab until the step is applied by hand.

Why

The trinity audit of 2026-11-13 found sshd taking passwords, with X11 forwarding on and 17 GitHub-imported keys authorized, for an account in sudo, docker and lxd. The runbook never hardened it. It also found the host-firewall stance unwritten. phoenix took ufw (ADR-0117), but on trinity Docker's rules run ahead of ufw's for 443 and 53, so a policy would only cover 22. The key already closes 22, and the spare firewall is better off without a host policy.

The same audit found two prose slips, both fixed here:

  • hardware.md read ADR-0107's UPS subscription as present tense.
  • converge-the-host.md (and a comment in deploy.rules.yaml) counted ten deploy gauges; converge.sh writes eleven, ci_fallback included.

Blast radius

Docs and one rules-file comment only. When the step is applied, trinity's SSH takes keys only; a missing key in authorized_keys would lock that machine out, which is why the step keeps a session open and proves both halves.

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

Verification

  • python3 scripts/check_docs.py: docs OK — 162 Prometheus + 21 Loki rules, 8 dashboards, 156 panels, 14 assertions.

  • ./scripts/lint.sh: passed, markdownlint included. Four skipped, not run: yamllint, ruff (×2) and ansible-lint, which are unavailable here.

  • make validate was not run. The change is docs plus a YAML comment; CI runs the full suite.

  • make validate passes

  • Deployed to the lab and confirmed working

  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

The 2026-11-13 audit found trinity's sshd taking passwords with X11 on
and 17 GitHub-imported keys. build-the-sensitive-tier-host.md §3 now
writes a 10-trinity.conf drop-in and proves it. security.md records why
trinity has no ufw policy, unlike phoenix (ADR-0117): Docker's rules run
ahead of ufw's for 443 and 53. Also fixes hardware.md's present-tense
reading of ADR-0107 and the deploy gauge count (eleven, not ten).

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

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

The runbook disables password authentication before installing and verifying Hicks’s SSH key, risking lost access, while the security documentation incorrectly marks the undeployed hardening as complete.

2 open issues
What changed in this PR

Documents SSH hardening for trinity, the sensitive-tier host, and records the decision to leave its host firewall disabled. These changes do not alter the running lab; the hardening step requires manual application.

Changes:

  • Adds key-only SSH configuration, authorized-key pruning, and login verification steps.
  • Documents the no-host-firewall decision and records the audit findings.
  • Clarifies the pending UPS shutdown subscription and corrects the deploy-gauge count to eleven.
File Description
stacks/​observability/​prometheus/​rules/​deploy.rules.yaml Corrects the gauge count in a comment; rule behavior is unchanged.
docs/​security.md Adds trinity’s SSH threat and host-firewall decision.
docs/​runbooks/​converge-the-host.md Corrects the documented deploy-gauge count.
docs/​runbooks/​build-the-sensitive-tier-host.md Adds SSH hardening and verification instructions.
docs/​hardware.md Clarifies that UPS-triggered shutdown is not yet configured.
docs/​changelog.md Records the hardening instructions, firewall decision, and prose corrections.

Review effort: Balanced

Comment thread docs/security.md Resolved
…unapplied

Review on #1595: the step disabled passwords before Hicks's key was ever
installed, and security.md called an unapplied control closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit a9e12c9 into main Nov 20, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the docs/trinity-sshd-and-firewall-stance branch November 20, 2026 21:27
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