HIPAA Compliance Guide
This guide helps compliance officers configure Lucid to meet the requirements of the Health Insurance Portability and Accountability Act (HIPAA) for AI systems that process Protected Health Information (PHI).
Overview
HIPAA establishes national standards for protecting sensitive patient health information. The HIPAA Security Rule requires covered entities and business associates to implement administrative, physical, and technical safeguards to ensure the confidentiality, integrity, and availability of electronic Protected Health Information (ePHI).
Lucid helps healthcare organizations meet these requirements through:
- PHI detection and protection to identify and safeguard health information
- Comprehensive audit controls to track all access to ePHI
- Access control mechanisms to restrict system access to authorized users
- Security measures to protect against threats and unauthorized access
Key HIPAA Provisions and Lucid Auditors
| HIPAA Section | Requirement | Recommended Auditor |
|---|---|---|
| 164.312(a) | Access Control | PII Compliance Auditor, Policy Auditor |
| 164.312(b) | Audit Controls | Observability Auditor |
| 164.312(c) | Integrity | Eval Auditor, Model Security Auditor |
| 164.312(d) | Person/Entity Authentication | Secrets Auditor |
| 164.312(e) | Transmission Security | Guardrails Auditor, Secrets Auditor |
| 164.502 | PHI Use/Disclosure Limitations | PII Compliance Auditor |
Deploying for HIPAA Compliance
Quick Start
Deploy an AI environment with the HIPAA compliance profile:
lucid apply --app open-webui --model llama-3.1-8b --profile hipaa
This enables the following auditors: - PII Compliance Auditor - PHI detection and access control - Secrets Auditor - Credential protection - Observability Auditor - Audit controls and activity logging - Guardrails Auditor - Transmission security and threat protection - Eval Auditor - Model integrity verification - Model Security Auditor - Model integrity verification
Custom Configuration
For healthcare environments requiring specific controls, create a YAML configuration:
# hipaa-environment.yaml
apiVersion: lucid.io/v1alpha1
kind: LucidEnvironment
metadata:
name: hipaa-compliant-ai
spec:
infrastructure:
provider: aws
region: us-east-1
agents:
- name: hipaa-agent
model:
id: meta-llama/Llama-3.1-8B
gpu:
type: A10G
memory: 24GB
auditChain:
preRequest:
- auditorId: lucid-guardrails-auditor
name: Transmission Security (164.312(e))
env:
INJECTION_BLOCK_ON_DETECTION: "true"
INJECTION_THRESHOLD: "0.7"
- auditorId: lucid-pii-compliance-auditor
name: PHI Protection (164.502)
env:
PII_DETECTION_ENABLED: "true"
PII_CATEGORIES: "name,dob,ssn,mrn,health_condition,medication,diagnosis"
PHI_DETECTION_ENABLED: "true"
PHI_REDACT_ON_DETECTION: "true"
ACCESS_CONTROL_ENABLED: "true"
- auditorId: lucid-policy-auditor
name: Credential Protection (164.312(d))
env:
CREDENTIAL_DETECTION_ENABLED: "true"
postResponse:
- auditorId: lucid-observability-auditor
name: Audit Controls (164.312(b))
env:
LOG_RETENTION_DAYS: "2190" # 6 years per HIPAA
LOG_ALL_PHI_ACCESS: "true"
LOG_USER_IDENTITY: "true"
AUDIT_LEVEL: "detailed"
- auditorId: lucid-eval-auditor
name: Integrity Controls (164.312(c))
env:
MODEL_INTEGRITY_CHECK: "true"
SAFETY_BENCHMARKS_ENABLED: "true"
Deploy with:
lucid apply -f hipaa-environment.yaml
Section-by-Section Guidance
164.312(a) - Access Control
Requirement: Implement technical policies and procedures for electronic information systems that maintain ePHI to allow access only to authorized persons or software programs.
Lucid Implementation:
- PII Compliance Auditor - Access control verification
- Validates user authorization before processing
- Supports role-based access control (RBAC)
-
Logs all access attempts
-
Policy Auditor - Policy enforcement
- Enforces organizational access policies
env:
ACCESS_CONTROL_ENABLED: "true"
REQUIRE_AUTHENTICATION: "true"
ROLE_BASED_ACCESS: "true"
Documentation for Auditors: The PII Compliance Auditor generates records of access control enforcement that can be provided to HIPAA auditors demonstrating compliance with this requirement.
164.312(b) - Audit Controls
Requirement: Implement hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use ePHI.
Lucid Implementation:
- Observability Auditor - Comprehensive audit logging
- Records all AI system activities
- Captures user identity, timestamps, and actions
- Logs are cryptographically signed within TEE
env:
LOG_RETENTION_DAYS: "2190" # 6 years per HIPAA
LOG_ALL_PHI_ACCESS: "true"
LOG_USER_IDENTITY: "true"
LOG_TIMESTAMP_PRECISION: "millisecond"
AUDIT_LEVEL: "detailed"
Accessing Audit Logs:
# View recent audit activity
lucid logs hipaa-agent --audit
# Export audit logs for compliance review
lucid passport export --from 2024-01-01 --to 2024-03-31 --format json > hipaa_audit.json
# Generate audit report
lucid passport export --compliance-report hipaa --format pdf
164.312(c) - Integrity
Requirement: Implement policies and procedures to protect ePHI from improper alteration or destruction.
Lucid Implementation:
- Model Security Auditor - Model integrity verification
- Verifies model weights haven't been tampered with
-
Detects unauthorized changes
-
Eval Auditor - Safety benchmarks
-
Runs safety benchmarks to ensure proper operation
-
TEE Execution - Hardware-based integrity protection
- All processing occurs in tamper-proof enclaves
- Cryptographic attestation proves integrity
env:
MODEL_INTEGRITY_CHECK: "true"
INTEGRITY_VERIFICATION_INTERVAL: "3600" # Check every hour
164.312(d) - Person or Entity Authentication
Requirement: Implement procedures to verify that a person or entity seeking access to ePHI is the one claimed.
Lucid Implementation:
- Secrets Auditor - Authentication verification
- Validates authentication tokens
- Detects exposed credentials that could enable impersonation
- Supports multi-factor authentication verification
env:
CREDENTIAL_DETECTION_ENABLED: "true"
CREDENTIAL_BLOCK_ON_DETECTION: "true"
REQUIRE_AUTHENTICATION: "true"
MFA_VERIFICATION: "true"
164.312(e) - Transmission Security
Requirement: Implement technical security measures to guard against unauthorized access to ePHI being transmitted over networks.
Lucid Implementation:
- Guardrails Auditor - Protects against transmission-based attacks
- Blocks prompt injection attempts via network
-
Prevents jailbreak attacks
-
Secrets Auditor - Credential and data protection
- Detects sensitive data in transmissions
- Prevents credential exposure
env:
INJECTION_BLOCK_ON_DETECTION: "true"
INJECTION_THRESHOLD: "0.7"
CREDENTIAL_DETECTION_ENABLED: "true"
164.502 - Uses and Disclosures of PHI
Requirement: A covered entity may not use or disclose PHI except as permitted or required.
Lucid Implementation:
- PII Compliance Auditor - PHI detection and redaction
- Identifies PHI in AI inputs and outputs
- Can automatically redact PHI before processing
- Logs all PHI encounters for audit purposes
env:
PHI_DETECTION_ENABLED: "true"
PII_CATEGORIES: "name,dob,ssn,mrn,health_condition,medication,diagnosis,insurance_id"
PHI_REDACT_ON_DETECTION: "true"
LOG_PHI_ENCOUNTERS: "true"
PHI Categories Detected: - Patient names - Dates of birth - Social Security Numbers - Medical Record Numbers (MRN) - Health conditions and diagnoses - Medications - Insurance IDs - Contact information
Evidence for HIPAA Audits
Required Documentation
Lucid provides the following evidence for HIPAA compliance assessments:
- Access Control Evidence
- Records of access control enforcement
- User authentication logs
-
Authorization verification records
-
Audit Trail
- Comprehensive logs of all ePHI access
- User identity and timestamps
-
Actions performed on the system
-
Integrity Evidence
- Model integrity verification results
- Hardware attestation certificates
-
AI Passport cryptographic proofs
-
Security Incident Records
- Blocked injection attempts
- Detected credential exposures
- PHI detection events
Generating Compliance Reports
# List all AI Passports (compliance certificates)
lucid passport list --from 2024-01-01
# Export detailed audit records
lucid passport export --format json --detailed > hipaa_evidence.json
# Generate HIPAA-specific compliance report
lucid passport export --compliance-report hipaa --format pdf > hipaa_report.pdf
# View security events
lucid logs hipaa-agent --security-events
For Your HIPAA Security Officer
The Security Officer can use Lucid outputs to:
- Document technical safeguards using AI Passport attestations
- Demonstrate audit controls via Observability Auditor logs
- Verify access control implementation through PII Compliance Auditor records
- Evidence integrity controls with Eval Auditor verification results
Business Associate Considerations
If you are a Business Associate using Lucid to process ePHI:
- Ensure BAA coverage - Verify your Lucid agreement includes Business Associate provisions
- Configure appropriate controls - Use the HIPAA profile as a baseline
- Document your configuration - Maintain records of your security settings
- Report incidents promptly - Use Lucid's security event logs to identify potential breaches
Minimum Necessary Standard
HIPAA requires that covered entities limit PHI disclosures to the minimum necessary. Lucid supports this through:
- PHI Redaction - Automatically removes unnecessary PHI from AI processing
- Access Controls - Restricts system access based on roles
- Audit Logging - Documents what PHI was accessed and by whom
env:
PHI_REDACT_ON_DETECTION: "true"
MINIMUM_NECESSARY_ENFORCEMENT: "true"
ROLE_BASED_ACCESS: "true"
Best Practices for Healthcare AI
- Enable the HIPAA profile - Provides comprehensive baseline protection
- Configure PHI redaction - Minimize unnecessary PHI in AI processing
- Retain logs for 6 years - Meet HIPAA documentation requirements
- Use US regions - Avoid international data transfer complications
- Review audit logs regularly - Monitor for unusual access patterns
- Document everything - Maintain configuration files as compliance records
- Test incident response - Use security event logs to practice breach response
Related Resources
- Auditor Catalog - Detailed HIPAA control mappings
- Policy as Code - Custom healthcare compliance rules
- SOC 2 Compliance Guide - Complementary controls for service organizations
- GDPR Compliance Guide - For organizations also serving EU patients