Skip to content

Data encryption for sensitive fields #1027

Description

@nafiuishaaq

Description
Implement field-level encryption for sensitive data stored in database. Encrypt fields: email addresses, user metadata, and any PII (Personally Identifiable Information). Use AES-256-GCM encryption with keys stored in environment variables (or KMS for production). Implement transparent encryption using TypeORM subscriber or custom repository methods. Ensure encrypted fields remain searchable using deterministic encryption for exact matches (email lookups) or indexed hashes for searches.

Acceptance Criteria
Sensitive fields encrypted before database storage

AES-256-GCM encryption algorithm

Encryption keys from environment (rotatable)

Decryption automatic on entity load

Email field searchable via hash index for exact matches

Migration for existing data encryption

Unit tests for encryption/decryption

Performance overhead < 10ms per operation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions