i2goSignals

goSignals

25. Strict-spec SSF transmitter mode for goSsfServer (I2SIG_STRICT_SSF)

Date: 2026-06-22

Status

Accepted (PRD #196 — Strict-mode SSF transmitter). Builds on ADR 0023 (local-issuer addressing) and ADR 0024 (transmitter-assigned identity).

Context

cmd/goSsfServer is the standalone SSF-server simulator — a minimal transmitter we stand up to behave like a properly-administered, third-party SSF transmitter (the way the OpenID conformance suite expects one). In that deployment the issuer is declared by an administrator: a single value is both the discovery issuer and the JWKS key name, and jwks_uri is derived from it (ADR 0023). A receiver fetches /.well-known/ssf-configuration/<issuer> (RFC 8615 path insertion), confirms iss equals that issuer, and fetches jwks_uri to verify SETs.

For that to hold, the issuer’s signing key must exist before the server advertises discovery. goSsfServer previously relied on InitializeTokenKey to seed the default-issuer key — but that seeding happens only on first init (it short-circuits once the token key already exists), so an issuer added to an established deployment, or a server whose issuer was never explicitly declared, would advertise an issuer it cannot sign for and /.well-known/ssf-configuration/<issuer> would 404. In the conformance runs this was papered over by setting I2SIG_ISSUER_DEFAULT to a path-bearing issuer and letting first-init create the key — workable, but implicit and fragile.

This ADR is deliberately narrow. It does not change the /stream registration contract for any binary: stream creation stays ADR 0024 presence-based everywhere (a caller-asserted iss/aud is honored, an absent one is minted), which goSignals cluster federation depends on. The only thing strict mode does is make the goSsfServer simulator provision its declared issuer deterministically.

Decision

Introduce an opt-in posture switch I2SIG_STRICT_SSF (services.StrictSsfEnabled(), truthy = true/1/enabled/yes), scoped to cmd/goSsfServer. It is off by default. cmd/goSignalsServer (the full cluster server) does not consult it; the stream-management API is unchanged for both binaries.

When on, cmd/goSsfServer calls SsfApplication.ProvisionStrictMode at startup, which:

  1. Requires an administrator-declared issuer (fail-fast). I2SIG_ISSUER_DEFAULT must be set to an absolute http(s) issuer URL — the base-URL / DEFAULT fallback that the default mode accepts is refused and the server exits. In strict mode the operator declares the issuer explicitly, the way the conformance harness configures it.

  2. Idempotently provisions that issuer’s SET-signing key via the new KeyService.EnsureSigningKey, which (unlike InitializeTokenKey) re-checks on every call and is therefore restart-safe and late-add-safe. This binds iss == discovery issuer == JWKS key name (ADR 0023), so the issuer-specific discovery endpoint and /jwks/<path> resolve and emitted SETs sign under the declared issuer.

The returned error is fatal: the server must not begin advertising an issuer it cannot sign for.

Considered alternatives

Consequences

Positive

Negative / accepted trade-offs