Documentation base URLs use placeholder https://{your-tenant}.sso.id. Log in to show your tenant or custom domain.
Log in for Your Tenant URL
Chapter 9 — Forensics, SIEM & Security Telemetry

Tamper-Evident Audit Logs, SIEM & Analytics

Every administrative configuration change, role assignment, signing key rotation, and authentication event in SSO.ID v2 is recorded in a cryptographically verifiable SHA-256 Hash-Chained Audit Ledger ( /audit-logs, /user-activity, and /overview) with one-click export to Splunk HEC, Datadog, AWS CloudWatch, and Generic JSON SIEMs.

Compliance Story: Proving Zero Log Tampering to External SOC 2 & ISO 27001 Auditors

How CloudPulse Answered "How Do We Know a Rogue Admin Didn't Edit the Database Logs?"

During CloudPulse's SOC 2 Type II examination, the lead auditor asked two tough forensic questions:

  1. "Show me the exact JSON field that changed when your Application's token lifetime was modified on October 14th, and who approved it."
  2. "Prove mathematically that no database administrator altered or deleted any rows from your audit table before our audit."

CloudPulse's security lead opened /audit-logs, clicked Verify Chain Integrity (GET /api/audit-logs/verify-integrity) — which cryptographically validated the SHA-256 hash links across all stored records — and opened the October 14th event to display the side-by-side Before vs. After JSON State Diff. The auditor signed off on the control in 3 minutes.

1. Cryptographic Tamper-Evident Audit Hash Chain

In /audit-logs, every audit record is linked to its predecessor using an immutable SHA-256 cryptographic digest (previousHash + eventPayload → currentHash):

1-Click Integrity Verification (GET /api/audit-logs/verify-integrity)

Clicking Verify Chain Integrity in the Audit Logs toolbar recomputes the SHA-256 hash chain across your tenant's audit ledger and confirms whether 100% of records are intact or highlights the exact block index if tampering ever occurred.

Multi-Dimensional Forensic Filtering

Filter millions of events in milliseconds by Entity Type (GET /api/audit-logs/entities — Application, Connection, User, Role, Organization, TenantSettings, SigningKey), Action Type (GET /api/audit-logs/actions — Create, Update, Delete, Rotate, Login), Actor, IP Address, Status (Success / Failure), and Date Range.

Flow Diagram Cryptographic SHA-256 Audit Trail & SIEM Streaming Flow
flowchart LR EV["Admin Action or Auth Event"] --> DIFF["Generate JSON Before / After Diff"] DIFF --> HASH["Compute SHA-256 (PrevHash + Timestamp + Payload)"] HASH --> DB["Append to Immutable Audit Ledger (/audit-logs)"] DB --> VER["1-Click Verification (GET /verify-integrity)"] DB --> WH["Stream via Webhook / SIEM Exporter (Splunk / Datadog)"]
Every administrative change and login event computes a SHA-256 hash chaining to the previous block, verified via /verify-integrity and streamed to external SIEMs.
https://cloudpulse.us.beta.sso.id/audit-logs Click to zoom
Tamper-Evident Audit Logs console at /audit-logs with SHA-256 chain integrity verification and SIEM export.
Tamper-Evident Audit Logs console at /audit-logs with SHA-256 chain integrity verification and SIEM export.
https://cloudpulse.us.beta.sso.id/user-activity Click to zoom
User Activity & Authentication Telemetry log at /user-activity.
User Activity & Authentication Telemetry log at /user-activity.

2. Side-by-Side Before & After JSON State Diffs

Clicking any row in /audit-logs (GET /api/audit-logs/{id}) opens the Forensic Event Inspector displaying:

  • Actor & Request Context: Actor User ID & Email, Tenant ID, Correlation ID, Source IP Address, User-Agent, and UTC Timestamp.
  • Old Values vs. New Values Diff: Side-by-side JSON comparison highlighting every added, modified, or removed configuration property (with sensitive secrets automatically redacted).

3. SIEM Export (Splunk, Datadog, CloudWatch) & CSV/JSON Reports

Export or stream your audit ledger directly into your Security Operations Center (SOC) pipeline:

  • Formatted SIEM Export (GET /api/audit-logs/export-siem?format=...): Supports native schemas for:
    • splunk_hec — Splunk HTTP Event Collector envelope format
    • datadog — Datadog Logs & Cloud SIEM JSON format
    • aws_cloudwatch — AWS CloudWatch Logs event batch format
    • generic_json — Standard NDJSON / JSON array for Elastic, Sumo Logic, or QRadar
  • Auditor CSV / JSON Download (GET /api/audit-logs/export): Instant spreadsheet/JSON download of filtered events for compliance evidence packages.

4. User Login Activity (/user-activity) & Executive Analytics (/overview)

Live Authentication Stream (/user-activity)

