Skip to main content
Version: 1.0.0-beta

Encryption Reference

AIIA implements encryption at multiple layers to protect audit data both at rest and in transit.

Data in Transit

ProtocolUsageDetails
TLS 1.3All HTTP trafficFrontend ↔ Backend, API calls
TLS 1.2+Keycloak SSOOIDC token exchange
TLSDatabase connectionsPostgreSQL with SSL mode
TLSRedis connectionsCache communication
HTTPSMinIO storageObject storage access

Data at Rest

Database

  • PostgreSQL supports Transparent Data Encryption (TDE) at the storage level
  • Column-level encryption available for sensitive fields

API Keys (AI Models)

  • API keys for AI providers are encrypted using AES-256-GCM
  • Encryption key: SECRET_ENCRYPTION_KEY environment variable
  • Keys are never returned in full — displayed as •••••{last4}
  • Encryption happens server-side before database storage

Object Storage (MinIO)

  • Server-Side Encryption (SSE) enabled
  • Evidence files are encrypted at rest
  • Bucket-level encryption policies

Evidence Files

  • File hash (SHA-256) computed at upload time
  • Hash stored with evidence metadata for integrity verification
  • Chain-of-custody maintained (uploader, timestamps, hash)

Key Management

KeyPurposeStorage
SECRET_ENCRYPTION_KEYAI API key encryptionEnvironment variable
JWT_SECRETSession token signingEnvironment variable
MinIO keysObject storage authEnvironment variable
PostgreSQL SSL certDatabase connectionFile system

Security Best Practices

  • Rotate SECRET_ENCRYPTION_KEY periodically
  • Use strong passwords (minimum 16 characters)
  • Enable PostgreSQL SSL in production
  • Use a secrets manager (HashiCorp Vault, AWS Secrets Manager) for production deployments
  • Never store encryption keys in code or version control