Skip to main content

Zu sandbox backends and event sinks: local-docker, sqlite

Project description

zu-backends

Infrastructure adapters: the SandboxBackend port (provision and run a tier's environment) and the EventSink port (persist and query the event log). These are the durable/isolation seams the core defers behind a port.

Registered plugins

Sandbox backends (zu.backends)

Name Class Notes
local-docker LocalDockerBackend Runs a tier's container via the local Docker daemon. Network is disabled by default and enabled only for the render tier; scoped egress (allowlist / DNS-pinned) is the deferred egress-policy work. Needs the [docker] extra.

Event sinks (zu.sinks)

Name Class Notes
sqlite SqliteSink The durable canonical store: WAL, synchronous=FULL, busy_timeout, single writer, keyset streaming, idempotent append.
jsonl JsonlSink One JSON object per line — a greppable secondary/trace sink that log shippers tail.

The payload codec seam (zu_core.codec) lets a sink encrypt payloads at rest; an AES-256-GCM codec ships behind the optional [encryption] extra (zu_backends.encryption). Every sink links each event into its trace's tamper-evidence hash chain (zu_core.chain, ZU-AUDIT-1).

Upstream-conformance reference plugins

Dependency-light reference implementations of the conformance ports (spec: zu-upstream-conformance.md, trusted base: docs/TCB.md):

Kind Name Class Notes
zu.channels credential-broker broker:CredentialBroker A harness-owned Channel (ZU-NET-2): secret read inside the adapter, narrow verbs (mint/introspect) return a derived token, never the secret.
zu.backends oop-launcher oop_launcher:OutOfProcessLauncher Runs a plugin (e.g. the broker) in a separate process/uid over the zu_core.rpc socket contract (ZU-NET-3 / ZU-CORE-3): a harness compromise yields the socket, not the secret.
zu.workload_identity static identity:StaticIdentity Attestable identity (ZU-NET-4/5): HMAC-signed principal + optional attestation measurement; stdlib-only. mTLS/SPIFFE are follow-ons behind the same port.
zu.egress_enforcement docker-internal-net, nftables egress_enforce:* Pluggable default-deny + DNS gating port (ZU-NET-1). The SandboxLauncher routes through it: pin the proxy by IP + gate the embedded resolver so DNS isn't a covert channel. ScriptedEnforcement proves swappability offline; nftables is the Linux-native mechanism; live behavior is validated under --run-docker.

broker.py's narrow verbs are the worked example for ZU-EXT-3 (many narrow typed ports, not one wide "send this request" proxy).

Extend

Implement the SandboxBackend or EventSink shape, register under zu.backends / zu.sinks, and add a deterministic test (inject a fake Docker client / use a temp DB path — no real daemon needed offline).

Tests

uv run pytest packages/zu-backends — offline.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zu_backends-0.7.0.tar.gz (63.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zu_backends-0.7.0-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

Details for the file zu_backends-0.7.0.tar.gz.

File metadata

  • Download URL: zu_backends-0.7.0.tar.gz
  • Upload date:
  • Size: 63.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for zu_backends-0.7.0.tar.gz
Algorithm Hash digest
SHA256 febe9f1c998ae36c07de0c3b88a2c060408bc6d75e492a670d90878d1497c959
MD5 1fec6c9a34640a6e13ab58f9043958f6
BLAKE2b-256 ee6d5c4dce3bdfb78b75960061afa7249c5b9bcbdc57b4fb576130817c8abcdb

See more details on using hashes here.

File details

Details for the file zu_backends-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: zu_backends-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for zu_backends-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b83e1db5aa35565521eb051f7b6320ccb306583231a2c315478ce0f8342732
MD5 f2d6bbafdcb43e4a5826262b55a86fa9
BLAKE2b-256 cc4ae8bc99dfe2f1ffb8acc771c0270ec44c82af3558f95caae6981c427f3de4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page