AshVault.Errors.MacaroonRevoked exception (AshVault v0.2.0)

Copy Markdown View Source

Returned when a macaroon verified once and has since been revoked. :reason names the level that revoked it:

  • :record — the record's revoked_when expression is not false
  • :key_retired — the token's :mac key version has fallen outside the macaroon's accepted_key_versions window after the scope's :mac keyring was rotated
  • :scope_destroyed — the scope was crypto-erased between the signature check and the key-window check. A token presented after erasure cannot have its signature checked at all, and is reported as AshVault.Errors.InvalidMacaroon (:bad_signature) like any other unverifiable token — telling it apart would tell a forger which tenants were erased

Not an outage and not a forgery. Like AshVault.Errors.InvalidMacaroon it carries no token material.

Summary

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %AshVault.Errors.MacaroonRevoked{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  macaroon: term(),
  path: term(),
  reason: term(),
  resource: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.AshVault.Errors.MacaroonRevoked without raising it.

Keys

  • :resource
  • :macaroon
  • :reason