Open Enterprise
Browse topics
DocumentationIdentity and access

Shared Signals and CAEP

The optional ssf provider receives OpenID Shared Signals Framework 1.0 push events. Its first CAEP policy handles session-revoked. The runtime validates each Security Event Token (SET), commits it durably, and applies session cleanup and audit processing. This release provides a documented interoperability profile rather than a general-purpose transmitter or formal certification.

Configure a trusted transmitter

deployments/runtime.ssf.yaml extends the SAML example with a receiver:

YAML
ssf_connections:
  - id: customer-security
    organization_id: org_saml
    connection_id: customer-saml
    issuer: https://signals.example.test
    audience: urn:open-enterprise:org_saml
    access_token_env: SSF_MANAGEMENT_TOKEN
    tenant_id: customer-42

Replace the example issuer, audience, and tenant with trusted deployment values. Set SSF_MANAGEMENT_TOKEN to the transmitter's stream-management credential. Set the public runtime URL to an HTTPS endpoint reachable by the transmitter. The receiver push URL is /ssf/v1/events/customer-security under that origin. The configured OIDC connection must permit the same organization. Each transmitter issuer and audience pair can belong to only one receiver in the deployment. A distinct audience prevents the same signed event from crossing organization boundaries. The optional tenant ID constrains tenant subjects when they appear in complex subjects.

The provider discovers /.well-known/ssf-configuration with any issuer path appended after that prefix. It requires spec_version: 1_0, the exact issuer, JWKS, and configuration, verification, and add-subject endpoints. The JWKS and the three management endpoints must use the issuer's origin, so a discovery document cannot send the management token or key requests to another host. The transmitter must support push delivery urn:ietf:rfc:8935. Discovery with unknown critical complex-subject members fails closed. All endpoints require HTTPS; explicit development mode permits HTTP for local fixtures. Provider HTTP requests disable redirects, use a 10-second timeout, and bound response bodies to 1 MiB. The management token goes to trusted discovered management endpoints and is never sent to JWKS.

The maintenance worker creates a stream and verifies its issuer, audience, delivery URL, and delivered revocation event. It requests verification with a one-time state hash valid for 60 seconds. A matching signed verification event marks the stream verified. Signed session revocations from the configured issuer apply even while verification is pending. Revocations match sessions by the issuer recorded at login. A customer-managed SSO configuration cannot change the issuer of a connection that has an SSF receiver, because its user-level revocations would stop matching. Use a separate identity connection for that customer. A re-verification therefore does not drop revocations. Unsolicited verification without state is accepted only when no challenge is pending and the stream ID matches. A failed challenge retries after expiration. Verified login subjects and available upstream session IDs are added to the stream before a runtime grant is issued. An unavailable or unverified stream prevents new enrolled logins from completing.

Use service scopes signals:read and signals:manage, or an authorized owner session, for these operations:

  • GET /v1/organizations/{id}/security-streams returns stream status without credentials or provider configuration.
  • POST /v1/organizations/{id}/security-streams/{receiver}/verify requests a fresh verification and returns an empty HTTP 202 response.

Accepted token profile

The push endpoint requires Content-Type: application/secevent+jwt. The signed JWT must use typ: secevent+jwt (or the full application/secevent+jwt, in any letter case), RS256, and a trusted JWKS key ID. Unsupported critical JOSE header extensions and alternate payload encodings are rejected. Unknown key IDs trigger a serialized, rate-limited refresh from the same trusted JWKS URL. The validator checks the signature, exact issuer, configured audience, positive iat, nonempty jti, and exactly one supported event. SETs containing sub or exp are rejected, as required by the SSF profile. The token limit is 128 KiB, also subject to the configured HTTP body limit. Future issue and event times have 60 seconds of clock tolerance.

Supported events are:

  • https://schemas.openid.net/secevent/caep/event-type/session-revoked
  • https://schemas.openid.net/secevent/ssf/event-type/verification
  • https://schemas.openid.net/secevent/ssf/event-type/stream-updated.

