Centralized security boundary for inbound verification and outbound sanitization.
Security checks are bounded with timeout budgets, failures are classified, and explicit policy determines whether failures deny or degrade.
Summary
Types
Security classification for decisions and failures.
Security decision metadata.
Security enforcement mode.
Policy for sanitize failures.
Successful sanitize result envelope.
Typed security denial returned to ingest/outbound callers.
Security boundary stage.
Policy for verify failures.
Successful verify result envelope.
Functions
Resolve runtime security config for an instance module.
Sanitize outbound payload through the configured security adapter.
Verify an inbound sender through the configured security adapter.
Types
@type classification() :: :allow | :deny | :retry | :degrade
Security classification for decisions and failures.
@type decision() :: %{ :stage => stage(), :classification => classification(), :outcome => atom(), :action => atom(), :policy => atom(), :channel => module(), :adapter => module(), :mode => mode(), :elapsed_ms => non_neg_integer(), optional(:reason) => term(), optional(:description) => String.t(), optional(:changed) => boolean(), optional(:fallback) => boolean() }
Security decision metadata.
@type mode() :: :permissive | :strict
Security enforcement mode.
@type sanitize_failure_policy() :: :allow_original | :deny
Policy for sanitize failures.
@type sanitize_result() :: {:ok, term(), %{decision: decision(), metadata: map()}} | {:error, security_denial()}
Successful sanitize result envelope.
Typed security denial returned to ingest/outbound callers.
@type stage() :: :verify | :sanitize
Security boundary stage.
@type verify_failure_policy() :: :allow | :deny
Policy for verify failures.
@type verify_result() :: {:ok, %{decision: decision(), metadata: map()}} | {:error, security_denial()}
Successful verify result envelope.
Callbacks
Functions
Resolve runtime security config for an instance module.
Config precedence (lowest to highest):
- Defaults
config :jido_messaging, :security, ...config <instance_module>, :security, ...- Runtime overrides passed as
security: [...]in opts
@spec sanitize_outbound(module(), module(), term(), keyword()) :: sanitize_result()
Sanitize outbound payload through the configured security adapter.
Verify an inbound sender through the configured security adapter.