Encryptor.Ecto.MissingContextError exception (Encryptor.Ecto v0.2.0)

Copy Markdown View Source

Raised when the vault reports that required encryption-context keys were not supplied (ADR-0001 decision 6, acceptance amendment 2).

Kept separate from Encryptor.Ecto.DecryptError on purpose. The vault's {:missing_required_context_keys, _} is the one context failure that is distinguishable in its :reason, and what it reports is a host misconfiguration - a field pointed at a vault whose profile requires a pair this declaration does not supply. That is a deployment defect to fix, not an integrity event to investigate, and the two should not page the same person with the same words.

:missing_keys carries the key names the vault named. They are names, not values.

Summary

Types

t()

An exception in the encrypted-field family.

Types

t()

@type t() :: %Encryptor.Ecto.MissingContextError{
  __exception__: true,
  column: term(),
  context_keys: term(),
  missing_keys: term(),
  reason: term(),
  table: term(),
  tenant: term()
}

An exception in the encrypted-field family.