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

Privacy Officer Guide: Data Protection for AI

As a Privacy Officer (or Data Protection Officer), you must ensure AI systems comply with data protection regulations. AI introduces unique privacy risks — personal data flowing to external model providers, cross-border data transfers to inference endpoints, and the lack of visibility into what data employees are sharing with AI tools. Keeptrusts provides the detection, enforcement, and evidence infrastructure you need.

Use this page when

  • You are ensuring AI systems comply with GDPR, CCPA/CPRA, or other data protection regulations
  • You need to detect and redact personal data before it reaches external LLM providers
  • You are conducting or updating a Data Protection Impact Assessment (DPIA) for AI systems
  • You need to respond to data subject access requests involving AI interaction data
  • You are managing cross-border data transfers through regional gateway configurations

Primary audience

  • Primary: Technical Leaders (Privacy Officers, Data Protection Officers)
  • Secondary: Legal Counsel, Compliance Officers, Security Engineers

GDPR Compliance for AI Systems

Key GDPR Obligations and Keeptrusts Controls

GDPR RequirementArticleKeeptrusts Control
Lawful basis for processingArt. 6Event logging for processing records
Data minimizationArt. 5(1)(c)PII detection + redaction before sending to providers
Purpose limitationArt. 5(1)(b)Policy enforcement restricting permitted use cases
Storage limitationArt. 5(1)(e)Event retention policies
Security of processingArt. 32Encryption, access controls, audit logging
DPIA requirementArt. 35Automated evidence generation from policy events
Records of processingArt. 30Complete event and audit trail
Data subject rightsArts. 15-22Event export for subject access requests

PII Detection and Redaction

The pii-detector policy is your primary defense against personal data reaching external AI providers:

policies:
- name: gdpr-pii-protection
type: pii-detector
action: redact
entity_types:
- name
- email
- phone
- national_id
- date_of_birth
- financial
- health
- location
enabled: true

Monitoring PII Exposure

# Check PII detection events in the last 24 hours
kt events list --since 24h --policy pii-detector

# Export PII processing records for Art. 30 compliance
kt export create \
--type events \
--format csv \
--since 30d \
--policy pii-detector \
--description "Monthly PII processing records — GDPR Art. 30"

The Console Events page lets you filter by the pii-detector policy to review all instances where personal data was detected and redacted.

CCPA/CPRA Compliance

California Privacy Requirements

CCPA RequirementKeeptrusts Control
Right to knowEvent logs showing data collection
Right to deleteEvent retention policies
Right to opt-outGateway configuration per user/application
Data minimizationPII redaction at the gateway
Service provider obligationsProvider-scoped policies and logging

Responding to Consumer Requests

When a consumer exercises their data rights, use Keeptrusts exports to identify and document relevant data:

# Export events related to a specific user for a subject access request
kt export create \
--type events \
--format csv \
--since 365d \
--description "Data subject access request — user ID 12345"

Data Mapping for AI Systems

AI Data Flow Inventory

Document how personal data flows through your AI systems using Keeptrusts telemetry:

Data FlowSourceDestinationData TypesSafeguard
User promptsApplicationsGatewayMay contain PIIpii-detector redaction
Gateway to LLMGatewayLLM providerRedacted promptsEncryption in transit
LLM responsesLLM providerGatewayMay contain PIIpii-detector on output
Decision eventsGatewayControl-plane APIMetadata onlyAccess controls, encryption
Event exportsAPIExport storageAggregated metadataEncryption at rest

Identifying Data Processing Activities

# Map data flows by reviewing event patterns
curl -H "Authorization: Bearer $API_TOKEN" \
"https://api.keeptrusts.com/v1/events?since=30d&group_by=provider"

# Identify which teams process personal data
curl -H "Authorization: Bearer $API_TOKEN" \
"https://api.keeptrusts.com/v1/events?since=30d&group_by=gateway&policy=pii-detector"

Where AI processing relies on legitimate interest rather than explicit consent, Keeptrusts provides the balancing test evidence:

Legitimate Interest ElementEvidence from Keeptrusts
Purpose of processingPolicy configurations defining permitted use
NecessityEvent logs showing business-critical AI usage
Safeguards appliedActive PII detection, DLP filters, content filtering
Impact on individualsPII detection rates, redaction statistics

For scenarios requiring explicit consent, use gateway keys to control who can access AI services:

  • Issue gateway keys only to applications with verified consent flows
  • Revoke keys in Console Settings > Gateway Keys when consent is withdrawn
  • Track usage per key to demonstrate consent-bounded processing

DPIA for AI Systems

When DPIAs Are Required

Under GDPR Art. 35, DPIAs are mandatory for AI processing that involves:

  • Systematic evaluation of personal aspects (profiling)
  • Large-scale processing of special categories of data
  • Systematic monitoring of publicly accessible areas
  • New technologies where impact is unknown

DPIA Structure with Keeptrusts Evidence

