Repository navigation
feat(certs): sign a device's own CSR, for mjolnir's card - #1723
Merged
Merged
Conversation
gen-certs.sh --csr <file> signs a certificate signing request made on another device, so the key never leaves it. The CA sets the subject and SANs, x509 -req copies no extensions from the request, and a request whose self-signature fails is refused. generate-certificates.md gets the APC card's steps: ssl csr -q on the card, sign, ssl cert -i, verify, then switch the ups-ui probe to http_2xx_lab_ca. hardware.md records boot monitor 2.1.0.3, which the owner read on the card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The normal issuance path can overwrite an existing CSR-issued certificate without --force, replacing it with one whose key does not match the card and preventing import.
1 open issue
What changed in this PR
Adds device-generated CSR signing to the lab certificate workflow, enabling mjolnir’s APC card to use a lab-CA certificate without exporting its private key.
Changes:
- Adds
--csrsupport with request-signature validation, CA-controlled identities, and overwrite protection. - Documents card certificate issuance, import, verification, and the later probe cutover.
- Records the card’s boot monitor version and the new signing workflow.
| File | Description |
|---|---|
scripts/gen-certs.sh |
Adds CSR signing without generating a local private key. |
docs/runbooks/generate-certificates.md |
Adds APC certificate installation, verification, and recovery steps. |
docs/hardware.md |
Records boot monitor version 2.1.0.3. |
docs/changelog.md |
Records the version confirmation and CSR-signing support. |
Review effort: Balanced
…ng path without --force Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed
scripts/gen-certs.sh: new--csr <file>, used with--host. It signs a CSR made on another device and writes no key./CN=<host>/O=matrix.elysiumand the SANs from--ip/--dns.x509 -reqcopies no extensions from the request, so the device can't choose its own names.--force.docs/runbooks/generate-certificates.md: a new section, The APC card's leaf. It coversssl csr -qon the card, signing,ssl cert -i, anopenssl s_client -verify_return_errorcheck, then switching theups-uiprobe tohttp_2xx_lab_ca.docs/hardware.md: the card runs boot monitor 2.1.0.3, which the owner read on its About → Network page.docs/changelog.md: entries for both.Why
This was audit item 11: the card serves its factory self-signed certificate. The card can make a key and CSR and import a signed certificate from its CLI, so its key never needs to leave it.
gen-certs.shcould only sign keys it generated itself.Blast radius
The script change touches only the new flag's path. The card and the probe are unchanged until the runbook steps are run; the probe switch comes in a follow-up PR once the certificate is served.
Verification
bash -nandshellcheckare clean.--csrissues a certificate with our subject and SANs, ignores a SAN the CSR asked for, writes no key, and verifies against the CA.--forcerefuses, and so does a junk CSR or--csrwithout--host.check_docs.pyandlint.shpass locally.🤖 Generated with Claude Code