i2goSignals

goSignals

Synchronous SET Transfer Protocol (SSTP)

SSTP is goSignals’ third SET delivery method, alongside RFC 8935 push and RFC 8936 poll. It is defined by draft-hunt-secevent-sstp-00 (docs/specs/draft-hunt-secevent-sstp-00.txt) and lets two nodes exchange SETs in both directions over a single HTTP request/response cycle: the initiator’s outbound SETs ride the request body while it long-polls for the responder’s inbound SETs in the response.

Unlike push and poll — each a single direction modelled by one StreamStateRecord — an SSTP pair is one bidirectional relationship. This doc covers the pair model, bootstrap, the peer cascade, per-direction mode, pair status semantics, and the operator runbook. The wire format and error taxonomy live in pkg/goSetSstp and the source spec.

The focused per-direction status/verify runbook (formerly a standalone rider doc) is folded into this document — see the operator runbook.

Why SSTP

Push and poll each model one direction. A bidirectional relationship between two nodes therefore needs two streams per node — four stream IDs, two bearers, two endpoint URLs, two lease owners across the pair. SSTP collapses that to one logical pair per relationship, carried over a single HTTP cycle, halving the management surface. It suits peers that want a symmetric, firewall-friendly exchange where the initiator dials out and both directions multiplex on the one connection.

The pair model

An SSTP pair is one StreamStateRecord per node, carrying both directions (ADR 0018):

Concept Where it lives Notes
txSid (transmit / outbound) primary StreamConfiguration.Id Aliased to the Mongo _id and to PairId. Its Delivery is a marker only (urn:i2-open:secevent:delivery:sstp).
rxSid (receive / inbound) SstpInbound.Id Its Delivery is a marker only (urn:i2-open:secevent:delivery:sstp:receive).
PairId PairId A fresh ObjectID hex; the on-wire SSF stream_id and the {id} in POST /sstp/{id}. Equals txSid.
Pair-scoped connectivity SstpMethod Role, EndpointUrl, AuthorizationHeader, PeerPairId. Secrets/endpoints live here, not in the per-direction Delivery objects, so SSF discovery/management responses never leak per-pair credentials.
Pair status Status/ErrorMsg (tx) and InboundStatus/InboundErrorMsg (rx) Every status write — enabled, paused, disabled — moves both halves, because the two directions share one HTTP exchange (the same single status a push or poll stream has).

GetType() returns the goSignals-internal discriminator DeliverySstpPair whenever SstpMethod is set. That is not an SSF wire URN — the advertised URN is urn:i2-open:secevent:delivery:sstp, published unconditionally in delivery_methods_supported on every server’s .well-known/ssf-configuration so peers can discover SSTP support without per-server config.

Two DAO accessors locate a pair: FindByPairId(pairId) and FindByInboundSID(sid), both backed by sparse-unique Mongo indexes (pair_id, sstp_inbound.id). Non-SSTP records lack both fields and pay zero index cost.

Roles

Role is required at create with no default — the “both peers responder” misconfiguration is rejected outright.

Bootstrap (P3): the SstpPairBootstrap DTO

A pair is provisioned by POST /stream with a second body shape, SstpPairBootstrap, discriminated on shape alongside the existing StreamConfiguration (ADR 0019). A body is an SSTP bootstrap when it carries a top-level role of initiator/responder together with at least one per-direction primary/inbound object. A malformed body falls through to the StreamConfiguration path. There is no /pairs endpoint — create rides the existing POST /stream surface.

Fields:

StreamService.CreateSstpPair validates and expands the bootstrap:

Peer cascade

When peer_server_alias is present, the service cascades the mirrored bootstrap to the peer using the stored Server credentials (the same foreign-server credential path the rest of goSignals uses; requires admin). The mirror flips the role (initiator↔responder) and swaps the two directions, so the peer’s primary is this node’s inbound. On success the local record records the peer’s PairId in SstpMethod.PeerPairId.

Rollback is role-asymmetric:

Omitting peer_server_alias provisions only the local half; peer connectivity is patched later via UPDATE.

Mode semantics per direction

mode is per direction and maps to the existing RouteMode (SstpModeToRouteMode):

Mode RouteMode Behaviour
FORWARD RouteModeForward Preserve the upstream iss; the SET is forwarded verbatim (no re-sign).
PUBLISH (re-sign) Re-sign with goSignals’ issuer key for that direction (iss/aud from the direction’s config).
IMPORT (local) Keep events local.

