Skip to content

docs(osapi): plan the per-agent public key store - #134

Merged
retr0h merged 1 commit into
mainfrom
feat/agent-key-store-plan
Sep 18, 2026
Merged

retr0h merged 1 commit into
mainfrom
feat/agent-key-store-plan

Conversation

@retr0h

@retr0h retr0h commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Stage 3 for 002-agent-key-store: plan, research, data model, contract, quickstart.

Key decisions

Decision Why
Store in the existing enrollment bucket under an accepted. prefix Acceptance is the only writer, and the watcher already holds that handle. No new bucket, config field or provisioning step to forget.
Keyed by machine ID Enrollment already identifies by machine ID; hostname is the thing being attacked, so it becomes a claim to check, not an identifier.
Rotation stores a superseded key plus an expiry instant Mirrors VerifyWithGrace and RotationGracePeriod for the controller key — one rotation concept, not two. An instant means a restart cannot extend the window.
No new config flag ControllerPKI.Enabled and AgentPKI.Enabled already say they cover signing. This makes that true rather than adding a third state.
Cache lookups, invalidate on accept and remove Verification sits on the heartbeat path. Event invalidation rather than a TTL, because a TTL would leave a removed agent verifying (FR-008 forbids it).

One thing worth a reviewer's eye: AgentRegistration already carries a Fingerprint the agent fills in itself, and nothing checks it. That self-reported field is the shape of GHSA-j73r. The plan treats the stored key as the authority and the fingerprint as a claim that must match it.

Rejected, recorded in research.md: storing the key on the registration record (the attacker would supply their own validator), a new dedicated bucket, a key-history list, and no grace period.

Constitution check passes on all five principles, so Complexity Tracking is omitted rather than left empty.

Next: /speckit-tasks.

🤖 Generated with Claude Code

Store the accepted key in the existing enrollment bucket under a second
prefix, keyed by machine ID, written only at acceptance. Verify job
responses and registrations against it, and keep unverified
registrations out of target resolution so a hostname cannot be claimed
by a machine that never enrolled under it.

Rotation mirrors the controller key: a superseded key with an expiry
instant, not a duration. Enforcement uses the PKI flags that already
exist and already claim to cover signing, so no new knob appears and an
upgrade changes nothing until an operator turns it on.

No constitution violations, so Complexity Tracking is omitted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
@github-actions

Copy link
Copy Markdown

Thank you for contributing to this project! 😊🕹️

@retr0h
retr0h merged commit 087d045 into main Sep 18, 2026
6 checks passed
@retr0h
retr0h deleted the feat/agent-key-store-plan branch September 18, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant