Skip to main content

Module tenant_keys

Module tenant_keys 

Source
Expand description

Encryption under a tenant’s own key.

Each tenant has a key of its own for the secrets the server has to read back. The key is stored wrapped by a platform key (see haste_repository::tenant_key), so reading the database does not give it away. A tenant gets its key the first time something is encrypted for it.

Keys have versions. A value is encrypted under the tenant’s active key and is stored with that key’s version, which is what decrypts it later, also once another version has become the active one.

Structs§

TenantEncryptionResult
A value encrypted for a tenant, with the version of the tenant’s key that decrypts it. Store the version next to the value.
TenantKeys
Encrypts and decrypts with the keys of tenants.

Enums§

TenantKeyError