Skip to content

feat(artifacts): serve trusted roots by root key id - #711

Merged
harlan-zw merged 4 commits into
mainfrom
feat/trusted-roots-by-id
Nov 18, 2026
Merged

harlan-zw merged 4 commits into
mainfrom
feat/trusted-roots-by-id

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Signing key rotation for skilld-production-2026-08, which closes 2026-11-20T00:00Z. No GitHub issue. Pairs with the skilld CLI 3.7.0 pull request.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

The private key for the trusted root skilld-root-2026 is lost, so that root can never list a new signing key. Every released CLI pins that root and reads it from /api/v1/trusted-root. skilld CLI 3.7.0 pins two new roots, skilld-root-2026-11 and skilld-root-backup-2026-11, and fetches each one by id.

This PR:

  • Serves GET /api/v1/trusted-roots/{rootKeyId} from a new ARTIFACT_TRUSTED_ROOTS_JSON secret, a JSON array of roots. An unknown id answers 404.
  • Verifies attestations with the first served root. It falls back to ARTIFACT_TRUSTED_ROOT_JSON while the new secret is unset, so the deploy order does not matter. /api/v1/trusted-root is unchanged for older CLIs.
  • Adds create-root to the ceremony tool, which starts a root under a new root key with its first signing key.
  • Points the skilld.signing-key check-in at the new route.
  • Adds a "trusted root" glossary entry, and records in the runbook where each root key lives.
flowchart LR
  old["CLI 3.0.0 to 3.6.9<br/>pins skilld-root-2026"] -->|GET /api/v1/trusted-root| legacy["ARTIFACT_TRUSTED_ROOT_JSON"]
  new["CLI 3.7.0<br/>pins skilld-root-2026-11, then backup"] -->|"GET /api/v1/trusted-roots/{rootKeyId}"| served["ARTIFACT_TRUSTED_ROOTS_JSON"]
  served -->|first root| verify["site verifies attestations"]
  legacy -.->|until the new secret is set| verify
Loading

📝 Migration

Put ARTIFACT_TRUSTED_ROOTS_JSON before this deploys, so /api/v1/trusted-roots/skilld-root-2026-11 answers on the first request. Both roots must pass scripts/trusted-root.ts verify, and their root private keys must be escrowed first.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

The private key for the root skilld-root-2026 is lost, so that root can
never list a new signing key, and skilld-production-2026-08 closes on
2026-11-20. skilld CLI 3.7.0 pins new roots and fetches each one by id
from /api/v1/trusted-roots/{rootKeyId}, while older CLIs keep reading
/api/v1/trusted-root.

The site verifies with the first served root and falls back to the
legacy root until ARTIFACT_TRUSTED_ROOTS_JSON is set. The ceremony tool
gains create-root, and the runbook records where each root key lives.
@harlan-github-agent

harlan-github-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-11-18 13:28 UTC.

GitHub merged this pull request.

  • Logged (79/100): An invalid rollout root can strand queued Resolutions after the queue exhausts its retries. View code Optional follow-up: Route trust configuration errors through the existing per-message failure and cleanup path while keeping signature verification closed.
    • Ask an agent to verify and fix this finding
  • Logged (75/100): The signing check-in loses coverage during the documented backup-only failover. View code Optional follow-up: Check both endpoints, evaluate coverage in backup-only mode, and report backup availability separately.
    • Ask an agent to verify and fix this finding
  • Logged (74/100): The runbook's pre-upload verification command cannot validate the file it tells operators to publish. View code Optional follow-up: Verify the exact array against ordered independent pins before uploading it, and document a command that performs that check.
    • Ask an agent to verify and fix this finding
  • Logged (73/100): The default verification path can claim a live root matches the CLI pin without checking an independent pin. View code Optional follow-up: Require an independently supplied pin for verification or use a separately maintained copy of the compiled pin.
    • Ask an agent to verify and fix this finding
  • Logged (63/100): The runbook can retire the old key while pre-switch builds still need it. View code Optional follow-up: Require the pre-switch Resolution backlog to drain before removing the old entry.
    • Ask an agent to verify and fix this finding
  • Logged (60/100): Ceremony verification accepts primary and backup roots backed by the same key. View code Optional follow-up: Require distinct root public keys as well as distinct root IDs when verifying a rollout set.
    • Ask an agent to verify and fix this finding
  • Logged (57/100): The ceremony can approve a root ID that clients cannot address through the new endpoint. View code Optional follow-up: Enforce a URL-segment-safe ID format for roots created and served by ID.
    • Ask an agent to verify and fix this finding
  • Logged (55/100): An empty peer argument silently disables the backup verification gate. View code Optional follow-up: Detect whether either peer flag was supplied and require both values to be nonempty.
    • Ask an agent to verify and fix this finding
  • Logged (30/100): Coverage verification can reject identical signer sets that use different entry orders. View code Optional follow-up: Compare exact key IDs with a deterministic ordering or compare entries through a map keyed by ID.
    • Ask an agent to verify and fix this finding
  • Logged (22/100): The ceremony help misstates which key material the command creates. View code Optional follow-up: Describe the single generated pair and explain how to obtain the offline root key separately.
    • Ask an agent to verify and fix this finding
  • Logged (18/100): The glossary gives the wrong trust-root lookup model for both CLI generations. View code Optional follow-up: Describe the legacy lookup and the primary and backup pins used by current clients.
    • Ask an agent to verify and fix this finding

42ead0fb-a3cf-4d7c-b85b-c69708b03298

Selected findings run after merge and open separate pull requests.

@harlan-github-agent harlan-github-agent Bot added the harlan-agent-blocked The automated Review found a material defect in this head commit. label Nov 18, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

The opt-in step that published roots and staged the signing secret
through Actions secrets carried every remaining review blocker, and this
rotation never uses it. The runbook stages both secrets with wrangler,
as before, and sets the signer switch at 2026-11-19T20:00Z.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. labels Nov 18, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit 47ea1d2 into main Nov 18, 2026
8 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Nov 18, 2026
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.

1 participant