Repository navigation
[M1.2-fix] Gateway TLS, clock skew and renewal durability follow-ups - #103
Merged
Merged
Conversation
6 tasks done
samuelmbabhazi
force-pushed
the
feat/m1.2c4b-agent-daemon
branch
from
November 5, 2026 14:32
496a893 to
b6b7230
Compare
samuelmbabhazi
changed the base branch from
feat/m1.2c4b-agent-daemon
to
main
November 5, 2026 14:32
samuelmbabhazi
force-pushed
the
fix/m1.2-review-follow-ups
branch
from
November 5, 2026 14:33
60df90c to
fe0cea4
Compare
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.
Task
Review follow-ups for the M1.2 stack (#31, #33, #35). Stacked on #36. Refs #14
What changed
Gateway TLS (#31)
gatewaySecureContext()holds every TLS setting and is used both when the server starts and at the daily certificate refresh. Node'ssetSecureContextresets any option it is not given. Before this fix, the first refresh silently dropped the gateway from TLS 1.3 to Node's TLS 1.2 default, where client certificates travel unencrypted.Certificates and enrollment errors (#31, #33)
CLOCK_SKEW_ALLOWANCE_MS). The 30-day validity still runs from issuance.enrolling. During renewal, the same skew bricked the node.InvalidInputError(gRPC InvalidArgument) instead ofConflictError(AlreadyExists).node_name_takeninstead of a raw P2002 mapped to Internal.Agent renewal durability (#35)
RenewCertificateand the following save run undercontext.WithoutCancelwith a 30 s budget. A SIGTERM during renewal no longer cancels an RPC the server may already have committed.How it was tested
nx run-many -t lint typecheck test -p apipasses, with new and updated tests for TLS settings, backdated node and gateway certificates, and the oversized-CSR error kind.go test -race ./agent/... ./lib/...andgolangci-lintpass. New tests: a renewal survives two failed saves and is persisted afterwards; a renewal started after cancellation still completes and is persisted.Security considerations
Restores the TLS 1.3-only guarantee of the agent gateway. Backdating by 5 minutes slightly extends the validity window into the past and does not change expiry. No change to the action catalogue.
Checklist