Skip to content

feat(blackbox): verify mjolnir's card against the estate CA - #1729

Merged
Gerrrt merged 4 commits into
mainfrom
feat/mjolnir-card-probe-verifies
Nov 24, 2026
Merged

Gerrrt merged 4 commits into
mainfrom
feat/mjolnir-card-probe-verifies

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What changed

  • targets/blackbox.yaml: the ups-ui target, https://10.0.99.10/, moves from http_2xx_self_signed to http_2xx_lab_ca.

  • docs/runbooks/generate-certificates.md: The APC card's leaf is rewritten from what actually worked on 2026-11-24:

    • an RSA 2048 key made on the card (ssl key -rsa 2048);
    • uploads go to the card's root (:nmc.crt), and the import is ssl cert -i nmc.crt;
    • a reboot -Y after the import;
    • a curl --cacert check, because openssl s_client reports Verify return code: 0 even when the handshake then fails.

    It also gains how to roll back, and the Renewal paragraph no longer calls the card self-signed.

  • blackbox.yaml comments, observability.md and hardware.md: no longer describe the card as self-signed.

  • docs/changelog.md: an entry for the leaf and the ECDSA failure.

Why

This is audit item 11. The card now serves a leaf from the estate CA, so its probe should verify it. Otherwise a factory reset or a lapse back to a self-signed certificate would pass silently.

Blast radius

The probe changes from skipping verification to verifying against ca.pem. It passes today. If the card's certificate stops verifying, EndpointUnreachable fires for ups-ui, which is the intent. No other target changes.

Verification

  • The card serves the leaf. curl --cacert certificates/ca.pem https://10.0.99.10/ returns 200, and openssl s_client negotiates TLS 1.3, TLS_AES_128_GCM_SHA256, with Verify return code: 0.
  • The live blackbox exporter, run with module=http_2xx_lab_ca against the card: probe_success 1, HTTP 200, TLS 1.3, and the expiry read.
  • After the card's reboot, SNMP up is 1, upsConfigLowBattTime is 16, and NUT reads OL with all three clients. Card alerts are clear and the silences are deleted.
  • check_docs.py, lint.sh and promtool test rules tests/blackbox.test.yaml pass locally.

🤖 Generated with Claude Code

The card serves mjolnir.matrix.elysium from the estate CA since
2026-11-24, for an RSA 2048 key made on the card. The ups-ui probe moves
from http_2xx_self_signed to http_2xx_lab_ca, so a lapsed or factory-reset
certificate fails it. generate-certificates.md now records the steps that
worked: an RSA key, because the card drops every handshake when an ECDSA key
sits under this CA's RSA signature; uploads land in the card's root; and a
reboot -Y after import.

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

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’s check does not follow the documented redirect, so a healthy endpoint can report 303 instead of the required 200; add --location to match the blackbox module’s behavior.

1 open issue
What changed in this PR

This PR makes the ups-ui probe verify mjolnir’s APC card certificate against the estate CA, so an untrusted or factory-reset certificate triggers an alert.

Changes:

  • Switches only ups-ui to the CA-verifying blackbox module.
  • Updates the certificate runbook with RSA key generation, corrected import steps, reboot, verification, and rollback.
  • Refreshes documentation and records the certificate deployment and ECDSA failure.
File Description
stacks/​observability/​prometheus/​targets/​blackbox.yaml Enables CA verification for ups-ui.
stacks/​observability/​blackbox/​blackbox.yaml Updates comments about self-signed endpoints.
docs/​runbooks/​generate-certificates.md Documents the working APC certificate procedure and recovery.
docs/​observability.md Describes CA verification of the APC certificate.
docs/​hardware.md Records the card’s CA-issued certificate and verified probe.
docs/​changelog.md Records deployment results and the ECDSA handshake failure.

Review effort: Balanced

Comment thread docs/runbooks/generate-certificates.md Resolved
Gerrrt and others added 3 commits November 24, 2026 22:22
… by decision

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the card leaf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit b1a051c into main Nov 24, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the feat/mjolnir-card-probe-verifies branch November 24, 2026 23:00
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