Expand description
The record of what each HTTP caller did: one line in the audit log for every call of a
state-changing route (POST, PUT, PATCH, DELETE), saying who made it, which route, what
it acted on (the route’s path parameters) and how it went (the response’s status). The websocket
RPC has the same record (backend::rpc::action_record); both end in the same audit line.
It is made in one place, a layer under the authentication layers, so a handler cannot forget it
and a route nobody decided is recorded (super::route_table: a write route does not compile
without its decision). The caller is whoever the request’s agent token names
(Caller::Agent); a request without one is unproven, never the operator: nothing on an HTTP
request proves the window made it. A request’s contents are never recorded; the one body read is
the service call’s service and method names.
A service call with no agent token is recorded as unproven, not skipped, so a process that merely
holds the instance key leaves a line. The window’s own reads and bookkeeping (QUIET) are the
exception; a method not named there is recorded. The host’s own plumbing (QUIET_SERVICES) is quiet
only while it succeeds: a call of it that is refused or fails is recorded. A write of an object’s meta is left out only when every
key it writes is one the window keeps for itself (QUIET_META_KEYS); any other write is recorded with the
object and the key names, never the values.
Structs§
- Service
Call 🔒 - A service call’s names, and for a write of an object’s meta, the object and the keys it sets.
Enums§
- Quiet 🔒
- How a service call with no agent token is left out of the record.
Constants§
- MAX_
FIELD 🔒 - META_
WRITE 🔒 - The generic write of an object’s meta, whose arguments are the object and the keys to set.
- QUIET 🔒
- The
service.methodcalls that are not recorded when they carry no agent token: reads, and the window’s own bookkeeping, which it makes constantly. A method in no list is recorded. - QUIET_
META_ 🔒KEYS - The meta keys the window writes constantly for itself (titles, activity summaries, prompts, timers, the shell’s directory); a write of only these, with no agent token, is not recorded.
- QUIET_
SERVICES 🔒 - The services that are the host’s own plumbing (the credential bridge, the host’s registration): a call of them with no agent token is not recorded while it succeeds, and is when it is refused or fails.
- SERVICE_
BODY_ 🔒MAX - The largest service call read for its two names; a bigger one is refused with 413, as the route’s own body limit would, and the refusal is recorded.
- SERVICE_
REPLY_ 🔒MAX - The largest service reply read for its verdict.
- SERVICE_
ROUTE 🔒 - The generic service call: its
serviceandmethodsay what it does.
Functions§
- is_
write 🔒 - path_
params 🔒 - The values a request’s path gives for the route’s
:nameparameters, asname=value. - record_
action 🔒 - Layered inside
caller_middleware: records the call once the route has answered. - service_
call 🔒 - A service call from its body, when it names a service and a method.
- service_
failure 🔒 - Whether a service reply says the call failed. The reply’s own
errortext is not kept: it can quote the request’s values. (successis left out of a failed reply, so a reply without it failed.)