Because mode is per direction, a pair can FORWARD outbound while PUBLISH-ing inbound, etc.

Receive mode: the receiving end’s own choice

A direction has two ends, and they read its route mode differently: the transmitting end asks only “FORWARD?” (relay verbatim, or re-sign), the receiving end only “IMPORT?” (keep it, or route it on). With mode alone both ends are written from one word — one node’s transmitter and the peer’s receiver for the same direction — so the four real combinations collapse to three, and “relay verbatim, import only” cannot be expressed.

The optional per-direction receive_mode separates them:

mode (transmitting end) receive_mode (receiving end) Receiving end’s RouteMode
any absent from mode, exactly as before the field existed
any IMPORT IM
any FORWARD FW

PUBLISH is not a valid receive_mode: on receipt it is indistinguishable from FORWARD (ADR 0031 D2).

On a node, the primary is the transmitting end and the inbound half the receiving end. So inbound.receive_mode sets this node’s sstp_inbound.route_mode, while primary.receive_mode is the choice for the peer’s receiving end: the mirror’s whole-direction swap delivers it to the peer as its inbound.receive_mode. A direction without the field marshals without the key, so a bootstrap that omits it — and its mirror — is byte-for-byte unchanged.

The echo is kept truthful on the one side this node owns: a route_mode patch on the inbound SID moves inbound_receive_mode with it. receive_mode (the peer’s choice) is not changed by any local patch, just as a peer is not told of any other local pair update.

Inbound mode governs routing, not just signing

The inbound (rx) mode decides whether an SSTP-ingested SET is routed onward, exactly as the equivalent mode does on an RFC 8935 push receiver:

Inbound mode Routed to other streams?
IMPORT No. The SET is consumed locally — persisted and available to local readers, but never fanned out.
FORWARD Yes, to every matching outbound stream (aud- or explicitly-routed).
PUBLISH Yes, to every matching outbound stream.

FORWARD and PUBLISH are identical on the inbound leg. Both mean “route onward”; the inbound mode does not decide whether the SET is forwarded verbatim or re-signed. That choice belongs to each outbound stream and is made at delivery time from that stream’s own route mode — exactly as on the push path. So an outbound stream in FORWARD mode forwards verbatim even when the inbound direction is PUBLISH, and vice versa. Read the mode table above this section for the signing behaviour of a given direction; read this one only for whether an inbound SET travels further.

This is what makes a two-hop topology work: in A --sstp--> goSignals --sstp--> B, hop 2 happens only when the inbound direction of the A-pair is FORWARD or PUBLISH. Under IMPORT the SET stops at goSignals.

Note the two different “defaults” here. A bootstrap that omits mode maps to PUBLISH (SstpModeToRouteMode), so a newly created pair stores an explicit mode either way. A persisted record whose inbound RouteMode is blank predates per-direction mode; those are treated as IMPORT, which is how they behaved before inbound routing was honoured, so upgrading does not start fanning out their events.

A SET is never routed back out the pair it arrived on, even when that pair’s outbound direction matches it on aud.

Routing also requires the event type to be in the catalog

Mode decides whether an inbound SET travels further; events_delivered decides which SETs any given outbound stream accepts. A direction’s events are negotiated at bootstrap against this server’s supported-event catalog, and the router matches a SET’s event types against the result — so an event type outside the catalog is dropped by every hop regardless of mode.

That matters most for a two-hop topology carrying a custom vocabulary: the SETs arrive, verify, and persist, and then go nowhere. Set I2SIG_EVENT_TYPES_EXTRA on every goSignals node in the path to add those URIs to the catalog — see docs/configuration_properties.md (§ Event) for the format and for how an extended type interacts with I2SIG_STREAM_EVENT_VALIDATION.

Negotiation happens at bootstrap only: PATCH on a pair is a narrow whitelist that does not touch events, so a pair created before the vocabulary was configured has to be recreated to carry it.

Note also that an SSTP direction naming no events forwards nothing (unlike SSF registration, where an omitted events_requested means “everything you support”); a WARN is logged at create.

Delivery runtime

Client (initiator) side

Server (responder) side

Cluster wake-ups

