> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiveth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security signals

> Push signed security events, such as a sign-out or a suspended account, to your apps and security tools with the OpenID Shared Signals Framework.

Security signals tell your apps and security tools right away when something about a person's security changes: they signed out, changed their password, were suspended, or got another role. Aiveth is a transmitter under the OpenID Shared Signals Framework (SSF 1.0), with CAEP 1.0 and RISC 1.0 events. Each signal is a signed Security Event Token (RFC 8417), pushed to the receiver's address (RFC 8935).

Use it so an app can end a session the moment Aiveth does, instead of waiting for a token to expire.

> [!NOTE]
>
> Security signals are available on the Business plan and above. Without it, no signals are made, and existing streams are kept.

## Events

| Event type | Meaning |
| - | - |
| `https://schemas.openid.net/secevent/caep/event-type/session-revoked` | Signed out: by themself, by an admin, or with their account. |
| `https://schemas.openid.net/secevent/caep/event-type/credential-change` | Password, two-step sign-in or a passkey changed. |
| `https://schemas.openid.net/secevent/caep/event-type/token-claims-change` | Their role changed (including a temporary role). |
| `https://schemas.openid.net/secevent/risc/event-type/account-disabled` | Account suspended. |
| `https://schemas.openid.net/secevent/risc/event-type/account-enabled` | Account active again. |
| `https://schemas.openid.net/secevent/risc/event-type/account-purged` | Account deleted. |

Two events about the stream itself are always sent, even while the stream is paused: `.../ssf/event-type/verification` and `.../ssf/event-type/stream-updated`.

Signals are made in the same database transaction as the change they describe, so none can be missed, and none exists without its change.

## The token

Each push carries one signed token, with header `typ` set to `secevent+jwt`. It is signed with Aiveth's active key, published at your Aiveth JWKS.

```json theme={null}
{
  "iss": "https://accounts.aiveth.com",
  "jti": "5f2c...",
  "iat": 1764000000,
  "aud": "https://receiver.example.com",
  "txn": "...",
  "sub_id": { "format": "iss_sub", "iss": "https://accounts.aiveth.com", "sub": "8b1f..." },
  "events": {
    "https://schemas.openid.net/secevent/caep/event-type/credential-change": {
      "event_timestamp": 1764000000,
      "initiating_entity": "user",
      "credential_type": "password",
      "change_type": "update"
    }
  }
}
```

* `sub_id` uses the `iss_sub` format (RFC 9493): Aiveth's issuer and the person's ID, the same `sub` your app gets from [Login with Aiveth](https://docs.aiveth.com/apps/login-with-aiveth.md). It never contains a name or address.
* There is no `sub` claim and no `exp`.
* `initiating_entity` is `user` (the person themselves), `admin`, or `system`.
* `credential-change` carries `credential_type` (`password`, `app` for an authenticator app, or `fido2-platform` for a passkey) and `change_type` (`create`, `update` or `delete`).
* `token-claims-change` carries the new role in `claims.role`.
* `aud` is the origin of the stream's push address.

## Set up a stream in the console

**1. Open Security signals**

In the console, go to **Security signals** and choose **Add a stream**. This needs **Manage sign-in security**.

**2. Enter the push address**

Enter the receiver's **Push address** (public `https`), an optional **Name**, and the `Authorization` header value the receiver expects, if any. Choose the events, or **Every signal**.

**3. Test it**

Choose **Send a test** to push a verification event.

An organization can have up to 10 streams. You can pause, resume or remove each one.

## Let a receiver set itself up

A receiver can manage its own stream through the SSF endpoints. Give it an [API key](https://docs.aiveth.com/account/api-keys.md) with the `signals:manage` power (the key's maker needs **Manage sign-in security**). It sends the key as `Authorization: Bearer aiveth_sk_...` and sees only your organization's streams.

| Method and path | Use |
| - | - |
| `GET /.well-known/ssf-configuration` | Transmitter configuration metadata (public). |
| `POST /ssf/streams` | Create a stream (`201`). |
| `GET /ssf/streams?stream_id=` | Read one stream, or all (an empty list when none). |
| `PATCH /ssf/streams` | Update the receiver's parts. |
| `PUT /ssf/streams` | Replace them (fields left out are removed). |
| `DELETE /ssf/streams?stream_id=` | Delete (`204`). |
| `GET /ssf/status?stream_id=`, `POST /ssf/status` | Read or set `enabled`, `paused` or `disabled`. |
| `POST /ssf/verify` | Send a verification event now (`204`). |

Create a stream:

```bash theme={null}
curl -X POST https://accounts.aiveth.com/ssf/streams \
  -H "Authorization: Bearer aiveth_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "delivery": {
      "method": "urn:ietf:rfc:8935",
      "endpoint_url": "https://receiver.example.com/ssf/events",
      "authorization_header": "Bearer receiver-token"
    },
    "events_requested": ["https://schemas.openid.net/secevent/caep/event-type/session-revoked"],
    "description": "Session sync"
  }'
```

Only push delivery (`urn:ietf:rfc:8935`) is supported. The SSF endpoints accept up to 120 requests a minute per organization.

## Stream status

| Status | What happens |
| - | - |
| `enabled` | Signals are sent. |
| `paused` | Signals are held and sent once the stream is enabled again. Stream events still go. |
| `disabled` | Nothing is made, and waiting signals are dropped. |

## Delivery

Aiveth posts the token as the body with `Content-Type: application/secevent+jwt` and the stream's own `Authorization` header. Like [webhooks](https://docs.aiveth.com/events/webhooks.md#where-aiveth-posts-from), it posts only to public `https` addresses, connects to the address it checked, and never follows redirects.

| Receiver's answer | What Aiveth does |
| - | - |
| `202` or any `2xx` | Delivered. |
| `400` | The receiver refused this token. No more tries. |
| Anything else | Tried again after 5 seconds, 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then given up. The stream shows its last error. |

Sent and given-up tokens are kept for 7 days.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.