Security event export
signafAIde can send its security events to the SIEM your security team already watches: Microsoft Sentinel, Splunk, Datadog or Elastic. Blocked tool calls, chain conflicts, late records, late public timestamps, key and member changes, auditor links, audit packs, rule set versions, plan changes, and a count of what was checked every hour.
The export is part of the Team and Enterprise plans. Only owners and admins of the organisation can connect, edit, test or disconnect a destination, and each of those actions is written to the organisation's audit log. Each destination can be connected on its own; you can send to more than one.
What is sent #
Every event is one JSON document in the OCSF 1.3.0 schema, the same document for every destination:
- Findings (a blocked tool call, a chain conflict, a late record, a late public timestamp) are the class Detection Finding (2004).
- Changes to keys, auditor links, audit packs, rule sets, the plan, members and this export are the class Entity Management (3004).
- The hourly counts and the test event are the class Base Event (0): OCSF has no class for a summary.
metadata.event_code is the event name below, metadata.uid is the event's id, metadata.tenant_uid is your organisation's id, and time is the event time in milliseconds. The event's own fields are under unmapped.signafaide: event, org, project, env, actor, data, issued_at (when signafAIde queued the event) and key_id (the key that signed it).
actor is the person who acted, when a person did: their user id and, unless you choose otherwise, their email address. Each destination has the setting Who did it: email address (the default) or user id only. With user id only, no email address is in the events sent to that destination.
Every event is at most 9,000 bytes before signing; the key id and the signature add about 130 bytes. So it arrives whole within each destination's limits (Splunk's default 10,000-byte event, Sentinel's 64 KB field). The hourly counts are one event per project, and the blocked calls of the hour follow in parts of up to 5. Fields whose type could vary are named for their type: times end in _time (from_time, to_time), other changes in _value (from_value, to_value), so an index that detects types never sees one name with two types.
| Event | OCSF class | Severity | What it says |
|---|---|---|---|
call_blocked | Detection Finding | Medium | A tool call was blocked, by the agent's own checks or by the witness's ruling: time, agent, tool, rule ids, rule set, version and rules hash. |
chain_conflict | Detection Finding | High | A record was refused because it did not follow its agent's chain: the agent, the record's seq and hash, and the head signafAIde holds. |
outbox_gap | Detection Finding | Low | A record reached signafAIde later than the project's gap threshold: the agent, seq, record hash and how late. |
timestamp_delayed | Detection Finding | Medium | A batch of records of a project has waited more than 24 hours for its confirmed public timestamp. Sent once; again only after it cleared. |
timestamp_failed | Detection Finding | Medium | signafAIde could not submit records for a public timestamp. Sent once when it starts failing; again only after it worked. |
agent_key_registered | Entity Management | Informational | An agent registered a signing key: the agent and the key id. |
agent_key_rotated | Entity Management | Informational | An agent rotated its signing key: the old and new key ids and when the old one ended. |
agent_key_revoked | Entity Management | Low | A person revoked an agent's signing key in the console. |
api_key_created | Entity Management | Informational | An API key was created: its id and name, never the key. |
api_key_rotated | Entity Management | Informational | An API key was rotated: the old key stopped working. |
api_key_revoked | Entity Management | Low | An API key was revoked. |
content_key_set | Entity Management | Low | A customer-managed content key was set: its fingerprint. |
content_key_rotated | Entity Management | Low | The customer-managed content key was replaced: the old and new fingerprints. |
content_key_revoked | Entity Management | Medium | The customer-managed content key was removed. |
auditor_link_created | Entity Management | Informational | An auditor link was created: its id, agents and expiry, never the link itself. |
auditor_link_revoked | Entity Management | Informational | An auditor link was revoked. |
audit_pack_generated | Entity Management | Informational | An audit pack was generated: its id and period. |
rule_set_published | Entity Management | Informational | A rule set version was published: set, version, published time, mode and the rules hash of the signed document. |
plan_changed | Entity Management | Informational | The organisation's plan changed: from and to. |
member_added | Entity Management | Low | A person joined the organisation: their user id and role. |
member_role_changed | Entity Management | Low | A member's role changed: from and to. |
member_removed | Entity Management | Low | A member was removed from the organisation. |
webhook_secret_rotated | Entity Management | Low | The organisation's webhook signing secret was replaced. |
export_key_rotated | Entity Management | Low | signafAIde started signing exported events with a new key: the new and old key ids. The old key stays published. |
events_dropped | Detection Finding | High | Events were not queued because the organisation's queue was full (a destination took nothing for a long time): how many, and since when. |
security_export_changed | Entity Management | Low | A security event export destination was connected, edited or disconnected. |
period_counts | Base Event | Informational | Every hour, one per live project (one for the organisation when it has none): records accepted; tool calls allowed, blocked and would-have-blocked; how many blocked calls are listed and whether the list is cut; the newest 10 rule set versions in force; the age of the oldest batch waiting for its public timestamp. |
period_blocked_calls | Base Event | Informational | The newest 20 blocked calls of the hour, up to 5 per event (part and parts): time, agent, tool, rule ids, rule set, version and rules hash. |
test | Base Event | Informational | Sent by Send test event in the console. Holds no data. |
Only live projects are exported. Events from the sandbox (test keys and test projects) are not.
What is never sent #
No value an agent disclosed to a tool-call check, no record content, no tool input or output, no API key, signing key, webhook secret or credential, and nothing only staff can see. Events carry names, ids, counts, times, hashes and rule ids. A blocked call carries its rule ids, never the values that matched them.
How events are signed #
Every document is signed with Ed25519 by signafAIde's export key, a key used for nothing else. The public keys are published at /.well-known/signafaide-export-keys.json on the service, next to the witness keys (/.well-known/signafaide-keys.json). When the export key is replaced, the old key stays listed with the time it stopped signing, and each organisation that exports gets an export_key_rotated event.
The signature is unmapped.signature, base64url without padding. It covers the bytes signafaide-export-v1 and a newline, followed by the document without unmapped.signature, serialised as JCS (RFC 8785: keys sorted, no spaces). unmapped.signafaide.key_id names the key, and unmapped.signafaide.issued_at says when the event was queued; both are inside what is signed.
Only the signed document is evidence: the Sentinel column Ocsf, the Splunk event, the Datadog attribute ocsf and the Elastic field ocsf. The other columns and fields (TimeGenerated, EventType, ddtags, @timestamp and the like) are copies made for searching; nothing signs them. Check an event against its document.
import base64, json
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
def b64u(s):
return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4))
def verify(doc, keys):
"""doc: one signed document. keys: {key_id: public_key} from /.well-known/signafaide-export-keys.json.
Raises InvalidSignature when the document was changed or not signed by signafAIde."""
doc = json.loads(json.dumps(doc))
sig = doc["unmapped"].pop("signature")
public_key = keys[doc["unmapped"]["signafaide"]["key_id"]]
body = json.dumps(doc, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode()
Ed25519PublicKey.from_public_bytes(b64u(public_key)).verify(b64u(sig), b"signafaide-export-v1\n" + body)The events hold only strings, whole numbers, true, false, lists and objects, so sorted compact JSON is their JCS form.
To check events from a SIEM, export the signed documents (the Ocsf column, event, or ocsf) as one JSON object a line, and run:
import json, sys, urllib.request
keys = {k["key_id"]: k["public_key"] for k in json.load(urllib.request.urlopen("https://signafaide.co.uk/.well-known/signafaide-export-keys.json"))["keys"]}
for line in sys.stdin:
doc = json.loads(line)
try:
verify(doc, keys)
print("valid", doc["metadata"]["uid"])
except Exception as e:
print("INVALID", doc.get("metadata", {}).get("uid"), type(e).__name__)A copy of a valid event is still valid: delivery is at least once, and anyone who holds an event can send it again. Count each metadata.uid once, and look at issued_at for when signafAIde made it. In Sentinel, SignafaideEvents_CL | summarize arg_min(TimeGenerated, *) by EventUid; in Splunk, | dedup metadata.uid.
Delivery #
Events are queued as they happen and sent within about 10 seconds, in batches of up to 200 events. Every attempt is in the Delivery log (Integrations, Delivery log), with the HTTP status and the destination's answer. Each destination is sent to on its own, so one that does not answer does not hold up the others.
- When the destination has a problem or does not answer (a timeout, HTTP 429 or 5xx), the batch is tried again with a growing wait, and Retry-After is honoured. Later runs wait too: 30 seconds after a failed run, doubling, at most 15 minutes. After 3 failed attempts in a row the destination is Failing, and the owners and admins get one email.
- When the destination refuses the request (HTTP 401 or 403; a 400, 413 or 422 that would be refused again, such as an unknown index, a stream whose columns differ, or Splunk's Invalid data format or Incorrect index), it is Paused: nothing is sent until you press Resume delivery or save its settings again, the owners and admins get one email, and our staff are told in case the request was ours.
- The hourly counts mean something is sent at least every hour. When no delivery has succeeded for 3 hours the destination is Stale, and the owners and admins get one email.
- When it works again, they get one email saying so.
- A paused destination stays paused until you press Resume delivery (on any plan, so what was queued before a plan change can still go) or save it. If the request was refused for its content (one bad batch on Sentinel, Splunk or Datadog), saving sends it again and it pauses again, until those events age out after 7 days or you disconnect and connect the destination. Elastic sets a single refused event aside instead.
- For Microsoft Sentinel, a token Microsoft Entra refuses (HTTP 400 or 401: an unknown tenant or client, or a wrong secret) pauses the destination too.
- When the export is paused on our side, the Integrations page says so, nothing is counted against your destinations, and events wait for up to 7 days. When it resumes, no destination is reported stale for the time it was paused.
- An event signafAIde cannot sign is never sent with a partial signature: it is set aside with a row in the Delivery log, our staff are told, and the events after it go on. If 20 events in a row cannot be signed, across runs, export pauses on our side instead, until we have fixed it.
Delivery is at least once: a batch whose answer was lost is sent again, so a SIEM can hold an event twice. Count each metadata.uid once.
Events wait for up to 7 days after they were queued, and at most 100,000 per organisation. When the queue is full, new events are counted and not queued; once there is room, one events_dropped event says how many and since when (dropped_queue_full, and dropped_oversize for an event too large even with its data left out), and the Integrations page shows it meanwhile. A destination that has not taken events by then misses them; its Delivery log shows when it last succeeded.
If the plan no longer includes the export, nothing new is queued from that moment. What was queued before is still delivered; the 7 days are the only limit. A plan_changed event says so, with export set to stopped, and another with resumed when a plan includes it again. Both give the plans and the reason: a payment grace that ran out, a change by signafAIde staff, or the status of the subscription. The hourly counts cover exactly the time a plan included the export: in an hour where it ended or came back, there is one counts event for each part of the hour it was covered, from the minute it began, and there are none for the time it was not. A plan that ends and comes back between two of signafAIde's checks (they run every few seconds) shows only in the counts, as a gap; no plan_changed is sent for it.
Destinations must be public https addresses with a certificate from a public authority. Private addresses (10.0.0.0/8, 192.168.0.0/16 and the like) and self-signed certificates are not supported.
A destination you connect starts with the events that happen from then on; it does not receive what was already waiting for another destination.
Send test event sends one test event at once and shows the answer, or the reason it failed and what to check. Saving a destination sends one too. Changing where a destination sends (its URL, endpoint, tenant, client, site, index or stream) needs its credential entered again, so a stored credential never goes to a new address.
Microsoft Sentinel #
signafAIde sends to the Azure Monitor Logs Ingestion API, through a data collection rule (DCR), into a custom table in the Log Analytics workspace that Microsoft Sentinel uses. It signs in as a Microsoft Entra app registration with a client secret (client credentials). Azure public cloud only.
You need: a Log Analytics workspace with Microsoft Sentinel, and the rights to create a custom table, a data collection rule, an app registration and a role assignment.
- In Microsoft Entra ID, create an app registration. Add a client secret. Keep the Directory (tenant) ID, the Application (client) ID and the secret value.
- In the workspace, create a custom table named
SignafaideEvents_CLwith the columns below (Tables, Create, New custom log (Direct ingest), or the Tables API). Creating the table in the portal also makes the data collection rule: use the stream nameCustom-SignafaideEventsand the transformationsource. - If you make the DCR yourself, declare the stream
Custom-SignafaideEventswith the same columns, send it to the table with the transformationsource, and create the DCR with"kind": "Direct"so it has its own logs ingestion endpoint. - On the DCR, open Access control (IAM) and give the app registration the role Monitoring Metrics Publisher. A new role can take up to 30 minutes to work.
- From the DCR's JSON view, copy the logs ingestion endpoint (or use your data collection endpoint) and the immutable ID (
dcr-and 32 characters). - In the signafAIde console, open Integrations, fill in Microsoft Sentinel and press Save.
The stream and table columns:
[
{ "name": "TimeGenerated", "type": "datetime" },
{ "name": "EventTime", "type": "datetime" },
{ "name": "EventType", "type": "string" },
{ "name": "Severity", "type": "string" },
{ "name": "EventUid", "type": "string" },
{ "name": "OrgId", "type": "string" },
{ "name": "ProjectId", "type": "string" },
{ "name": "Env", "type": "string" },
{ "name": "Message", "type": "string" },
{ "name": "Ocsf", "type": "dynamic" }
]Ocsf holds the whole signed document: it is the evidence, and the other columns are copies for queries. TimeGenerated is the event time; Azure Monitor may set it to the time it took the row when that is more than 2 days old, so EventTime always keeps the event's own time. A query to start from:
SignafaideEvents_CL
| where EventType == "call_blocked"
| project TimeGenerated, ProjectId, Agent = tostring(Ocsf.unmapped.signafaide.data.agent), Tool = tostring(Ocsf.unmapped.signafaide.data.tool), Rules = Ocsf.unmapped.signafaide.data.rule_idsThe request: POST <endpoint>/dataCollectionRules/<DCR immutable ID>/streams/Custom-SignafaideEvents?api-version=2023-01-01, with a bearer token for the scope https://monitor.azure.com//.default, a JSON array of rows, at most 1 MB a call. The token is asked for again before it expires.
Splunk #
signafAIde sends to the HTTP Event Collector (HEC), to /services/collector/event, with Authorization: Splunk <token>.
- In Splunk, open Settings, Data inputs, HTTP Event Collector, and create a token. Choose the index the events go to, or leave the index field in signafAIde empty to use the token's default.
- In the signafAIde console, open Integrations, fill in Splunk and press Save. The HEC URL is the address with its port and no path, such as
https://splunk.example.com:8088, orhttps://http-inputs-<stack>.splunkcloud.comon Splunk Cloud Platform.
Each event is a HEC event with time (seconds with milliseconds), host and source signafaide, the sourcetype (default signafaide:ocsf), the index when you set one, and the signed document as event. signafAIde sends a channel id (X-Splunk-Request-Channel), so a token with indexer acknowledgement turned on also works; signafAIde does not poll for acknowledgements.
Datadog #
signafAIde sends to the Logs API (POST /api/v2/logs on your site's intake, such as https://http-intake.logs.datadoghq.eu), with the DD-API-KEY header.
- In Datadog, open Organization Settings, API Keys, and create an API key.
- In the signafAIde console, open Integrations, choose your Datadog site, paste the key and press Save.
Each event is a log with ddsource signafaide, the service (default signafaide), hostname signafaide, tags event:<name>, severity:<severity> and env:<env>, a status from the severity (info, notice, warning, error), message, date, and the signed document as the attribute ocsf. Datadog takes log times up to 18 hours old: an older event is sent with the time it is sent as date, and its own time stays in event_time and in ocsf.time.
Elastic #
signafAIde sends to the bulk API (POST /_bulk) with Authorization: ApiKey <encoded key>, one create action per event, so it works with a data stream.
- In Kibana or with the API, create an API key that may create documents in the index or data stream (the privileges
create_docandauto_configureon it). Copy its encoded value. - In the signafAIde console, open Integrations, fill in Elastic and press Save. The URL is the Elasticsearch endpoint with no path. The default target is the data stream
logs-signafaide.events-default, which the built-inlogs-*-*template accepts.
Each document has @timestamp, message and the signed document as ocsf. The _id is the event id, so a batch sent twice is not stored twice: Elastic answers 409 for an event it holds, and signafAIde counts that as delivered. An event Elastic refuses for another reason (a mapping that does not fit, for example) is set aside: it gets a row in the Delivery log with Elastic's error type and is not sent again, and the events after it go on. When Elastic refuses every event of a request, or the whole request, the destination is paused.
The _id check works within one index. With a data stream, a batch sent again after a rollover can be stored twice; count each metadata.uid once. With an index of your own, keep its mapping for ocsf dynamic, or map the fields you search.