Error structs raised and returned by the AshVault crypto core.
Every error is a Splode error struct, which means it
is a regular Exception that can be raised, but also carries a :class (always
:invalid here) so it can be aggregated by Ash's error handling.
The modules are:
AshVault.Errors.MissingScope— the encryption scope could not be resolvedAshVault.Errors.KeyNotFound— the provider has no such key and no tombstoneAshVault.Errors.KeyDestroyed— the key was deliberately destroyed (crypto-erasure)AshVault.Errors.ProviderUnavailable— transport/backend failure, retryableAshVault.Errors.ProviderForbidden— the key store answered and refused the request (403): a policy, credential or addressing fault, not an outage and not fixed by retrying the same requestAshVault.Errors.CiphertextIntegrityFailed— AEAD tag mismatch; the stored bytes do not verify. A ciphertext-integrity failure, not an access-control oneAshVault.Errors.UnsupportedEnvelope— envelope version this build cannot parseAshVault.Errors.UnsupportedCipher— cipher id not in the registryAshVault.Errors.InvalidCiphertext— malformed, truncated or foreign bytesAshVault.Errors.KeySizeMismatch— the provider's keys are the wrong size for the cipher; a configuration fault, not retryable and not tamperingAshVault.Errors.InvalidScope— anAshVault.Scopereturned a non-binary keyAshVault.Errors.OpaqueKeyUnsupported— the provider returned an opaqueAshVault.Keyhandle and the cipher can only use raw bytes; a configuration fault, not retryable and not tamperingAshVault.Errors.LookupUnsupported— asearchable?: truefield needs a lookup token and the key provider has nolookup_key/1; a configuration fault, and normally caught at compile time byAshVault.Verifiers.VerifyVaultAshVault.Errors.LookupNormalizationFailed— a searchable field'snormalize:strategy returned something that is not a binaryAshVault.Errors.InvalidMac— a MAC tag does not verify for this data, context and key version. Not an outage, not erasureAshVault.Errors.PurposeUnsupported— the key provider cannot serve keys for a purpose (such as:mac); a configuration fault, not retryableAshVault.Errors.InvalidMacaroon— a macaroon is malformed, forged, tampered, expired, fails a caveat, or names a record that does not existAshVault.Errors.MacaroonRevoked— a macaroon was valid once and has been revoked: by its record, by retiring its:mackey version, or by destroying its scope
For MACs the taxonomy reads: KeyDestroyed — the scope was erased, so every tag it
ever issued is revoked; KeyNotFound — the tag names a key version that does not exist;
ProviderUnavailable — retry, nothing was decided; InvalidMac — the tag is wrong.
A destroyed key must never surface as AshVault.Errors.CiphertextIntegrityFailed:
destruction is checked before any decryption is attempted.