SOC 2 compliance is more about proving you can secure data than about securing it perfectly.

Let’s imagine a hypothetical AI company, "AetherAI," that builds a recommendation engine for e-commerce. Their core product is a service that takes user browsing history and purchase data, runs it through a machine learning model, and returns personalized product recommendations. AetherAI wants to get SOC 2 compliant because their enterprise clients demand it before they’ll entrust their customer data to AetherAI’s platform.

Here’s how AetherAI’s system looks in action:

  1. Data Ingestion: AetherAI receives user data (anonymized IDs, product IDs, timestamps, clickstream events) via an API from client e-commerce platforms. This data lands in a Kafka topic named user_events_raw.

    {
      "userId": "user_abc123",
      "productId": "prod_xyz789",
      "eventType": "click",
      "timestamp": "2023-10-27T10:30:00Z",
      "clientIp": "192.168.1.100"
    }
    
  2. Data Processing & Feature Engineering: A Spark streaming job reads from user_events_raw, performs transformations like sessionization, and extracts features. This processed data is written to another Kafka topic, user_features_processed.

  3. Model Inference: A microservice, recommendation-service, consumes from user_features_processed. It loads a pre-trained TensorFlow model from an S3 bucket. For each user, it passes their features to the model and gets back a list of recommended productIds.

  4. Recommendation Delivery: The recommendation-service stores the generated recommendations in a Redis cache keyed by userId. When an e-commerce client’s frontend requests recommendations for a userId, the system checks Redis first. If not found, it triggers an inference job and caches the result.

  5. Logging & Auditing: All API requests, Kafka messages, Spark job events, and inference requests are logged to Elasticsearch for auditing and monitoring.

The Problem SOC 2 Solves for AetherAI:

The core problem SOC 2 addresses for AetherAI is demonstrating to its clients that it handles sensitive customer data responsibly, securely, and with integrity. Clients aren’t just buying a recommendation engine; they’re entrusting AetherAI with the digital footprints of their customers. SOC 2 provides a standardized framework to prove AetherAI has implemented robust controls around:

  • Security: Protecting the system and data from unauthorized access.
  • Availability: Ensuring the service is operational and accessible.
  • Processing Integrity: Guaranteeing data processing is accurate, complete, timely, and authorized.
  • Confidentiality: Protecting information designated as confidential.
  • Privacy: Ensuring personal information is collected, used, retained, disclosed, and disposed of in conformity with privacy commitments.

Internal Mechanics & Levers:

AetherAI controls several key levers to maintain SOC 2 compliance for this system:

  • Access Control: Who can access the Kafka clusters, Spark jobs, Redis, S3, and Elasticsearch? AetherAI uses IAM roles and policies for AWS resources and a combination of Kerberos and ACLs for Kafka/Spark. They define granular permissions, ensuring recommendation-service can only read from user_features_processed and write to Redis, not to user_events_raw.
  • Data Encryption: Is data encrypted at rest and in transit? AetherAI ensures S3 buckets are encrypted with AES-256, EBS volumes attached to Spark workers use encryption, and Kafka/Spark communicate over TLS.
  • Network Security: How is the infrastructure protected? AetherAI uses VPCs, security groups, and network ACLs to restrict traffic. Only specific client IPs are allowed to hit the ingestion API, and internal services communicate on private subnets.
  • Monitoring & Alerting: How does AetherAI know if something goes wrong? They configure alerts in Prometheus/Grafana for Kafka lag, Spark job failures, Redis latency spikes, and unusual Elasticsearch query patterns. Alerts are routed to PagerDuty.
  • Change Management: How are changes to the recommendation model or infrastructure deployed? AetherAI uses a CI/CD pipeline with mandatory code reviews, automated testing, and staged rollouts. Any significant change requires an approval from a compliance officer.
  • Data Retention & Deletion: How long is data kept, and how is it securely deleted? AetherAI defines policies for Kafka topic retention (e.g., 7 days for raw, 30 days for processed), Elasticsearch index lifecycle management, and Redis TTLs. For PII deletion requests, they have a process to scrub userIds from all data stores.

The Counterintuitive Part:

Many interpret SOC 2 as a "security checklist" that, once passed, means a system is "secure." The reality is that SOC 2 is an ongoing attestation of controls. The audit is a point-in-time snapshot. The real value comes from the discipline of maintaining those controls daily. AetherAI’s auditors might check logs from March, but AetherAI must ensure their audit trails are consistently generated and protected every day thereafter. A perfectly compliant system can become non-compliant the moment a developer accidentally grants broad access or a new feature bypasses a logging mechanism.

The next step for AetherAI is understanding how to handle audit requests and prepare for the independent auditor’s assessment.

Want structured learning?

Take the full AI Security course →