Date: 2026-06-12
Accepted (design settled in GH #152 triage; implementation tracked there)
The SSF spec expects a GET of a stream’s configuration to return a freshly-minted delivery bearer (rotate-on-GET). goSignals had never implemented it, and a naive implementation has two traps:
Three callers can reach the config read surface: the credential holder (receiver/peer presenting the stream’s delivery bearer), management sessions, and admin tokens. Only the holder should be able to rotate; nobody else should see the live value.
Trigger — proof of possession. Rotation fires only when the GET is
authenticated by the stream’s current server-issued bearer: after
normal JWT validation, the presented Authorization value is
constant-time-compared to the credential stored on the stream record
(PollTransmitMethod / PushReceiveMethod / SSTP responder
SstpMethod). Exact match → mint replacement, persist, return live
value, schedule old for revocation. Anything else that is authorized to
read → masked value, no rotation. Two explicit guards ride on top of
the string match:
StreamIds must
contain the stream being read, and the replacement EAT is always
minted bound to the current stream id(s) ([sid], or
[txSid, rxSid] for SSTP pairs) via the same issuing function the
create path used, with the old JTI as lineage parent (ADR 0007).
Rotation preserves scopes/project and can only tighten, never widen,
the stream binding.Revocation — deferred, with idempotent re-read. At rotation the old
bearer’s token record gets revoked_at = now + grace
(I2SIG_BEARER_ROTATE_GRACE, default 1h, 0 = immediate).
IsRevoked changes from “revoked_at is set” to “revoked_at is set and
in the past” — admin revocation (revoked_at = now) behaves exactly as
before. During the window the old bearer still validates, and a GET
presenting it returns the same current bearer again without minting a
third credential — this is the self-service recovery path for a lost
rotation response. No cluster cache is involved: every node already
checks revocation against Mongo per validation, so deferral is pure
policy, not cache coherence.
Masking — unconditional, sentinel ***. Every credential field
(authorization_header in all delivery methods, SstpMethod’s bearer,
tx_token) reads as the literal *** on every read surface (config
GET, state listings). No env var disables masking. The live value
appears exactly twice in a credential’s life: the create response and
the rotation response. The update path treats an incoming *** as
“leave unchanged” so read-edit-write round-trips cannot clobber live
credentials. Masking is applied to a deep copy, never the stored
record.
Gating. Rotation itself is gated by I2SIG_BEARER_ROTATE_ON_GET,
default false for the first release (existing receivers that re-read
config without persisting the response would otherwise be revoked out
from under themselves). Masking is not gated.
masked: true flag) — rejected: plain
omission is ambiguous with “no bearer configured” (a real state), and
a flag grows the SSF wire schema for a redaction concern.Positive
Negative / accepted trade-offs
I2SIG_BEARER_ROTATE_GRACE=0 closes it entirely.StreamIds wildcard is deliberately left
untouched; binding management tokens to specific SIDs would be a
separate, breaking auth-model change.CONTEXT.md — “Rotate-on-GET”, “Masked credential”, “Rotation
grace”, and the amended management/data-plane carve-out.revoked_at semantics extended to
allow future-dating).HasScope, never bare Eat.