Powered by GET /api/users/activity and GET /api/security/alerts. Tracks every interactive login, OAuth token grant, SAML assertion, MFA challenge, and failed login attempt with browser, OS, IP, and latency telemetry.

Executive Security Analytics (/overview)

Visualizes login volume trends (/api/analytics/login-trends), MFA adoption breakdown (/api/analytics/mfa-statistics), user growth (/api/analytics/user-growth), top applications (/api/analytics/top-applications), and compliance posture (/api/analytics/compliance-metrics).

5. Audit Logs, Security & Analytics API Reference

Method Endpoint Description
GET https://{your-tenant}.sso.id/api/audit-logs Queries paginated audit log entries (GET /api/audit-logs/{id} returns full JSON diff).
GET https://{your-tenant}.sso.id/api/audit-logs/verify-integrity Cryptographically verifies the SHA-256 tamper-evident hash chain across all audit logs.
GET https://{your-tenant}.sso.id/api/audit-logs/export-siem Exports logs in splunk_hec, datadog, aws_cloudwatch, or generic_json format (GET /api/audit-logs/export downloads CSV/JSON).
GET https://{your-tenant}.sso.id/api/users/activity Returns tenant-wide authentication telemetry (GET /api/users/{userId}/activity scopes to one user).
GET https://{your-tenant}.sso.id/api/security/alerts Returns active threat detection & anomaly alerts (GET /api/security/session-status checks session validity).
GET https://{your-tenant}.sso.id/api/analytics/dashboard-stats Returns executive KPIs (login-trends, mfa-statistics, user-growth, authentication-stats, compliance-metrics, top-applications).

Audit Logs, SHA-256 Integrity Verification, SIEM Export & Security Alerts API Specifications

Below is the complete parameter-level specification for every endpoint in this module. Tenant context is automatically resolved from the signed Bearer JWT token claims or the tenant domain URL (no custom tenant header is required).

GET https://{your-tenant}.sso.id/api/audit-logs
Bearer JWT

Queries paginated, tamper-evident administrative and security audit logs along with 24-hour event metrics. To retrieve a single audit event with its full property-level before/after JSON diff, call GET /api/audit-logs/{id}.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
page Query integer Optional 1-based page number (default: 1).
pageSize Query integer Optional Records per page (default: 10, max: 250).
search Query string Optional Full-text search across actor email, entity title, IP address, and action.
entityName Query string Optional Filter by entity type (e.g., Application, User, Role, Connection, Tenant). Obtain distinct values from GET /api/audit-logs/entities.
action Query string Optional Filter by action verb (e.g., Create, Update, Delete, Login, RotateKey). Obtain distinct values from GET /api/audit-logs/actions.
startDate Query string (ISO 8601) Optional Filter events occurring on or after this UTC timestamp.
endDate Query string (ISO 8601) Optional Filter events occurring on or before this UTC timestamp.
order Query string Optional Sort direction (default: -CreatedOn).
Response Fields & Schema
Field Type Description
items array Paginated array of audit log records.
items[].auditId integer (int64) Monotonically increasing audit record ID.
items[].userEmail string Email of the administrator or user who performed the action.
items[].action string Action performed (Create, Update, Delete).
items[].entityName string Affected resource type.
items[].entityId string Affected resource UUID.
items[].entityTitle string Human-readable name of the affected entity.
items[].changes array Structured array of property diffs (property, displayName, oldValue, newValue).
items[].ipAddress string Originating IPv4/IPv6 address.
items[].previousHash string (SHA-256) SHA-256 hash of the preceding audit record in the chain.
items[].recordHash string (SHA-256) Cryptographic SHA-256 hash of this record concatenated with previousHash.
totalCount integer Total matching audit log entries.
metrics AuditLogMetricsDTO Summary counters (totalEventsLast24h, createEvents, updateEvents, deleteEvents, uniqueActorsCount).
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/audit-logs?page=1&pageSize=10&entityName=Application&action=Update" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
{
  "totalCount": 142,
  "page": 1,
  "pageSize": 10,
  "metrics": {
    "totalEvents": 18420,
    "totalEventsLast24h": 312,
    "uniqueActorsCount": 9
  },
  "items": [
    {
      "auditId": 99412,
      "userEmail": "[email protected]",
      "action": "Update",
      "entityName": "Application",
      "entityId": "app_7712b",
      "entityTitle": "CloudPulse CRM",
      "ipAddress": "198.51.100.14",
      "browser": "Chrome 131.0",
      "createdOn": "2026-11-19T12:15:00Z",
      "previousHash": "8f9e0d1c2b3a495867768594a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4",
      "recordHash": "3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d",
      "changes": [
        {
          "property": "ForceLoginAgain",
          "displayName": "Force Re-Authentication",
          "oldValue": "false",
          "newValue": "true"
        }
      ]
    }
  ]
}
GET https://{your-tenant}.sso.id/api/audit-logs/verify-integrity
Bearer JWT

