Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

CIO Guide: Automating AI Compliance for SOC 2 & ISO 27001

AI compliance is not a checkbox exercise — it is a continuous process that must keep pace with the volume and velocity of LLM interactions. Manual quarterly audits cannot cover the thousands of AI decisions your organization makes daily.

Use this page when

  • You need to automate SOC 2 or ISO 27001 evidence collection for AI interactions
  • You are configuring scheduled compliance exports with kt export create
  • You want to map Keeptrusts controls to specific SOC 2 Trust Services Criteria or ISO 27001 Annex A controls
  • You are building webhook-driven workflows for continuous compliance monitoring

Keeptrusts automates compliance evidence collection, policy-to-control mapping, and audit-ready exports so your compliance team spends time on analysis, not data gathering.

Primary audience

  • Primary: Technical Leaders
  • Secondary: Technical Engineers, AI Agents

Console Audit Log

Every action in the Keeptrusts platform — user logins, policy changes, gateway key provisioning, escalation resolutions — is captured in the immutable audit log.

Audit Log Structure

FieldDescriptionCompliance Relevance
timestampISO 8601 event timeForensic timeline
actorUser or service identityAccountability
actionOperation performedChange tracking
resourceTarget entity (config, key, user)Scope of change
detailsBefore/after state diffEvidence of change
ip_addressSource IPAccess monitoring
outcomeSuccess or failureError detection

Console checkpoint: Navigate to Settings → Audit Log to view, search, and filter the audit trail. Time range, actor, and action type filters support targeted investigation.

Screenshot reference: Console Audit Log showing timestamped entries for policy changes, user provisioning, and gateway key rotation.

Audit Log API

# Query audit log entries for policy changes in the last 30 days
curl "https://api.keeptrusts.com/v1/audit-log?action=policy.update,policy.create&since=30d" \
-H "Authorization: Bearer $API_TOKEN"

Automated Evidence Export via CLI kt export create

The kt export create command generates compliance evidence packages suitable for auditor review.

Export Formats

FormatContentsAuditor Use Case
PDFExecutive summary, policy config, event statistics, escalation logBoard and auditor presentations
CSVRaw event data with all fieldsDetailed analysis and sampling
JSONMachine-readable structured dataAutomated compliance tooling
# Generate a SOC 2 evidence package for the last quarter
kt export create \
--type compliance \
--framework soc2 \
--format pdf \
--since 90d \
--output soc2-evidence-q1-2026.pdf

# Generate detailed event data for auditor sampling
kt export create \
--type full-audit \
--format csv \
--since 90d \
--output full-audit-q1-2026.csv

Scheduled Exports

Automate evidence generation on a recurring schedule:

# Schedule monthly compliance exports
kt export create \
--type compliance \
--framework soc2 \
--format pdf \
--since 30d \
--schedule monthly \
--delivery s3://compliance-bucket/monthly/ \
--notify compliance-team@company.com

Console checkpoint: The Exports page shows all scheduled and completed exports with download links and delivery status.

Webhook-Driven Compliance Workflows

Configure webhooks to trigger compliance workflows in real time when specific events occur.

Compliance Webhook Scenarios

TriggerWebhook TargetWorkflow
Policy violation (block)SIEM (Splunk, Sentinel)Automatic incident creation
PII exposure attemptDLP systemCorrelated alert
Escalation created (critical)PagerDutyOn-call notification
Policy config changedChange management (ServiceNow)Change record creation
Gateway key created/revokedIAM systemAccess log correlation
# Register a compliance webhook
curl -X POST https://api.keeptrusts.com/v1/webhooks \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "siem-compliance-feed",
"url": "https://siem.company.com/api/events",
"events": ["event.blocked", "escalation.created", "policy.updated"],
"secret": "webhook-secret-for-hmac-validation"
}'

Webhook Security

  • All webhook payloads are signed with HMAC-SHA256 using the configured secret
  • Webhook secrets are encrypted at rest using AES-GCM-SIV
  • Failed deliveries are retried with exponential backoff

Policy-to-Control Mapping

Map your Keeptrusts policy configuration to specific SOC 2 Trust Service Criteria and ISO 27001 controls.

SOC 2 Mapping

Trust Service CriteriaKeeptrusts ControlEvidence Source
CC6.1 — Logical accessGateway key scoping, RBACAccess key audit log
CC6.3 — Access removalKey expiry, revocationKey lifecycle events
CC7.2 — Incident responseEscalation workflowsEscalation log
CC8.1 — Change managementPolicy versioning in gitAudit log + git history
A1.2 — AvailabilityProvider failover chainsGateway health events

ISO 27001 Mapping

