Get started
Docs menu

Audit and events

Receiving Shared Signals

On this page

Introduction

Sometimes another service needs to tell Signari that something happened to a person. An upstream identity provider may have revoked their session, or disabled their account. Signari should then end that person's sessions here too.

Signari can be the "receiver" of a Shared Signals Framework (SSF) stream. A "transmitter" sends it Security Event Tokens (SETs): signed JSON Web Tokens (JWT), each describing one event. One example is a Continuous Access Evaluation Profile (CAEP) session revocation. Signari verifies each token before it acts on it.

You register each transmitter as a "source", with signari ssf add-source or through the Admin API.

Register a source

A transmitter delivers each SET to this endpoint:

TextPOST /ssf/receiveContent-Type: application/secevent+jwt<the Security Event Token>

Register the transmitter as a source, with the event types it may send, then see what it has sent:

Shellsignari ssf add-source -org <uuid> -name "Upstream IdP" \  -source-issuer https://idp.example.com \  -source-jwks https://idp.example.com/oauth2/v1/keys \  -source-audience https://id.example.com \  -events https://schemas.openid.net/secevent/caep/event-type/session-revokedsignari ssf received -org <uuid>

The Admin API registers sources the same way, at /admin/organizations/{orgID}/ssf-sources. See the Admin API reference.

Receiving and transmitting

Transmitting is the simpler half of Shared Signals: "a session was revoked here, tell the applications". Receiving means acting on another service's word about your own people, so this page is about checking that word before acting on it.

The endpoint is unauthenticated

A transmitter pushes without credentials: the signature is the credential. That is RFC 8935's model. A shared secret would have to be distributed to every transmitter, and would prove less than a signature does.

So everything rests on verifying before acting. Nothing touches the database on the strength of an unverified token, including to find out who it is about.

The order:

  1. Choose the source by the token's iss and aud, read unverified. That only selects whose keys to verify against; every check below is made again against what it selects.
  2. Parse with the algorithm list pinned. No none.
  3. Refuse a token carrying its own key material (jwk, jku, x5u).
  4. typ must be secevent+jwt. Otherwise an ID token from the same issuer is a signed object Signari might act on.
  5. iss must match the source exactly. A key set that also signs for somebody else does not give the source authority to speak as them.
  6. aud must contain Signari. A token addressed elsewhere is not acted on, however valid its signature.
  7. Signature against the source's keys, fetched from its JSON Web Key Set (JWKS).
  8. jti must be unused.
  9. The source must be permitted to send this event type.
  10. Only then: resolve the subject, and act.

What is refused

Each of these is refused, even when everything else about the token is correct:

Textsigned with a key we do not trust      typ is not secevent+jwtissuer does not match the source       audience is somebody elseno jti                                 issued in the futurean event type this source may not send a source configured with no eventsa token carrying its own key           not a token at allan issuer we have no source for

A token may carry several entries in events when they describe one event, as CAEP profiles do. RFC 8417 §2.2 forbids expressing several independent events in one token, and permits several entries describing one event. Every entry must be one the source may send, so a source allowed to report one thing cannot smuggle another alongside it. All of them are applied in one transaction, so a token is never applied in part.

One signed session-revoked ends every live session of the person it names. The sessions end with revocation_reason = shared_signal. That is named distinctly from a sign-out, because the two mean different things to whoever reads the audit trail.

How a refused token is answered

A refused token is answered 400. RFC 8935 §2.3 says a recipient that "detects an error parsing, validating, or authenticating a SET ... SHALL respond with an HTTP Response Status Code of 400". The body carries an error code that RFC 8935 §2.4 registers, such as invalid_issuer, invalid_audience or invalid_key. The response has the Content-Language header §2.3 requires.

The codes tell a partner whose transmitter is misconfigured which check refused its token. What they disclose, "this deployment has a source for issuer X", can be learned only by guessing an exact issuer URL, and interoperability and debugging outweigh that.

Two organisations, one transmitter

A shared upstream sends every customer's events under one issuer, and tells them apart by audience. So two organisations here can each have a source for the same iss.

