Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 913 Bytes

00004-encrypt-database-fields.md

File metadata and controls

29 lines (16 loc) · 913 Bytes

8. Encrypt database fields

Date: 2023-08-17

Status

Accepted

Context

Currently the database is encrypted at rest but unauthorised access to a running database instance could still result in exposure of PII.

We want to encrypt the PII fields to lessen the impact of any breach of the database.

Rails 7 introduced encryption as a feature. It seamlessly encrypts the data on write and decrypts it on read provided you have the master key.

This means that we can encrypt the PII fields in the database without any change to the way we use and display the data.

Decision

We will use ActiveRecord Encryption to encrypt the PII fields on a per-model basis.

Consequences

All environments will require access to the master key to be able to decrypt the PII fields.

See the docs/encryption.md for details on managing the keys.