backend
backend
¶
CamBackend: memory-backend/1.1 served by CAM over its HTTP API.
Licence boundary. CAM is a separate program under its own licence. Marianne reaches it only across a process boundary, by HTTP on the wire format CAM documents, using the standard library alone. Nothing of CAM is imported, copied, vendored or declared as a dependency, and a test keeps it that way.
Identity. The gateway has already authorised every call before it gets here. The CAM key is the conductor's own, so until CAM ships stamped principals (delegated principals are not built) every Marianne principal appears to CAM as the one key's principal. This client does not invent principal stamping. The scope is passed through as CAM's scope.
What CAM offers today: declare, recall, and a readiness probe. verify,
bind, forget, fetch, stream_facts and migration_ingest have
no CAM operation yet, and each raises E7 capability_unsupported naming the
operation. Recall has no cursor in CAM, so a response is trimmed to the
per-call byte cap at a fact boundary on this side: omitted facts are reported
by a page cursor with an empty token (nothing to resume) and an omitted
count, and a single fact larger than the cap is listed as oversized_unit.
The API key is named by an environment variable or a file, read for each
request, and never appears in a log, an exception message or a repr.
Classes¶
CamBackendConfig
dataclass
¶
CamBackendConfig(base_url, api_key_env='', api_key_file='', timeout_seconds=DEFAULT_TIMEOUT_SECONDS, allow_remote=False)
One CAM attachment. Holds the NAME of the key source, never the key.
CamBackend
¶
memory-backend/1.1 over CAM's HTTP API (declare, recall, health).
Source code in src/marianne/memory/backends/cam/backend.py
Functions:¶
cam_backend_factory
¶
Build a :class:CamBackend from an attachment's settings:. Does no I/O.
Keys: base_url (required), api_key_env | api_key_file (exactly
one; the NAME of a variable or a path, never the key), timeout_seconds,
allow_remote.