feat(server): report the generators that draw and rotate credentials - #41
Open
JeroenSoeters wants to merge 4 commits into
Open
feat(server): report the generators that draw and rotate credentials#41JeroenSoeters wants to merge 4 commits into
JeroenSoeters wants to merge 4 commits into
Conversation
A generator draws a credential and, when it declares a cadence, rotates it unattended. Nothing in the conversation could see them, so the questions people actually ask about a rotating credential — what rotates, when it last did, what takes its value — had no answer short of the CLI. `list_generators` answers them. It reports each generator's cadence, the instant of its last committed rotation, and the resources bound to it. The drawn value is not among them and cannot be: only the generation's identity and its destinations are projected, so asking what rotates never risks printing a secret. It is not version-gated, unlike the policy tools. Those gates ask the local formae binary its version, but what decides whether generators exist is the agent, and an agent that predates them has none — so its 404 is answered as an empty collection, which is the truthful answer rather than a capability complaint. That also keeps the tool working against a hosted installation, where there may be no local binary to ask. The new skill is its own rather than part of the authoring front door, which is a thin dispatcher that hands deep procedures to focused skills. It is also deliberately not folded into the policy skill: a policy governs a stack, a generator is referenced by the properties that take its value, and the two were separated in the design for that reason. It carries the constraints that actually bite — every destination of a drawing generator must be in the same apply, the cadence floor is one minute, and omitting a cadence draws once and never rotates, which is the replacement for a seed pinned with setOnce. It also states plainly that a resource consuming a generator-fed secret by reference does not yet follow a rotation, so nobody promises a user rotation that leaves the consuming side stale.
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.
Summary
A generator draws a credential and, when it declares a cadence, rotates it
unattended. Nothing in the conversation could see them, so the questions people
actually ask about a rotating credential had no answer short of dropping to the
CLI: what rotates, when did it last, what takes its value.
list_generatorsanswers those. It reports each generator's cadence, theinstant of its last committed rotation, and the resources bound to it. The drawn
value is not among them and cannot be — only the generation's identity and its
destinations are projected — so asking what rotates never risks printing a
secret.
Two decisions worth reviewing
Not version-gated, unlike the policy tools. Those gates ask the local
formae binary its version, but what decides whether generators exist is the
agent. An agent predating the feature has none, so its 404 is answered as an
empty collection: the truthful answer rather than a capability complaint. That
also keeps the tool working against a hosted installation, where there may be no
local binary to ask.
A new skill rather than an addition to the authoring front door. That front
door is explicitly a thin dispatcher that hands deep procedures to focused
skills, so it gains one branch pointing at the new one. It is also deliberately
not folded into the policy skill: a policy governs a stack, a generator is
referenced by the properties that take its value, and those were separated in
the design for exactly that reason.
The skill carries the constraints that actually bite rather than a tour of the
feature: every destination of a drawing generator has to be in the same apply,
the cadence floor is one minute, and omitting a cadence draws once and never
rotates — which is the direct replacement for a seed pinned with
setOnce.One thing stated plainly rather than glossed
A resource consuming a generator-fed secret by reference does not yet follow a
rotation: the secret is updated and the referencing resource is not, until the
next ordinary apply. The skill says so, in the terms a user would feel it —
rotating a database password leaves the database expecting the old one — so that
nobody promises rotation that leaves the consuming side stale.
Tests
list_generatorsis registered in the shared collection matrix, so it inheritsthe whole contract those endpoints are held to rather than getting its own
partial version. Its tool tests assert the cadence and the bound destination as
well as the label, because a projection that dropped either would still contain
the label.