The source is therefore chosen by the issuer and the audience together, and that pair belongs to one organisation in the whole deployment. ssf add-source refuses a second organisation's registration of it, compared without regard to case, as the audience check is.

The tokenAnswer
iss and aud match one sourceverified against that source, and the subject is resolved in its organisation only
aud lists several audiences that reach two organisations' sources400 invalid_audience, and nothing is acted on. An event addressed to two organisations names nobody in particular
aud names a recipient here that does not accept this iss400 invalid_issuer, RFC 8935 §2.4's "the SET Issuer is invalid for the SET Recipient"
aud names no recipient here400 invalid_audience, "the SET Audience does not correspond to the SET Recipient"

Replay

A repeated jti is accepted (202) and not acted on twice. At-least-once delivery is normal, because a transmitter legitimately resends, and answering 4xx would make it keep retrying.

The guard is a UNIQUE constraint rather than a prior SELECT. Two copies arriving at once would both pass a check-then-insert.

The record and the effect commit in one transaction: a revocation that committed without its record could be replayed.

How the subject is resolved

How a source names a person decides whose sessions it can end. Matching on email would be the wrong default. Two directories can hold the same address. A source permitted to speak about its own people would then be able to end sessions for yours.

OrderFormatBasis
1iss_subThe federated identity link the two sides already agreed on
2emailOnly within that source's own organisation

An unresolvable subject is not an error, because a transmitter sends events about people you have never seen. It is recorded, because many events that match no one are the sign of a misconfigured subject format.

A source is scoped

-events is required. A source permitted to report device compliance must not also be able to revoke sessions. An empty list allows nothing, so an unfinished configuration does not read as permission for everything.

What this implements, and what it does not

Transmitting. Streams exist: core.ssf_streams carries endpoint_url, events_requested, auth_token and a status. SETs are delivered through internal/outbox, with its retry, capped backoff and parked-failure handling. A stream is created by an administrator, with signari ssf add-stream or the Admin API. Through §8.1.1's Stream Configuration Endpoint, /ssf/stream, a receiver can read its own stream and change what it asks for, and a request to create or delete one is answered 403. It can also ask for a verification event at POST /ssf/verify. See what a receiver can do with its stream.

Receiving. POST /ssf/receive accepts SETs from a configured source. Signari does not act as a stream-managing receiver. Nothing here creates a stream against a foreign transmitter, reads §7.2 transmitter configuration metadata, or requests verification.

What is implemented

SSF 1.0 sectionStatus
§4.1 SET format, explicit typing, iss, forbidden exp/subimplemented
§6.1.1 Push delivery over HTTPimplemented, both directions
§6.1.2 Poll deliveryimplemented as transmitter (POST /ssf/poll); this receiver does not pull from an upstream queue
§7.1 / §7.2 Transmitter configuration metadataimplemented, served at /.well-known/ssf-configuration
§8.1.1 Stream Configuration Endpointimplemented as transmitter, for reading and changing a stream (GET, PATCH and PUT /ssf/stream); creating and deleting one is 403, because streams are created by an administrator. This receiver does not call another transmitter's endpoint
§8.1.4 Verification (the verification event and its state echo)implemented as transmitter (POST /ssf/verify); this receiver never requests verification

So §8.1.4's receiver SHALL, "the Event Receiver SHALL confirm that the value for state is as expected", does not apply to Signari, because it never requests verification.

A deployment that expects to create a stream with Signari over the wire is refused, because an administrator creates it.

Signari advertises only what is built.

SSF 1.0 requirements

The specification is OpenID Shared Signals Framework 1.0, Standards Track (Final), 29 August 2025.

The receiver's requirements

internal/ssf/receive.go's Verify meets these:

ClauseRequirementOurs
§4.1.1SETs MUST use explicit typing (RFC 8417 §2.3)typ must equal secevent+jwt
§4.1.2sub MUST NOT be present in any SETrefused, with the reason quoted
§4.1.3the three distinguishing checks togetherall three
§4.1.6iss MUST match the stream configuration; receivers MUST validatec.Issuer != src.Issuer → refused
§4.1.7exp MUST NOT be used in SETsrefused
§4.1.8audcontainsFold(c.Audience, src.Audience)
§3.6MUST discard an event with an unprocessable Critical subject memberunprocessableCritical

