Repository navigation
[M1.4b2] Agent confirmation verifier and confirmed volume removal - #150
Merged
Merged
Conversation
Signed-off-by: Samuel Mbabhazi <[email protected]>
Signed-off-by: Samuel Mbabhazi <[email protected]>
Signed-off-by: Samuel Mbabhazi <[email protected]>
Signed-off-by: Samuel Mbabhazi <[email protected]>
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.
Closes #135 (with #149).
What changed
M1.4b2: the agent verifies confirmation tokens and removes volumes only with one.
agent/internal/confirm. A Go verifier as strict as the control plane's parser (SPEC 3.6):orgis the agent's own organization, that action and target match, thatiatis at most 60 s ahead and that the token is unexpired.jtiin the journal'sused_confirmationstable.ErrRejected.remove_volumehandler:confirm, verifies and spends avolume.removetoken for exactly that volume. It is not retryable: after an uncertain crash, the operator needs a new confirmation;remove, is idempotent, removes the volume only if it carriessk.managed=trueand treats an already-missing volume as done.volume.removeconfirmations once volumes are resources (M5).How it was tested
alg: none, a reordered header, padding, an extra claim, an unknown claim, whitespace, a longer lifetime, a truncated signature, a signature from another key, oversize. All rejected.gitleaks:allow: they are signed with a fixed, public test seed (0x07…), so they are not secrets.go test -race ./agent/...,golangci-lint(0 issues) and the local gate pass.Security considerations