Skip to main content

Module signed_invocation

Module signed_invocation 

Source
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§

InvocationStatement
What the caller’s key states about one invocation.
SignedCall
An invocation as a change a host made for it keeps it: the caller’s SignedInvocation and 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).
SignedInvocation
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§

CallAllowed
How a call an agent made was allowed, as the host that carried it out kept it beside the call (SignedCall::allowed).
StatementMismatch
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.