JVM client for a :control-file-shaped app (PdfCraft --control <FILE>). The app listens on a
RANDOM loopback port and writes {port, token} to a user-owned file. Each request reads that
file again, connects, sends the token first (JSON-RPC auth), then one ui.* request.
The token is held in a Redacted box that prints as <redacted>; no error, log line or return
value of this namespace ever carries its value (memory axiom 20260504113116-48076a09).
JVM client for a :control-file-shaped app (PdfCraft `--control <FILE>`). The app listens on a
RANDOM loopback port and writes {port, token} to a user-owned file. Each request reads that
file again, connects, sends the token first (JSON-RPC `auth`), then one ui.* request.
The token is held in a Redacted box that prints as <redacted>; no error, log line or return
value of this namespace ever carries its value (memory axiom 20260504113116-48076a09).How to start PdfCraft so its control file is trustworthy.
How to start PdfCraft so its control file is trustworthy.
Most a control file may hold (the app writes under 100 bytes).
Most a control file may hold (the app writes under 100 bytes).
(control-file-problem owner me perms)Why user me cannot trust a control file with this owner and rwx perms string, or nil.
Why user `me` cannot trust a control file with this `owner` and rwx `perms` string, or nil.
(control-file-transport config)Build a transport for an app started with --control <FILE>; config overrides default-config.
Build a transport for an app started with --control <FILE>; config overrides default-config.
Loopback host and per-request connect and read bounds; :control-file comes from the app config.
Loopback host and per-request connect and read bounds; :control-file comes from the app config.
(expand-home path)Expand a leading ~/ to the user's home directory; other paths pass through.
Expand a leading ~/ to the user's home directory; other paths pass through.
(read-control-file path)Read {port, token} from the app's control file; refuse a symlink, a non-regular file, a file another user owns or can access, and an oversized one. The token comes back as a Redacted box.
Read {port, token} from the app's control file; refuse a symlink, a non-regular file, a file
another user owns or can access, and an oversized one. The token comes back as a Redacted box.(read-trusted-file path advice missing)Read a small secret file as text: refuse a symlink, a non-regular file, a file another user owns
or can access, and one over control-file-max. Every refusal names path and ends with advice;
a missing file says missing (path: missing advice). Never returns or reports the contents
in a refusal.
Read a small secret file as text: refuse a symlink, a non-regular file, a file another user owns or can access, and one over control-file-max. Every refusal names `path` and ends with `advice`; a missing file says `missing` (`path: missing advice`). Never returns or reports the contents in a refusal.
(rpc-reply reply)Translate a decoded JSON-RPC reply into the {ok, result|error} shape core/response-line checks.
Translate a decoded JSON-RPC reply into the {ok, result|error} shape core/response-line checks.
(rpc-request request)JSON-RPC 2.0 envelope for one validated {:id :method :params} control request.
JSON-RPC 2.0 envelope for one validated {:id :method :params} control request.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |