docs(design): SOC 2 / HIPAA compliance plan - #919
Conversation
Grounded gap analysis of the current tree (18 anchored findings) plus a five-phase roadmap: program/legal groundwork, platform hardening (audit trail, field encryption, retention, MFA, CI scanning), orgs/RBAC, a hosted HIPAA compliance profile, and the SOC 2 Type I -> Type II path with HIPAA mapping. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This is a useful foundation. Before we adopt it as the execution roadmap, I’d like us to organize the work around one governing principle:
We should not depend on content classification to decide whether a particular message contains PHI. The account-level capability defines the boundary. Direction1. Architecture and PHI-boundary work comes first. Create a canonical data-flow and storage inventory covering the complete path:
It also needs every secondary copy and operational surface: webhook outbox/delivery payloads, River jobs, templates, contacts, lifecycle evidence, idempotency responses, WAL/replicas/backups, logging, monitoring, analytics, support tooling, email providers, and LLM APIs. For each location, record what data reaches it, why it is necessary, how long it persists, how it is encrypted, how it is deleted, who can access it, and which vendor/service/configuration receives it. This phase must also make an explicit isolation decision for HIPAA accounts: a dedicated HIPAA cell or a documented logical and cryptographic isolation design. A flag alone is not the isolation boundary. 2. Minimize the PHI boundary. HIPAA-path logs and telemetry should contain opaque identifiers and operational state, for example Encryption and retention must cover every PHI-bearing copy, not only the primary 3. HIPAA mode should enforce invariants. An account-level capability such as
4. Compliance evidence follows and validates the architecture. Before the first BAA customer: complete the formal Security Risk Analysis; execute the required infrastructure/subprocessor BAAs; prepare the e2a customer BAA; adopt security, access-control, incident/breach, backup/recovery, workforce, retention, and vendor-management policies; and train personnel with access to the HIPAA boundary. Vendor review must verify the exact service and executed agreement, not just that a vendor brand offers some HIPAA-eligible products. Track this evidence privately and review it regularly. 5. Productize after the controls exist. Expose HIPAA mode, configurable retention, secure deletion, customer-visible security/audit logs, and the relevant administrative controls. A secure-message portal—notification email followed by authenticated portal access—is a valuable later enhancement for customers who need stronger delivery guarantees, but it is not required for the initial HIPAA offering. SOC 2 is complementary enterprise work and can proceed in parallel or afterward; it is not a prerequisite for signing a BAA or launching the first correctly scoped HIPAA service. Proposed sequencing
For positioning, preserve the document’s distinction between compliance-capable software and a hosted HIPAA mode under BAA. Once the hosted controls are operating and BAAs are available, the product line can become: “e2a — HIPAA-compliant email infrastructure for AI agents, available under BAA.” |
Restructure per maintainer review on tokencanopy#919: account-level capability defines the PHI boundary (never content classification); PHI inventory, trust boundaries, and an explicit isolation decision come first; data- plane hardening covers every secondary copy (per-account keys, crypto- erasure, data-access audit events, PHI-safe observability, per-copy secure deletion); compliance evidence (SRA, policies, executed BAAs, training) validates the architecture before the first BAA customer; HIPAA product mode enforces invariants at call sites with no-downgrade TLS; SOC 2 moves to its own parallel commercial track. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZ1cdVL4AhDA7MHh8yzQyH
|
Revised in b143633 — the plan is now organized around the governing principle: for a HIPAA-enabled account, all email + metadata is regulated data on a fail-closed path; the account capability defines the boundary, never content classification (added explicitly to "What we deliberately do not do"). Mapping to your five points:
Also kept your end-state positioning: build-out ships "compliance-capable software + hosted HIPAA mode under BAA," and only once controls operate and BAAs are executed does the hosted line become "e2a — HIPAA-compliant email infrastructure for AI agents, available under BAA." 🤖 Generated with Claude Code |
Summary
Docs-only — no code, API, or client-surface changes. (Client surface checklist removed per template guidance.)
Highlights reviewers may want to weigh in on:
audit_eventsshape and the envelope-encryption migration strategy (dual-read + River re-encryption, no destructive DDL onmessages).Operational risk
None from this PR itself (documentation only). The document does propose future changes with operational weight (field encryption migration, retention sweeps, production
sslmodeenforcement); each would land as its own PR train with tests and migration review.Test plan
scripts/check-repository-text-integrity.shpassesscripts/check-no-committed-credentials.shpasses