Released: TBD Compare: v0.12.0-alpha.12…v0.12.0-alpha.13
alpha.13 is the community half of the SSTP single-cycle consolidation
(planning PRD #49, ADR-0067). Five community sub-issues land the wire
library — pkg/goSetSstp — and migrate every community SSTP surface onto it:
the dialer relocates out of the router, verification and classification move
into pkg, the acceptor and inbound half both consume the same primitives, and
goSsfUtils grows an SSTP-pair provisioning helper. Enterprise and admin pin
this tag to complete the family-wide migration.
The headline is pkg/goSetSstp (#238, PR #244) — the ADR-0067 single-cycle
transport primitives: dialer Exchange, acceptor CheckExchangeRequest /
ParseExchangeRequest / WriteExchangeResponse with the 405/415 pre-body and
413/400 post-body gates, VerifySET (JWKS) and VerifySETX5C (bundle CA;
iss == URN cert) returning a VerifiedSET that carries the parsed token so
consumers avoid a re-parse, four errors.Is-compatible sentinels, and total
per-JTI ClassifySetErr / LookupSetErrClass against the eight v1 Problem*
URI constants. Four community migrations land in the same round (#241 loop
relocation, #242 credential-chain + PeerServerAlias persistence, #243 dialer
inbound half + literal-ack + jitter + sign-error, #240 business acceptor +
goSsfUtils.CreateSstpPair) — enterprise and admin’s own migrations follow in
their wave-2 slices and re-pin community at this tag.
alpha.13 also finishes the planning#48 ADR-0066 security hardening on this
repo (#234, #235 — merged 07-15 during the alpha.13 window) and refreshes the
Go toolchain to 1.25.5. The SSF wire and metering shapes are unchanged; the
retention drive-loop path from alpha.11/alpha.12 is untouched. The family
continues to ship byte-matched at the tag (v0.12.0-alpha.13).
pkg/goSetSstp single-cycle exchange, verification, classificationeb8edc0; impl 5f45786). The ADR-0067 single-cycle
transport library. Dialer Exchange(ctx, DialerConfig{EndpointURL,
HTTPClient, ResolveClient, Method, ContentType, ExpectedStatus}) posts a
signed request and returns the peer’s response envelope in one call.
Acceptor splits into three primitives — CheckExchangeRequest (mux 405
and 415 gates, media-type-parameter tolerant), ParseExchangeRequest (413
body cap in bounded mode, 400 on malformed JSON, uncapped-body mode for the
ack-only cycle), and WriteExchangeResponse — with the gate order pinned
mux 405 → Check(415) → pair-404 → bearer-401 → Parse(400/413) so the
handler never reads a body before it has authenticated.pkg. VerifySET(cfg, tokenString) (JWKS) and
VerifySETX5C(cfg, tokenString) (bundle-CA + iss == URN cert-subject
match) return a VerifiedSET carrying the parsed token so consumers no
longer re-parse the JWT. Four errors.Is-compatible sentinels —
ErrBadSignature / ErrUnknownKey / ErrWrongAudience /
ErrIssuerCertMismatch — replace the ad-hoc string-matching that used to
drive classification in three different repos.ClassifySetErr / LookupSetErrClass
promote the eight v1 Problem* URI constants from the enterprise/admin
control-set tables into pkg/goSetSstp (ProblemBadSignature,
ProblemUnknownKey, ProblemWrongAudience, ProblemIssuerCertMismatch,
ProblemMalformed, ProblemBadAudience, ProblemEventsNotAllowedForPurpose,
and the non-retryable fallback). An unregistered SetErr code classifies as
ClassSetErrNonRetryable and parks the JTI; retryables leave the claim held
for the next cycle.acceptor_test.go, dialer_test.go, verify_test.go,
verify_x5c_test.go, problem_test.go, problem_diff_test.go pin the gate
order, the sentinel/error-Is semantics, and the classification table.internal/server, narrow router surface
(PR #244, merge eb8edc0; impl 2b0b2c9). Structural refactor with
behavior parity. SstpDialer — owning the per-pair loop, lease
acquire/renew, backoff/idle cadence, ack bookkeeping, and
pushWhilePollHeld — relocates from internal/eventRouter/delivery/sstp.go
and internal/eventRouter/runner_sstp.go to
internal/server/sstp_dialer.go, and calls pkg/goSetSstp.Exchange once
per cycle.SstpOutbound
surface (WakeCh, RefreshPair, ClaimOutbound, ResolveEvents,
AckOutbound, ReleaseOutbound/Jtis, PauseOutbound, LoadSigningKey,
BackfillBatch, Ctx, SstpSecondPushInFlight) and consumes the inverse
SstpDialerHooks (RegisterPair/UnregisterPair). application.go
wires the dialer as RouterDeps.SstpDialerHooks and binds the router as
its SstpOutbound post-construction — a two-step because startup
UpdateStreamState iteration fires RegisterPair before the router is
available, so pending pairs queue and drain on Bind.runner_sstp.go and delivery/sstp.go (852 + 324
deleted lines) plus their tests are gone — nothing dead-linked.PeerServerAlias persistencePeerServerAlias persistence
(PR #244, merge eb8edc0; impl a83269d). Extracts the outbound
credential-selection chain from api_receiver.go into
internal/server.ResolveTransmitterClient — one named helper every
dial-out path uses. Push delivery keeps its behavior verbatim (strict
extraction); the SSTP dialer starts calling it, so PeerServerAlias-
configured TLS/OAuth transport posture now applies to SSTP cycles too.Authorization header; a resolved Server contributes posture only when a
bearer is stored, and its own credential drives Authorization only when
no bearer is stored. Control streams stay excluded (mTLS-only, ADR-0063).model.SstpMethod.PeerServerAlias field (json+
bson) is persisted in CreateSstpPair at pair creation; the dialer wires
cfg.ResolveClient in application.go with a resolver-error fallback to
the inline HTTPClient + raw bearer so a mis-configured resolver cannot
black-hole outbound traffic.eb8edc0; impl 009da51). Four contract fixes on the
relocated dialer.
runCycleLoop now owns per-pair
pendingAcks, appended after each successful HandleInboundEvent and
cleared only on a peer-accepted (200) response — a second push carries no
Ack, avoiding a two-goroutine race with the ack-map writer.pkg/goSetSstp. runInboundHalf builds a
JWKS-backed VerifyConfig via SstpOutbound.InboundVerifyConfig
(ExpectedIssuer/ExpectedAudiences from rec.SstpInbound, JWKS from
StreamService.GetIssuerJwksForReceiver, AllowedAlgs defaulted to
{RS256, ES256, EdDSA} per ADR-0066); response-carried SETs verify via
goSetSstp.VerifySET and the VerifiedSET.Token feeds
router.HandleEvent via SstpOutbound.HandleInboundEvent — no re-parse.handleSstpAcks; an omitted or empty ack list confirms nothing and
every sent SET has its in-flight claim released for the next cycle. No
compatibility knob.jitteredSstpBackoff applies a ±25%
uniform-in-[0.75, 1.25] factor to the sleep-now value; the stored
exponential ladder stays unjittered so it grows monotonically (matches
enterprise sstpconnector.JitterFraction).buildSstpSets now returns
(map, error) on any per-JTI signing failure or missing key for a
publish-mode pair; deliver surfaces signErr and
runCycle/pushWhilePollHeld halt the dial cycle (release claim + pause
outbound + return exit=true) before any HTTP request is issued. No
unsigned SET ever leaves the process.goSsfUtils.CreateSstpPaireb8edc0; impl 7171703). Migrates the community
business-stream SSTP acceptor onto pkg/goSetSstp Check/Parse/Write and
switches SET ingest to VerifySET; resolves the pair once at the
handler edge. api_sstp.go gate order is now pinned exactly as the pkg
contract: Check (405/415) → pair-404 → bearer-401 → Parse (400/413) with
no pre-auth body read. Local HTTP parse/write duplication is deleted.verifySstpInboundSets +
classifyVerifyErrorForAcceptor map the four VerifySET sentinels
(ErrBadSignature / ErrUnknownKey / ErrWrongAudience /
ErrIssuerCertMismatch) to jwtIss / jwtAud / jws / jwtCrypto SetErr
codes.eventRouter.SstpServerHandler’s signature now
takes the pre-resolved *StreamStateRecord and returns only Message; the
double GetStreamStateByPairId lookup at api_sstp.go:62 +
runner_sstp_server.go:41 is gone. The admin_surface adapter and the
wake_sstp_test recording double propagate the interface change.goSsfUtils.CreateSstpPair POSTs an
SstpPairBootstrap to the peer’s POST /stream configuration endpoint;
the server discriminates via IsSstpBootstrapBody and dispatches to
createSstpPairHandler (admin consumes this via the next release-train
tag). Per-direction status is intentionally not helper-wrapped — the
existing GetStreamStatus called twice (pairId, SstpInbound.Id)
satisfies the surface with the per-pair bearer covering both SIDs by
construction.Parse + explicit Peek API split (PR #236, merge
f466871). Per ADR-0066 §D3, the trust path is now verify-only at the API
level; unverified inspection survives only under an explicit, greppable
name a reviewer cannot mistake for verification.
goSet.Parse(tokenString, jwks) now returns an error when jwks == nil,
citing ADR-0066 §D3 and pointing callers at Peek — the silent
ParseUnverified fallback is gone.goSet.Peek(tokenString) — explicit UNVERIFIED inspection API for
routing/dispatch only, documented as untrusted, enforcing the
secevent+jwt type header.JWS(method, key) — the key == nil (alg=none) production branch is
removed; no legitimate production producer of unsigned SETs remains.
Tests that need an unsigned wire string construct it directly via the
jwt library.goSetPush/receiver.go + goSetPoll/receiver.go — the token :=
unverified acceptance branch is removed; a missing trust anchor is now a
hard reject (invalid_request, “no trust anchor is configured”) as
defense-in-depth for the §D2 invariant that stream-config validation
enforces upstream.pkg/goSet/test/parse_peek_split_test.go pins the D3 contract.4585557). Every business stream must have at least one
active auth layer — L2 channel auth (bearer/mTLS) or L3 SET-signature
verification against a configured trust root. “None + unverified” is not a
configurable state.
validateBusinessStreamSecurity(cfg) captures the invariant
positively: L2=bearer needs no trust root; L2=None (SigningOnly=true)
makes a trust root (Iss + IssuerJWKSUrl) mandatory, and the “NONE”
sentinel (case-insensitive) is rejected explicitly.normalizeStreamTrustFields(cfg) applies “NONE” → “” normalization
consistently in both CreateStream and UpdateStream (previously only
create).LoadReceiverStreams runs a fail-closed startup guard: any persisted
receiver stream that violates the invariant (from an older validator) is
marked disabled with a clear operator-visible error before it can serve
traffic — covering both the primary StreamConfiguration and the
SstpInbound leg of an SSTP pair.pkg/services/stream_service_adr0066_invariant_test.go pins the
positive/negative decision matrix and the fail-closed startup behavior.0e04de9). go.mod
toolchain moves to 1.25.5; go get -u ./... bump of direct and indirect
dependencies. make seams, go test -race ./..., and go vet ./...
green on the refreshed set. No behavior change.pkg/goSetSstp library and the four migration seams are the community
half of planning PRD #49 (SSTP exchange consolidation, ADR-0067) —
wave 1 of three waves. Enterprise wave 2 (sstpconnector.Exchange.post,
tenancystream.Module.post, sstpaccceptor handlers) and admin wave 2
(business acceptor migration onto goSetSstp Check/Parse/Write, dispatcher
onto goSsfUtils.CreateSstpPair) both pin community at this tag. Wave 3
(enterprise joint SSTP e2e drift guard) landed against the wave-2 pins.v0.12.0-alpha.13). Enterprise, admin, tenancy, and billing-sidecar
publish paired notes for this tag.go test -race ./... is green module-wide, go vet ./... is clean, and
gofmt -l reports nothing. make seams passes with the ephemeral go.work
created and removed. New coverage this window: pkg/goSetSstp/{acceptor,
dialer,verify,verify_x5c,problem,problem_diff}_test.go (single-cycle
primitives + sentinel/error-Is + classification table),
pkg/goSsfUtils/ssfUtils_test.go (SSTP-pair bootstrap POST + discriminator),
internal/server/sstp_dialer_test.go (relocated loop, per-pair pendingAcks,
literal-ack semantics, jitter fraction, hard-halt on sign-error),
internal/server/transmitter_credential_chain_test.go (helper +
PeerServerAlias posture + resolver-error fallback),
internal/server/api_sstp_test.go (gate order pin, pre-resolved
StreamStateRecord), pkg/goSet/test/parse_peek_split_test.go (ADR-0066 D3
contract), and pkg/services/stream_service_adr0066_invariant_test.go
(ADR-0066 D2 invariant + fail-closed startup guard). The baseline
.prd-49-baseline-tests.txt on release-0.12.0 HEAD 4585557 was all-green
before wave 1 landed; no pre-existing failures were carried in.