Beyond the profile, there is more:

  • algorithms pinned, with none absent from the list;
  • jwk/jku/x5u headers refused;
  • exactly one signature required;
  • duplicate JSON keys refused;
  • jti and iat required;
  • future-dated tokens refused, with a deliberately asymmetric window.

§4.1.9's txn uniqueness is a transmitter obligation, not a receiver one, and §7.2.4's configuration validation is a discovery obligation. §7.2.4 does not apply because Signari's sources are configured by an administrator, rather than discovered.

Every receiver-side MUST in SSF 1.0 Final is implemented. The profile's central concern, §4.1.3, "the possibility that SETs are confused for other kinds of JWTs", is covered by all three of its checks.

The transmitter's configuration metadata

As a transmitter, Signari publishes §7.1's document at /.well-known/ssf-configuration. A receiver learns Signari's issuer, signing keys and delivery method from it, without an administrator telling it out of band.

Two details from §7.1 decide its shape:

  • spec_version is needed in practice. "If absent, the Transmitter is assumed to conform to 1_0-ID1 version of the specification", which is an implementer's draft. So leaving it out would claim conformance to a different document. Signari publishes "1_0".
  • jwks_uri is OPTIONAL in general and required for Signari: "MUST be specified if the Transmitter intends to generate signed JWTs." Every SET Signari emits is signed.

Implemented in internal/ssf/metadata.go, served at internal/httpapi/ssfmetadata.go.

The document advertises the five §8 management endpoints: configuration_endpoint, status_endpoint, add_subject_endpoint, remove_subject_endpoint and verification_endpoint (asking whether a stream works). A receiver can read and change its own stream through them, but not create or delete one.

authorization_schemes is omitted. A receiver authenticates to these endpoints as its stream's client, with HTTP Basic or a certificate, and neither is the access token that §7.1.1's OAuth example describes.

Advertising a configuration endpoint that answers 404 is worse than advertising nothing, because the receiver will call it. So an endpoint is advertised only once it works.

default_subjects is omitted for a different reason. §7.1 permits exactly two values, "If present, the value MUST be either ALL or NONE", and neither describes this engine. A stream carries events about the subjects that client has seen, narrower than ALL and wider than NONE.

Omitting is explicitly conformant ("If not provided, the Transmitter behavior in this regard is unspecified"). ALL would promise events about every person in the directory. NONE would tell the receiver it hears about no one until it adds them, and adding a person its client has not met opens nothing here.

The issuer is published verbatim, including a development http one. §7.1 calls for https. But it also says the value "MUST be identical to the iss claim value in Security Event Tokens issued from this Transmitter". That is the half a receiver enforces, because §4.1.6 requires it to reject any SET whose iss does not match.

Publishing an https variant of an issuer Signari signs with would satisfy the scheme sentence by breaking the iss sentence. Receivers could then not subscribe, and nothing would be more secure. §7.2 puts the receiver in charge of noticing: "Receivers SHOULD ensure that the Issuer URL... uses the https scheme."

§7.2.1's path case is handled. For an issuer with a path component, the document belongs at /.well-known/ssf-configuration/issuer1, not at the bare path. The rule exists for hosting many organisations on one host. A transmitter serving only the bare path cannot be discovered in those deployments. The route is registered only when the issuer has a path, so the ordinary deployment carries no duplicate.

What this receiver does not do yet

  • Calling a transmitter's §8 stream management API, to create, update or delete a stream over HTTP. A source here is registered by an administrator instead. As a transmitter, Signari lets a receiver read and change its own stream, but not create one: that is a deliberate choice about who may subscribe to events. See Shared Signals and CAEP.
  • The legacy Apple SSE CAEP profile, which predates the final specification.
  • The other events of Risk Incident Sharing and Coordination (RISC), such as identifier-changed and the recovery family. They are recorded with no handler rather than acted on.

What an account event does

A source has to list each of these in -events before it is believed. They come from Risk Incident Sharing and Coordination (RISC), a companion set of events to CAEP:

