What you get

Field-level encryption for the data you would least like to leak: tokens, credentials, personal details.

  • Encryption declared in the model

    Mark a field as encrypted at rest in the studio. The generated storage layer encrypts it on write and decrypts it on read, so application code does not change.

  • Authenticated encryption

    Values are encrypted with AES-256-GCM and bound to their context, so a value copied to another record does not decrypt there.

  • Key rotation

    A keyring: the newest key encrypts, every key still decrypts. Add a key, run the rotation command, and existing values move to the new key.

  • Fails closed

    Without a key configured, the service refuses to work rather than storing values in plain text.

How it works

The Secret Service is a port with an internal backend component. The generated repositories use it for every field marked encrypted at rest, and refuse queries that filter on an encrypted field, because the stored value is ciphertext. Fields marked as secret are also masked whenever they leave the application.

When you deploy through Fractal Studio, the encryption keys are generated for you and stored as encrypted environment secrets. See the security page for how this fits with the rest of the baseline.