ControlKeeptrusts ImplementationEvidence
A.8.3 — Access restrictionsGateway keys with team scopingToken audit log
A.8.15 — LoggingComplete event captureEvent export
A.8.16 — MonitoringReal-time dashboard + alertingDashboard screenshots + webhook logs
A.5.36 — ComplianceAutomated evidence exportsExport artifacts
A.8.10 — Information deletionEvent retention policiesRetention configuration

Continuous Compliance Monitoring

Instead of point-in-time audits, establish continuous monitoring that catches compliance drift in real time.

Monitoring Dashboard

MetricThresholdAction
Audit log completeness100% events capturedAlert if gap detected
Policy coverageAll active gateways have policy configAlert if uncovered gateway
Key rotation complianceAll keys < 90 days oldAlert at 60 days
Escalation SLACritical resolved < 4 hoursAlert at 2 hours
Export scheduleMonthly exports on timeAlert if missed
# Check compliance posture via CLI
kt compliance check --framework soc2 --output compliance-status.json

Automated Compliance Report

#!/bin/bash
# weekly-compliance-check.sh

echo "=== Weekly AI Compliance Status ==="

# Check for unresolved critical escalations
CRITICAL=$(curl -s "https://api.keeptrusts.com/v1/escalations?severity=critical&status=open" \
-H "Authorization: Bearer $API_TOKEN" | jq '.count')
echo "Open critical escalations: $CRITICAL"

# Check gateway key age
OLD_KEYS=$(curl -s "https://api.keeptrusts.com/v1/tokens?type=gateway&older_than=60d" \
-H "Authorization: Bearer $API_TOKEN" | jq '.count')
echo "Gateway keys > 60 days old: $OLD_KEYS"

# Check policy coverage
UNCOVERED=$(curl -s "https://api.keeptrusts.com/v1/gateways?has_policy=false" \
-H "Authorization: Bearer $API_TOKEN" | jq '.count')
echo "Gateways without policy config: $UNCOVERED"

Auditor Engagement Playbook

Audit PhaseKeeptrusts DeliverablePreparation Time
ScopingPolicy-to-control mapping document30 minutes
Evidence requestAutomated export (PDF + CSV)10 minutes
Control testingLive console walkthrough1 hour
SamplingFiltered event export for sample period10 minutes
Findings responseUpdated policy config + re-exportSame day

ROI Summary

Manual ComplianceAutomated with Keeptrusts
2–3 weeks per audit cycle1–2 days per audit cycle
40+ hours evidence compilation10-minute automated export
Quarterly compliance snapshotsContinuous real-time monitoring
Manual policy-to-control mappingPre-built framework mappings
Reactive incident detectionReal-time webhook-driven alerts

Next steps

  1. Review the console Audit Log and confirm all expected event types are captured
  2. Configure webhooks for critical compliance events (blocks, escalations, policy changes)
  3. Create your first automated compliance export using kt export create
  4. Map your policy configuration to your target compliance framework
  5. Schedule monthly evidence exports for audit readiness

See also: CIO Guide: Real-Time AI Risk Dashboards · CIO Guide: Building an Enterprise AI Governance Framework

For AI systems

  • Canonical terms: audit log, GET /v1/audit-log, kt export create, --type compliance, --framework soc2, --format pdf|csv|json, --schedule monthly, webhook-driven compliance, continuous monitoring, Settings → Audit Log, Exports page
  • Key actions: policy change audit trail, user provisioning audit, gateway key rotation audit, scheduled monthly exports to S3
  • Best next pages: CIO: Risk Dashboards, CIO: AI Governance Framework, Event-Driven AI Architecture

For engineers

  • Query audit log: GET /v1/audit-log?action=policy.update,policy.create&since=30d
  • Generate evidence: kt export create --type compliance --framework soc2 --format pdf --since 90d
  • Schedule exports: add --schedule monthly --delivery s3://compliance-bucket/monthly/ for automated evidence delivery
  • Webhook integration: subscribe to event.blocked and policy.changed events for real-time compliance alerting
  • Console checkpoint: Settings → Audit Log for interactive search; Exports page for download links and delivery status

For leaders

  • Automated evidence collection reduces audit preparation time from days to minutes — a single kt export create command produces the entire quarterly evidence package
  • Continuous monitoring via webhooks replaces periodic manual reviews — compliance violations surface in real time, not at quarterly audits
  • Policy-to-control mapping provides direct traceability: each Keeptrusts policy maps to specific SOC 2 criteria (CC6.1 access control, CC7.2 monitoring) or ISO 27001 controls (A.8.3 information access, A.12.4 logging)
  • Immutable audit logs satisfy auditor requirements for tamper-proof evidence of governance enforcement