EventHere
risc/event-type/account-disabled, account-purgedThe person's sessions end. The account stays: it is this organisation's to close, and a transmitter's word on one identity is not a verdict on all of them.
risc/event-type/account-credential-change-required, credential-compromiseThe sessions end and the next sign-in with a password here is held until it is changed, because the password that leaked may be this one. A federated person with no password here is signed out only.
risc/event-type/account-enabledRecorded. A session that ended stays ended.

Pulling events from a transmitter

Some transmitters only offer a queue, and a receiver behind a firewall cannot be pushed to at all. So a source can be polled, by RFC 8936, instead of or as well as accepting pushes:

Shellsignari ssf add-source -org <uuid> -name Upstream -source-issuer https://idp.example.com \  -source-jwks https://idp.example.com/jwks -source-audience https://id.example.com \  -events https://schemas.openid.net/secevent/caep/event-type/session-revokedsignari ssf poll-source -org <uuid> -source-issuer https://idp.example.com \  -url https://idp.example.com/ssf/poll -client-id our-client < credential-file

Every thirty seconds, one node takes the source and asks for what is queued. The token is verified and acted on exactly as a pushed one is. Then:

  • What was acted on is acknowledged in the next request. So a node that stops between the two is sent it again, and the replay guard answers that.
  • What was refused is reported in setErrs, so it does not come back.
  • What could not be judged stays queued. When the source's keys cannot be fetched, the token has told us nothing, and calling it invalid would lose it. A pushed token in that state is answered 500 for the same reason.

A polled token must carry the issuer of the source that was polled. One transmitter's credential gives it no authority over another's people, whichever keys verify.

signari ssf received starts with how the last turn went. The Admin API has the same in last_polled_at and last_poll_error.

Pulled with a -client-id, the credential goes as HTTP Basic, which is what this engine's own POST /ssf/poll wants. With none, it is a bearer token. signari ssf poll-source -remove stops and forgets it. Disabling a source stops its turns too.

§3 Subject Identifiers

Section 3 of SSF 1.0 decides who an event is about, and puts the subject at the top level of the SET:

§3.1: "claim named sub_id MUST be used to describe the primary subject of the event."

§3.1.1: "MUST include the top-level sub_id claim even for these existing event types."

The existing event types are CAEP and RISC. They are everything Signari emits, and they cover the events transmitters send.

The events Signari sends

Each event Signari sends carries sub_id as a top-level claim, with format, iss and sub. The event-level subject, the pre-1.0 CAEP shape, is kept alongside it. Section 3.1.2 forbids it only for new event types. Section 3.1.1 requires the top-level claim for the existing CAEP and RISC types, without forbidding the old one.

Emitting both is conformant, and more interoperable. A 1.0 receiver reads sub_id, an older one reads subject, and neither is broken by the other. The code carries a note: if this engine ever defines an event type of its own, §3.1.2 applies, and the line must not be copied.

Where the receiver reads a subject

The receiver reads a subject from the top-level sub_id and from the event body. Within the event body, it reads sub_id before subject.

The event body wins when it carries a subject, because a transmitter using the pre-1.0 in-event shape puts it there. subjectFrom makes the same argument about sub_id versus subject: "a receiver that only understands one silently ignores half the transmitters in the world." Preferring the top level would only move the problem.

Two subjects that disagree are refused outright, citing §3.1.4: "Each Subject Member MUST refer to exactly one Subject Principal." That holds between sub_id and subject within an event, and between the top level and the event body. Otherwise the subject Signari chose would decide who gets signed out, and two receivers could sign out two different principals for one signed token. Both naming the same subject is what Signari emits, and is accepted.

Because of that check, precedence between the two levels cannot be observed when both are present. Disagreement is refused, and agreement makes the choice moot.

Comparing iss as well as sub

The member-by-member comparison is subjectsDiffer, and it compares iss as well as sub.

iss_sub is issuer-scoped: user-42 at transmitter.test and user-42 at evil.test are different people. A comparison blind to iss would read them as the same principal. A transmitter could then name its own person in the event body, and somebody else's at the top level, and the pair would be accepted as consistent.