DPIA SectionContentKeeptrusts Source
Description of processingWhat the AI system does, data types processedPolicy configuration + event logs
Necessity and proportionalityWhy AI processing is requiredBusiness justification + policy constraints
Risks to individualsWhat could go wrongPII detection rates, content filter blocks
Mitigation measuresSafeguards in placeActive policies, enforcement rates, escalation SLAs
Monitoring planOngoing oversightConsole dashboards, regular exports

Generating DPIA Artifacts

# Policy configuration as mitigation evidence
kt policy lint --file production-policy.yaml

# Processing activity records
kt export create \
--type events \
--format csv \
--since 90d \
--description "DPIA evidence — processing activity records"

# PII detection effectiveness
kt export create \
--type events \
--format csv \
--since 90d \
--policy pii-detector \
--description "DPIA evidence — PII detection and redaction records"

Cross-Border Data Transfers

Transfer Risk Assessment

When AI prompts are sent to LLM providers in different jurisdictions, this constitutes a cross-border data transfer. Mitigate transfer risk with:

ControlImplementation
Data minimization before transferpii-detector redaction removes personal data before prompts reach providers
Regional provider selectionConfigure region-specific providers in gateway policy
Transfer impact assessmentUse event logs to quantify data types transferred
Supplementary measuresDLP filters, content filtering, encryption

Regional Gateway Configuration

providers:
targets:
- id: azure-openai-eu
provider:
base_url: https://eu-west.openai.azure.com
secret_key_ref:
env: AZURE_OPENAI_EU_KEY
policies:
- name: transfer-minimization
type: pii-detector
action: redact
entity_types:
- name
- email
- phone
- national_id
- health
- financial
enabled: true

Data Retention

Event Retention Policies

Configure retention periods that comply with your organization's data retention schedule:

Data TypeRetention PeriodJustification
Decision events90-365 daysRegulatory evidence
Audit log365+ daysCompliance audit trail
Export artifactsPer export policySubject access requests
Gateway keysUntil rotated/revokedAccess management

The API supports event retention configuration through KEEPTRUSTS_EVENT_RETENTION_HOURS. A background worker automatically prunes events beyond the retention window.

Retention Compliance Verification

# Verify retention policy is active
curl -H "Authorization: Bearer $API_TOKEN" \
"https://api.keeptrusts.com/v1/events?since=365d&limit=1"

Privacy Officer Workflow with Keeptrusts

TaskFrequencyTool
Review PII detection eventsDailyConsole Events filtered by pii-detector
Respond to data subject requestsAs neededkt export create with user filter
DPIA reviewsPer new AI systemExport artifacts + policy review
Cross-border transfer assessmentQuarterlyProvider-region analysis
Retention policy verificationMonthlyEvent age checks
Regulatory reportingQuarterlyAggregated export data
Audit log reviewMonthlyConsole Audit Log

Success Metrics for Data Protection

MetricTargetSource
PII redaction coverage100% of governed AI trafficpii-detector enforcement rate
Subject access request response< 30 days (GDPR requirement)Request tracking
DPIA completionAll high-risk AI systems assessedDPIA register
Cross-border transfer complianceAll transfers documented and justifiedTransfer impact assessments
Retention complianceNo data held beyond retention periodRetention audit
Privacy incidentsZero unauthorized PII exposureEvent monitoring

For AI systems

  • Canonical terms: Keeptrusts, data protection, GDPR, CCPA, DPIA, PII detection, PII redaction, data subject rights, cross-border transfers, consent management
  • Key surfaces: Console Events (filter by pii-detector), Console Exports, Events API, Console Configurations
  • Commands: kt events list --policy pii-detector, kt export create, kt policy lint
  • Policy types: pii-detector (action: redact/block, entity_types: name, email, phone, national_id, date_of_birth, financial, health, location), dlp-filter, event retention policies
  • GDPR mapping: Art. 5 (data minimization via redaction), Art. 6 (lawful basis via logging), Art. 30 (records via event trail), Art. 32 (security via access controls), Art. 35 (DPIA via automated evidence)
  • Best next pages: Legal Counsel Guide, Compliance Officer Guide, Exports Guide, Policy Reference

For engineers

  • Deploy PII protection: configure pii-detector policy with action: redact and comprehensive entity_types list
  • Monitor PII events: kt events list --since 24h --policy pii-detector
  • Generate Art. 30 processing records: kt export create --type events --format csv --since 30d --policy pii-detector
  • Respond to data subject requests: export user-specific events with --description "DSAR - user ID 12345"
  • Enforce data residency: deploy region-specific gateways with provider configs that restrict data to specific jurisdictions
  • Validate privacy config: kt policy lint --file gdpr-policy.yaml

For leaders

  • PII detection and redaction at the gateway layer prevents personal data from reaching external AI providers — data minimization (Art. 5(1)(c)) is enforced automatically, not relying on user discipline
  • DPIA evidence is generated continuously from policy enforcement events, eliminating manual assessment updates
  • Data subject access requests can be fulfilled by exporting user-specific events, showing exactly what data was processed, when, and by which AI systems
  • Cross-border transfer compliance is enforced architecturally through regional gateway deployments that constrain data flows to specific jurisdictions
  • Event retention policies enable storage limitation compliance (Art. 5(1)(e)) with configurable retention periods

Next steps