Verification and stream notifications use an opaque stream-ID subject. Stream notifications support enabled, paused, and disabled; a paused or disabled stream requires verification before new login enrollment. Unsupported event types and subject formats fail closed.

Revocation subjects support these formats:

Format Matching rule
iss_sub Exact configured OIDC issuer and verified login subject
opaque Exact stored upstream session ID
complex user, session, and optional tenant; all supplied constraints must match

The complex user member uses iss_sub; session and tenant use opaque. At least a user or session subject is required. Wrong tenants, email identifiers, and mismatched issuers are rejected. Other complex members, such as CAEP's device, are ignored, as SSF 1.0 sections 3.6 and 4.2.3 require. Such a member only narrows the subject, so ignoring it revokes more sessions, never fewer. Discovery refuses a transmitter that marks such a member critical, so no event with one is accepted. Unknown valid user or session identifiers do not create canonical identities or affect unrelated users.

Revocation semantics

The inbox deduplicates by receiver, transmitter issuer, and event ID. An identical retry returns HTTP 202; different claims under the same identifier return a protocol error. The receiver commits the inbox and denial record before returning an empty HTTP 202 response. Subsequent session checks and exchanges observe the denial even when the worker is stopped. The worker removes pending exchanges, marks matching sessions revoked, writes one audit event, and marks the inbox entry processed. A restart resumes unprocessed entries.

When processing an entry fails, the worker retries it after a delay that starts at 2 seconds and doubles after each failure. Other entries keep processing in the meantime. After eight failed attempts, the worker sets the entry aside. It logs an error and writes a security.signal.failed audit event with the event ID as the resource. The denial record from receipt still applies to that entry. The oe_signal_inbox{state="failed"} metric counts entries set aside; see run the runtime. To retry one, clear its failed_at column and reset attempts to zero.

A session-specific event keeps that upstream session ID revoked, including when a newer token presents the same ID. A user-only event uses its event_timestamp, or iat when absent, as the authentication cutoff. It does not revoke a later, unrelated upstream authentication. Enrolled OIDC connections request max_age=86400 and require signed auth_time with 60 seconds of tolerance. Missing, stale, or future authentication times reject login. This prevents fresh token issuance from disguising an old upstream authentication. The runtime stores available sid values with grants and sessions.

Revocation is scoped to the receiver's organization and login connection. It invalidates local access; it does not deactivate the user or terminate the upstream IdP session. SCIM deactivation remains the account-wide denial rule within an organization. The example makes uncached /v1/me checks on every protected request, so its validity cache bound is zero. Applications that cache session validity must choose and document their maximum delay; v0.2 supplies no cache invalidation channel. An operation already in progress can finish.

Deployment and retention

Revoke existing sessions and pending grants when enrolling a connection that previously lacked login-origin metadata. Legacy sessions cannot be matched safely to an upstream session or authentication time. Keep recovery access on a separate connection when the customer transmitter is unavailable. The default SAML fixture already provides that connection.

Keep signal inbox and revocation records across restarts, backups, and ordinary audit retention. They prevent replay and reuse of revoked upstream sessions. Automatic pruning is deliberately absent in v0.2; capacity planning must include these tables. Do not remove denial records while matching upstream sessions or tokens can still be used. Audit retention alone does not prove that such removal is safe.

Reproduce the receiver lifecycle

Shell
bash scripts/test.sh

The crates/enterprise-runtime/tests/ssf.rs fixture runs a local signed transmitter without commercial credentials. It implements discovery, JWKS, stream registration, verification, and subject enrollment. It then tests revocation with the worker stopped, durable restart, pending exchanges, sequential and concurrent duplicates, delayed events, key rotation, unknown subjects, and tenant isolation. Negative cases cover invalid signatures, algorithm confusion, wrong issuer and audience, invalid token claims, and wrong verification state. The fixture uses the dedicated database selected by TEST_DATABASE_URL and public test keys. The ordinary browser lifecycle remains a separate regression gate for provisioning and brokered SAML.

Search documentation