Complex subjects, subject removal and probing

§3.3 Complex Subject Members

A Complex Subject carries "format": "complex", and its identity one level down, in Simple Subject Members named user, device, session, tenant and so on. The specification's own example:

JSON"sub_id": {  "format": "complex",  "user":   {"format": "email",   "email": "bar@example.com"},  "tenant": {"format": "iss_sub", "iss": "https://example.com/idp1", "sub": "1234"}}

The receiver resolves a Complex Subject through its user member.

Reading the user member is not a choice among candidates. §3.3.1: "All members within a Complex Subject MUST represent attributes of the same Subject Principal. As a whole, the Complex Subject MUST refer to exactly one Subject Principal." They are attributes of one principal, and user is the one naming an account.

Falling back to device or tenant when user is absent is refused. A device identifier that happens to collide with an account's identifier would otherwise revoke a real person's sessions.

Why reading only user is safe

This receiver revokes per person, so an event scoped to one session is applied more broadly than it was sent. The specification has a mechanism for that, and Signari implements it. Section 3.6 requires a receiver to discard an event carrying a Critical member it cannot process.

device, session, tenant and the rest are left out of processableSubjectMembers. So a transmitter that cannot accept the wider application marks the member Critical, and the event is refused instead of over-applied.

Adding every complex member name to processableSubjectMembers looks like completing the list, but it would remove that safeguard.

§9.3 Malicious Subject Removal

"Event Receivers MUST tolerate receiving events for subjects that have been removed from the stream, and MUST NOT report these events as errors to the Event Transmitter."

The reason is in the section's title. Removing a subject from a stream is something an attacker wants, because it blinds the receiver to that account while they use it. A transmitter may therefore keep sending events for a removed subject. A receiver that answers 4xx teaches it to stop, which is what the attacker wants.

Signari does this: an unresolvable subject is recorded as no_matching_user, committed, and answered 202.

§9.1 Subject Probing

Its receiver-facing MUST NOT concerns what a receiver may infer from a 204 to an add subject request. Signari never calls one: add_subject_endpoint appears in this codebase only as an endpoint Signari serves as a transmitter.

Where the profile is stricter than RFC 8417

The Shared Signals Framework is a profile of RFC 8417, and it is stricter in two places. The receiver follows the profile in both.

§4.1.7: exp is forbidden, not only discouraged.

The "exp" claim MUST NOT be used in SETs. The purpose is defense in depth against confusion with other JWTs, as described in Sections 4.5 and 4.6 of [RFC8417].

RFC 8417 §2.2 on its own only makes exp NOT RECOMMENDED. SSF forbids it so that a SET cannot be shaped like an ID token, not to time-box an event. A SET with a future expiry is as confusable as an expired one, so a SET carrying exp is refused, whatever its value.

§4.1.2: a top-level sub is forbidden.

The JWT "sub" claim MUST NOT be present in any SET containing an SSF event.

It sits under §4.1.3, "Distinguishing SETs from other Kinds of JWTs". That section opens: "Of particular concern is the possibility that SETs are confused for other kinds of JWTs." An SSF event names its subject in sub_id. A top-level sub is the shape of an ID token.

A SET carrying sub is refused. Subject is parsed as a *string so that "sub": "" is distinguishable from an absent claim: an empty string is still a sub claim.

Signari checks typ: secevent+jwt, which is the primary confusion defence, and which would already refuse an actual ID token. The profile adds these two because typ checking is not universal. Its stated purpose is defence in depth.

Forged and malformed tokens

Accepting one forged Security Event Token ends a named person's sessions. Anybody who gets a SET past this code has a repeatable denial of service against any person in the organisation.

aud may be a single string

§4.1.8, verbatim:

The "aud" claim can be a single string or an array of strings.

RFC 7519 §4.1.3 says the same for every JSON Web Token (JWT). And three of the Shared Signals specification's own example SETs use the string form: Figures 8, 9 and 10 all carry "aud": "636C69656E745F6964".

Signari accepts both forms, through a custom unmarshaller, and the string form is still checked.

What is refused, accepted and ignored