Cryptographically verifies the tamper-evident SHA-256 hash chain across historical audit logs to prove for SOC 2 Type II, ISO 27001, and HIPAA auditors that no records have been altered or deleted.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
tenantSlug Query string Optional Optional tenant slug override.
limit Query integer Optional Number of most recent chain links to verify in this pass (default: 1000, max: 50000).
Response Fields & Schema
Field Type Description
isValid boolean True if every record's recomputed SHA-256 digest matches its stored recordHash and links unbroken to previousHash.
recordsVerified integer Total number of contiguous hash-chain records verified.
headHash string (SHA-256) Latest block hash at the tip of the audit chain.
verifiedAtUtc string (ISO 8601) UTC timestamp of the verification run.
brokenAtAuditId integer (nullable) Null when valid; points to the exact auditId if tampering is ever detected.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/audit-logs/verify-integrity?limit=5000" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
{
  "isValid": true,
  "recordsVerified": 5000,
  "headHash": "3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d",
  "verifiedAtUtc": "2026-11-19T13:02:00Z",
  "brokenAtAuditId": null
}
GET https://{your-tenant}.sso.id/api/audit-logs/export-siem
Bearer JWT

Exports audit log events pre-formatted for enterprise SIEM ingestion pipelines (Splunk HEC, Datadog Logs, AWS CloudWatch, or Generic JSON). For interactive CSV/JSON report downloads, call POST /api/audit-logs/export.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
format Query string Optional Target SIEM schema: splunk_hec, datadog, aws_cloudwatch, or generic_json (default).
days Query integer Optional Lookback window in days (e.g., 1, 7, 30).
entityName Query string Optional Optional entity filter.
action Query string Optional Optional action verb filter.
Response Fields & Schema
Field Type Description
events array SIEM-formatted event envelopes ready to forward to Splunk HTTP Event Collector or Datadog API.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/audit-logs/export-siem?format=splunk_hec&days=1" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
[
  {
    "time": 1795090500,
    "host": "{your-tenant}.sso.id/api",
    "source": "sso.id.audit",
    "sourcetype": "_json",
    "event": {
      "auditId": 99412,
      "actor": "[email protected]",
      "action": "Update",
      "entity": "Application",
      "entityId": "app_7712b",
      "recordHash": "3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d"
    }
  }
]
GET https://{your-tenant}.sso.id/api/security/alerts
Bearer JWT

Returns active threat detection and identity anomaly alerts (brute-force account lockouts, impossible travel detections, unrecognized IP/country sign-ins, and MFA bypass attempts). To query chronological user login telemetry across the tenant, call GET /api/users/activity.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
limit Query integer Optional Maximum number of alerts to return (default: 10, max: 100).
severity Query string Optional Filter by alert severity: Critical, High, Medium, or Low.
Response Fields & Schema
Field Type Description
id integer (int64) Unique alert ID.
type string Threat category (BruteForceLockout, SuspiciousIpLogin, MfaFailureSpike).
severity string Severity level (Critical, High, Medium, Low).
description string Human-readable summary of the detected threat.
userId string (UUID) Affected user UUID.
ipAddress string Source IP address associated with the event.
timestamp string (ISO 8601) UTC detection timestamp.
resolved boolean Whether the alert has been acknowledged/resolved.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/security/alerts?limit=10&severity=High" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
[
  {
    "id": 502,
    "type": "BruteForceLockout",
    "severity": "High",
    "description": "Account locked after 5 consecutive failed password attempts within 3 minutes.",
    "userId": "usr_88776655-4433-4221-a110-ffeeddccbbaa",
    "ipAddress": "203.0.113.88",
    "timestamp": "2026-11-19T11:42:10Z",
    "resolved": false
  }
]
AI Agent Prompt Build an Automated SIEM Forwarder & Daily Audit Hash-Chain Verifier
You are a SecOps and compliance automation engineer. Build a background worker service that integrates with **SSO.ID v2** (`https://{your-tenant}.sso.id/api`) to:
1. Run an hourly SIEM sync job that calls `GET https://{your-tenant}.sso.id/api/audit-logs/export-siem?format=splunk_hec` (or `datadog` / `aws_cloudwatch`) with `Authorization: Bearer ` (tenant context is resolved automatically from the token and domain URL), and forwards new audit events to our SIEM collector.
2. Run a daily SOC 2 compliance verification check that calls `GET https://{your-tenant}.sso.id/api/audit-logs/verify-integrity` and `GET https://{your-tenant}.sso.id/api/security/alerts`, posting a summary report (and alerting on any hash-chain discrepancy or high-severity security alert) to our SecOps Slack/PagerDuty webhook.