Host boundary that exchanges a committed Attempt for an execution capability.
A broker must never return a reusable credential. The value it releases is
scoped to the supplied executor and Act and is kept outside durable records.
A failed checkout returns only validated Evidence and an opaque details_ref;
raw credential-store errors must never become durable payloads.
use Spectre.GAM.Secret.Broker, ref: "broker:my-app", profile: :mediated
declares the behaviour and overridable ref/0 and profile/0. Both choices
are required: the macro cannot establish deployment isolation. Implement
checkout/4 explicitly; no credential access or successful checkout is
supplied by default.
Summary
Callbacks
Declares the strongest deployment boundary this broker actually provides.
Returns the stable identity bound into checkout receipts.
Types
@type failure_metadata() :: %{ evidence: Spectre.GAM.Evidence.t() | [Spectre.GAM.Evidence.t()], details_ref: String.t() }
@type profile() :: :development | :mediated | :isolated
Callbacks
@callback checkout( Spectre.GAM.Secret.CheckoutReceipt.t(), Spectre.GAM.Act.t(), Spectre.GAM.Attempt.t(), keyword() ) :: {:ok, term()} | {:error, :ambiguous, failure_metadata()}
@callback profile() :: profile()
Declares the strongest deployment boundary this broker actually provides.
@callback ref() :: String.t()
Returns the stable identity bound into checkout receipts.