AttackResult
alg: nonerefused
HS256 signed with the transmitter's public key as the secretrefused
A configured transmitter signing in another configured transmitter's namerefused
Two signatures, one legitimate and one attacker's, over one payloadrefused
Payload that is "a string", [1,2,3], null, or truncatedrefused
aud array listing Signari among severalaccepted (§4.1.8)
Unknown top-level claims and unknown event-object fieldsignored (§4.2.3)

The last two matter as much as the refusals. Section 4.2.3 makes ignoring unknown fields a MUST. It sits directly beside the rule that an unknown event type is refused. Reading the pair as "reject anything unfamiliar" would make every transmitter extension a breaking change.

Which defences Signari enforces itself

Of four guards in the verification path, two are enforced by go-jose rather than by Signari:

GuardEnforced by Signari alone?
iss pinned to the source configurationyes
jwk / jku / x5u self-supplied keys refusedyes
Explicit algorithm allow-list excluding HS256no: go-jose refuses an HS256 signature against an ECDSA key on type grounds
Exactly one signatureno: JSONWebSignature.Verify declines a multi-signature object and requires VerifyMulti

Neither is a hole: the attacks are refused either way.

A change to the JOSE library, or a future need for VerifyMulti, would make Signari's guards the only defence.

critical_subject_members

§3.6 Receiver Subject Processing

"An SSF Receiver MUST make a best effort to process all members from a Subject in an SSF event. The Transmitter Configuration Metadata (Section 7.1) defined below MAY define certain members within a Complex Subject to be Critical. An SSF Receiver MUST discard any event that contains a Subject with a Critical member that it is unable to process."

and §7.1's metadata entry:

critical_subject_members: "An array of member names in a Complex Subject which, if present in a Subject Member in an event, MUST be interpreted by a Receiver."

The receiver honours both. Each source has its own list of Critical members, and an event with one the receiver cannot process is discarded.

What a Critical member means

Every other check in this receiver asks is this event genuine: signature, issuer, audience, jti, iat, allowed event types. This one asks whether the receiver understands what the event is about.

A transmitter marking a device member Critical is saying the event concerns one device, rather than the whole account. Ignoring that member would not cause an error. It would apply the right action to the wrong set of things: a session revocation scoped to one laptop would be applied to every session the person has, and nothing would report it.

The implementation

critical_subject_members is stored per source, not fetched live from the transmitter's metadata document. That is the same decision as allowed_events, for the same reason. What this receiver will act on is a local decision. Letting a remote document widen or narrow it at request time would make it depend on another party's availability and honesty.

The check runs on the raw subject object rather than the parsed Subject. It exists to notice members Signari does not model, and a parsed struct has already discarded them.

processableSubjectMembers sits directly beside subjectFrom, since §3.6 turns on "unable to process". A member added to the parser without being added to that set would make Signari discard events it can process.

The other requirements

Signari meets the specification's other 93 MUST sentences. They include explicit typ of secevent+jwt (§4.1.1), iss matching the stream configuration (§4.1), audience checking, and refusing a SET with no jti, without which there is no replay guard.

Subject shapes and receiver rules

All three subject shapes are read

The specification allows a subject to arrive three ways. A receiver that handles only one ignores events about people it should be acting on.

  • Top-level sub_id (§3.1), as well as a subject inside the event object.
  • Complex subjects (§3.3), resolved through the user member.
  • iss_sub, compared issuer-scoped. So user-42 at transmitter.test and user-42 at evil.test are two different principals, not one.

Receiver rules

  • §4.1.2 sub MUST NOT be present, §4.1.7 exp MUST NOT: both refused, both for the stated defence-in-depth against JWT confusion (a SET carrying sub+exp is shaped like an ID token).
  • §3.1.4 a subject MUST refer to exactly one principal: refused both within an event and across the top-level sub_id-vs-event-subject levels.
  • §3.6 a Critical member the receiver cannot interpret → discard rather than act on a scope Signari would be ignoring.
  • Per-type source authorization: a source allowed one event type may not smuggle another alongside it.

The receiver reads all three subject shapes the specification defines, and meets every receiver-side MUST in the current SSF 1.0 text.

Changed Signari v0.2