Two routes mirror /_cluster/wake-transmitter, kept separate for telemetry; both reuse the wake-transmitter auth (SPIFFE mTLS peer cert, else the I2SIG_CLUSTER_INTERNAL_TOKEN shared-HMAC bearer) and the same coalescing window:

See docs/Cluster.md for the lease/wake-up internals.

The HTTP endpoint

POST /sstp/{id} where {id} is the PairId (on-wire stream_id):

Operator runbook

Create a pair

From the client (initiator) side; the named server alias’s stored credentials cascade the mirrored half to the responder:

# Symmetric (same iss/aud/events/mode both directions):
goSignals create stream sstp <client-alias> <server-alias> \
    --iss https://issuer.example \
    --aud https://peer.example \
    --events urn:ietf:params:SCIM:event:prov:create:full \
    --mode PUBLISH \
    --name my-pair

# Asymmetric / multi-hop (full SstpPairBootstrap with per-direction primary/inbound):
goSignals create stream sstp <client-alias> <server-alias> \
    --bootstrap-file ./pair.json

Flag note: the asymmetric input flag is --bootstrap-file (not --config — the global --config flag, GOSIGNALS_HOME, already owns that name). A .yaml/.yml extension is parsed as YAML; anything else as JSON. --bootstrap-file and the symmetric flags are mutually exclusive.

The command prints the PairId, both pair SIDs, and the resolved EndpointUrls. The issuing side plays initiator; the named server alias is the responder the bootstrap cascades to.

Status

SSTP pairs appear in the existing flat GET /states listing — there is no /pairs endpoint. Tools expand each pair record into two rows (txSid + rxSid) grouped client-side by PairId.

GET /status?stream_id=<sid> accepts either SID of the pair:

Status writes keep the two halves equal (see below), so both SIDs report the same status and reason.

Pause / resume / disable — pair-level

POST /status accepts either SID too, and every status is pair-level: pausing, resuming (enabled), or disabling through txSid or rxSid moves both directions together. Pausing an SSTP pair pauses its HTTP exchange, so both logical streams stop — consistent with a push or poll stream, which has one status. A paused pair’s POST /sstp/{id} returns 200 with returnEvents=false so the cycle resumes cleanly on unpause. A legacy record whose halves differ heals on its next status write. A one-way (single-direction) pause is not supported today.

UPDATE enforces a patchable-fields whitelist: Role, an already-set EndpointUrl/PeerPairId, and all IDs are immutable, so a live pair can never be accidentally repointed at a different peer. Delete is the only sanctioned way to break a pair’s peer binding.

Verify — per direction

POST /verify with {"stream_id": "<sid>"} targets the outbound side of the direction the SID names, emitting an SSF verification SET scoped to that direction’s iss/aud:

Reverse-direction verification (confirm the leg the peer transmits into your inbound side) is ordinary SSF transmitter-initiated verification pointed at the peer: resolve the peer’s transmitter config and POST <peer>/verify with {"stream_id": "<peer's txSid>"} (= your rxSid’s upstream), authenticated with the bearer the peer accepts. The peer emits the verify SET, which arrives on your rxSid. No new local route is needed.

Delete — with or without cascade

Local cleanup always proceeds and never blocks on peer reachability (ADR 0020). Peer cleanup is a courtesy, opt-in via ?cascade_peer=true:

# Local-only delete (peer untouched): 200
DELETE /stream/<sid>

# Courtesy peer delete too:
DELETE /stream/<sid>?cascade_peer=true

Configuration knobs

SSTP reuses the poll long-poll and retry knobs — there are no SSTP-specific timeout knobs:

Variable Used by SSTP for
I2SIG_POLL_DEFAULT_TIMEOUT server-side outbound long-poll timeout
I2SIG_POLL_MAX_TIMEOUT server-side outbound long-poll cap
I2SIG_POLL_RETRY_BASE_DELAY / _MAX_DELAY / _BACKOFF_FACTOR client-side transport/transient backoff
(retired) I2SIG_INSECURE_SSTP_HTTP no longer read — a plaintext initiator endpoint_url needs the pair’s tx_allow_plaintext opt-out instead
I2SIG_EVENT_TYPES_EXTRA extend the supported-event catalog so a pair can negotiate and route a custom event vocabulary

See docs/configuration_properties.md for the full catalogue.


(C)2026 Independent Identity Inc.