Expand description
One invocation as its caller signed it: who asked for which action, on which resource of which workspace, with which arguments.
A host runs an action for a caller; the signature is what makes that
claim checkable by anyone, not only by the host that read the caller’s
connection. The caller’s key signs a statement binding the workspace, the
invocation id, the target (provider, resource and action), a BLAKE3 hash
of the canonical arguments, the invocation it continues
(InvokeRequest::on_behalf_of), the issue time and the signing key. The
envelope carries the signer’s certificate (with the certificate that
issued it, for a key another key minted), so the statement checks against
the person’s root and their revocations with nothing else at hand.
This module holds the statement and its exact bytes. Signing with a device
key and checking the certificate are the identity layer’s
(tilo_server_protocol::invocation): this crate sits below it.
Structs§
- Invocation
Statement - What the caller’s key states about one invocation.
- Signed
Call - An invocation as a change a host made for it keeps it: the caller’s
SignedInvocationand the argument it signed. The host signs the change as the one who ran it; this is what says who asked for it. A peer that reads the change checks the signature and the certificate, and the argument against the hash under the signature (Self::argument_signed). - Signed
Invocation - An invocation’s
InvocationStatement, the signer’s signature over it, and the signer’s certificate. Decoded, it is only what it claims: nothing in it is trusted until the identity layer verified the signature, the certificate, its revocation and its freshness.
Enums§
- Call
Allowed - How a call an agent made was allowed, as the host that carried it out kept it beside the
call (
SignedCall::allowed). - Statement
Mismatch - Which part of a request its signed statement does not cover.
Constants§
- INVOCATION_
SIGNATURE_ DOMAIN - Domain separator for a caller’s signature over one invocation.
- INVOCATION_
SIGNATURE_ TOLERANCE_ NS - How far a signed invocation’s issue time may lie from the verifier’s clock, either way. Wide enough for a retry after a reconnect and for the clocks of a phone and a server to disagree; an older statement is refused as stale, and within the window the invocation id names the one run.
- MAX_
RECORDED_ ARGUMENT_ BYTES - The most of an invocation’s argument a change keeps beside its signed
invocation, encoded: what the change already documents of its action
(
crate::context::WHOLE_ACTION_BUDGET). A larger argument is left out, and the change still says who asked for what. - MAX_
SIGNER_ CERT_ BYTES - The largest signer certificate an envelope carries: a certificate and its issuer’s, with room for long labels.
Functions§
- argument_
hash - The BLAKE3 hash of an invocation’s argument in its canonical form: a tag for which form it takes, then the text as is, or the argument object as JSON with every object’s keys sorted, so the same arguments hash alike however a transport ordered them.