Transports
PartialA transport is the wire an endpoint speaks over. Transports are code the binary ships
(internal/transport), not rows
(ADR-0073):
each entry declares its connection params, its default ladder rung, whether it is held, and the probe
keys it lands. The protocol knowledge for a device (its OIDs, its commands, its paths) lives in a
driver, never here.
This page is how each transport behaves on the wire. The model they share (sessions, listeners, the gate and its fingerprint) is on data collection, and the spec fields a driver author writes are on the driver spec.
| Name | Description |
|---|---|
icmp | ICMP echo / ping reachability and RTT. |
tcp | Raw TCP: the connect / port-open check, and the line protocol, which holds a session over it (polls, commands, and listeners share one connection). |
tls | TLS: the line protocol over a TLS connection, held exactly as it is over tcp; the probe runs the handshake (responds) and reports the certificate's expiry, verified against the outpost's roots, pinned to the public key on first use, or (by the operator's explicit choice) not verified. |
udp | UDP: the line protocol as datagrams, one line each, stateless: the probe sends the driver's named request and an answer is the rung (an open udp port cannot be detected), a refused port reads refused, and a lost datagram is retried; each endpoint binds its own local port (its driver's listen-port input, else one the outpost picks), which its requests, replies and pushes share. |
telnet | Telnet: the line protocol over TCP with option negotiation (every option refused), its login the session's auth step; the probe connects and waits for the first negotiation or banner bytes (responds). |
ssh | SSH: the probe runs a real key exchange (responds) and tries the endpoint credential when one is set (auth); the line protocol holds a shell or exec channel over it, its userauth the session's auth step and its host key pinned on first use. |
http | HTTP: a driver's polls and commands send real requests (method, path, query, headers, body) and read JSON, XML, HTML or text answers, authenticated by the endpoint's declared scheme (basic, bearer, an API key, digest) or a login whose session the outpost keeps; a declared server-sent events stream is held as a session, its events landing through the listeners; the probe draws a real response off the API without a credential (responds), any status counting as an answer. |
https | HTTPS: http over a TLS connection, its own entry so a component can serve a plain web port beside a TLS one, a server-sent events stream held over it as over http; the probe runs the handshake (responds), reports the certificate's expiry, then draws a response, the certificate verified against the outpost's roots, pinned to the public key on first use, or (by the operator's explicit choice) not verified. |
websocket | WebSocket: a held session whose messages are text frames, routed as a line session's are: a frame sent to arm a subscription on every connection, pushes landing through the listeners, and a request answered by the frame carrying back an id the outpost mints into it, whatever pushes interleave; the upgrade rides the endpoint's scheme (basic, bearer, an API key) or a login whose cookie the outpost keeps, and the session is kept alive by ping and pong; the probe is http's, a credential-free GET / whose answer, any status, is the rung (responds), so reachability stays observed beneath a refused upgrade. |
wss | WSS: websocket over a TLS connection, its own entry so a component can serve a plain socket beside a TLS one; the probe is https's: it runs the handshake (responds), reports the certificate's expiry, then draws a credential-free response, the certificate verified against the outpost's roots, pinned to the public key on first use, or (by the operator's explicit choice) not verified. |
snmp | SNMP v2c, stateless: the probe gets a standard OID (sysUpTime.0 unless the driver names another) with the endpoint's community, and an answer is the rung; a wrong community is dropped silently and reads as no answer, while an authorizationError reads as an auth refusal. |
webhook | Webhook: a push transport the server hosts, not one an outpost dials: a component or a cloud service posts each message to the endpoint's own URL (/api/v1/webhooks/ and a token the server mints, held as a secret), authenticated by the scheme its driver declares (an hmac signature over a signed timestamp, a token, basic, or none, which reads unsigned) and mapped by its listeners onto any lane; nothing is dialed, so it has no reachability ladder and reads last heard. |
Poll protocols and their config
Section titled “Poll protocols and their config”Every transport that dials has a probe, run on the outpost’s probe interval, that climbs the ladder
as far as the transport allows. A probe’s config rides the endpoint’s params; on an attached endpoint
they are derived from the driver’s inputs.
| Transport | Rung | Config (endpoint.params) | Samples a probe lands |
|---|---|---|---|
icmp | none | target count timeout | icmp-reachable icmp-rtt-avg endpoint-reachable |
tcp | connect | target timeout | tcp-open tcp-connect-time endpoint-reachable |
tls | handshake | target timeout tls-mode | tcp-open tcp-connect-time tls-handshake-time endpoint-responsive tls-certificate-expiry tls-certificate-days-left endpoint-reachable |
udp | request | target timeout listen-port | endpoint-responsive udp-response-time endpoint-reachable |
telnet | connect | target timeout | tcp-open tcp-connect-time telnet-response-time endpoint-responsive endpoint-reachable |
ssh | handshake | target timeout username password | tcp-open tcp-connect-time ssh-handshake-time endpoint-responsive endpoint-authenticated endpoint-reachable |
http | connect | target timeout | tcp-open tcp-connect-time http-response-time endpoint-responsive endpoint-reachable |
https | handshake | target timeout tls-mode | tcp-open tcp-connect-time tls-handshake-time http-response-time endpoint-responsive tls-certificate-expiry tls-certificate-days-left endpoint-reachable |
websocket | connect | target timeout | tcp-open tcp-connect-time http-response-time endpoint-responsive endpoint-reachable |
wss | handshake | target timeout tls-mode | tcp-open tcp-connect-time tls-handshake-time http-response-time endpoint-responsive tls-certificate-expiry tls-certificate-days-left endpoint-reachable |
snmp | request | target timeout | endpoint-responsive snmp-response-time endpoint-authenticated endpoint-reachable |
The table is generated from the transport registry and the probe keys, and a test drives each probe against a fake wire, failing when it lands a key its entry does not declare or the reverse. What a row cannot say:
- A probe lands a key only when its fact exists: a connect time only on an open port, a timing only
from an answer, a certificate’s expiry only for a certificate the mode accepted, and
endpoint-authenticatedonly when a credential was tried.endpoint-reachableis the reachability the outpost rolls up, landed on a transition. httpdraws oneGET /with no credential, any status an answer, so reachability stays observed beneath a refused credential.websocketandwssrun thehttpandhttpsprobe.udpandsnmphave no port to open: their rung is the driver’s named request answered, soendpoint-responsiveis their reachability and neither landstcp-open.- A task whose config cannot be used lands a
collection-failednaming the task, never a silent skip.
There is no serial transport: an RS-232 or RS-485 device is reached through an IP-to-serial gateway,
which is tcp, tls or telnet like any other line protocol
(ADR-0153).
The line family: tcp, telnet and ssh
Section titled “The line family: tcp, telnet and ssh”The line protocol is the held-session proof: a request is a line, an answer is a line, and pushes
arrive between them. It is held over tcp, tls, telnet and ssh, and polls, commands and
listeners on one endpoint share its one connection
(sessions).
tcpis the line protocol over a raw socket; its probe is the connect.telnetis the same behind a filter that strips option negotiation and refuses every option (DO answered WONT, WILL answered DONT). Its login is the driver’s login dialog, run as the session’s auth step on every connection. While a telnet session readsup, the probe takes its result from the session rather than open a second connection, since gear that admits one telnet client would refuse it.sshruns the line protocol over a shell channel (with a PTY whensession.ptyasks) or an exec channel (session.exec). Its userauth is the auth step, with a password, a private key, or keyboard-interactive answered by the login dialog. The probe runs a real key exchange and, when the params carry a credential, tries it once per fingerprint.
The ssh host key is pinned on first use
(ADR-0157).
The outpost trusts the first key it sees and publishes it as ssh-host-key; the server delivers it back
as the pin on every worklist; a changed key reads rejected, class host-key, naming both
fingerprints. An operator who trusts the new key (a replaced device) retries with it (:retry with
host_key, audited), which declares the new pin; a key the refusal on record does not name is refused.
A pin is trusted only as that path wrote it, so a pin the worklist stops delivering is forgotten and the
next key is trusted on first use again
(ADR-1100).
tls is the line protocol over a TLS connection, its own transport rather than an option on tcp,
because an endpoint is named by its transport (a device may hold a raw port and a TLS one side by side)
and its rung is the handshake
(ADR-0160).
The handshake is one shared primitive that https and wss consume too. Each connection runs under the
endpoint’s verification mode, the driver’s tls-mode input:
- verify (the default) checks the certificate against the outpost’s system roots, the host input as
server name. Any failure is a
certificaterefusal carrying its reason, never a timeout. - pin trusts the first public key offered and refuses any other. The pin is the key, not the
certificate, so a renewal that keeps the key is no change. The outpost publishes it as
tls-certificateand the server delivers it back, one pin per endpoint shared by its session and its probe; a changed key is trusted with:retryandcertificate. The seedednewtron-nvp-tlspins by default, since the gear it speaks to signs its own certificate. - skip checks nothing: an operator’s explicit choice, never a driver’s default (a spec defaulting to it is refused at write), shown on the endpoint as unverified.
The probe lands tls-handshake-time and, for an accepted certificate, tls-certificate-expiry and
tls-certificate-days-left, the number a threshold rule reads. Under a certificate gate the probe
only connects, so those freeze, and the reachability read withholds them rather than show them as
current. TLS 1.2 is the floor; there are no client certificates and no per-endpoint CA bundle.
http and https
Section titled “http and https”http is stateless: every poll and every command is a request of its own
(ADR-0902).
https is the same over the TLS primitive, its own entry by the same rule as tls, its certificate
judged and pinned exactly as tls does.
The request declares a method, path, query, headers, body and the response’s format (json,
xml, html or text), declared rather than sniffed, since gear mislabels its content. A command’s
${value} and ${arg.key} references render injection-safe: a path segment is escaped as one segment,
a query value is encoded, a header value with a control character is refused, and a JSON body is
rendered leaf by leaf, so a whole-leaf reference keeps its type. A request never sets Authorization
or Cookie and never names a secret.
The answer is read through the one extraction primitive: jsonpath on json, xpath on xml or on
html parsed as a browser would, regex on any body. A selector yields exactly one value; one that finds
nothing or several faults that emit alone. A body past 1 MiB (64 KiB for a command’s reply) faults.
Auth is the session block’s scheme: session.credential names the secret input and
session.scheme says how it rides every request: basic, bearer, api-key (a header or a query
parameter), or digest. The credential is written only into the request: it is masked in every URL the
outpost names and scrubbed from every reason.
The status table. A rule the driver declares terminal (on a status, a body, or both) decides first. Then:
| Answer | Reads as |
|---|---|
| 2xx | success: the body is the payload |
| 401 to a credentialed request | a terminal auth refusal at the session rung (over a login session, a lapse first) |
| 408, 429, 5xx | retryable: the poll backs off, never sooner than Retry-After, never later than its interval |
| 3xx | not followed: the request’s own fault (a redirect to the declared login page is a lapse) |
| any other 4xx | the request’s own fault: a collection-failed naming the status, nothing gated |
| no answer | retryable, at the transport rung |
| a certificate the mode refuses | certificate at the transport rung |
A credentialed 2xx lands endpoint-authenticated yes and a refusal no; any other answer never judged
the credential. A refusal gates the endpoint for its fingerprint, so no credentialed request is sent
beneath it until the secret rotates, an input is edited, or an operator retries.
Commands carry their rendered request and never a credential: the outpost applies the endpoint’s scheme from what its worklist delivered, so a credentialed http driver with commands needs a poll to carry its credential (refused at write otherwise). A binding may settle from the reply’s body through the same extraction (commands).
Logging in over http
Section titled “Logging in over http”Much gear’s web API has no per-request credential: it has a sign-in, a form post that sets a cookie or
a JSON login that answers a token. An http session declares it as session.login, the same login dialog
a line session runs, each step a request rather than a prompt
(ADR-1114):
session: login: steps: - request: { method: POST, path: /api/login, body: { username: "${secret.login.username}", password: "${secret.login.password}" } } capture: [{ name: token, extract: { jsonpath: token } }] expiry: { jsonpath: expires_in } headers: { Authorization: "Bearer ${session.token}" } expired: { regex: "token expired" }- The session lives in the outpost’s memory alone. Each http endpoint has one auth state, shared by its polls and commands: a cookie jar, the captured values and the headers they fill, and a digest challenge. It is never logged, published or persisted, and it is dropped whole when the fingerprint moves, on a terminal refusal, and with the process. A login runs before the first request and again before a declared expiry lapses, never once per poll.
- A lapse logs in once. A 401, a redirect to the declared login path, or the declared
expiredtext logs in once more and replays the request once. A lapse right after a fresh login is the credential’s terminal refusal, never a second login. - A refused login is one attempt. A 401, a redirect back to the login page, another 4xx, or a final
2xx without its
readytext or capture is a terminalauth, held until the fingerprint moves, so no retry loop can lock an account out. A login that draws no verdict after its secrets were sent counts against the same three-attempt budget a line session’s does. - Digest (RFC 7616) is
scheme: digeston abasic-authsecret: the outpost answers the challenge (MD5, SHA-256 or their-sessforms), holds it with a rising count, and answers astaleor rotated nonce afresh rather than read it as a refusal.
Everything the auth state holds is scrubbed from every reason, error and URL as the credential is, and a request is never sent to an address the endpoint’s worklist does not name, so a session opened with one device never rides a request to another.
A server-sent events stream
Section titled “A server-sent events stream”Many devices’ web pages update live from a server-sent events stream, so a driver can hold that stream and land each change the moment the page would, with no poll (ADR-1038):
session: credential: login scheme: basic stream: { path: /api/events }listeners: - name: volume-change match: { event: change, field: { path: path, equals: status.audio.volume } } emits: - { name: volume, extract: { jsonpath: value } }The stream is a held session. Its connect is the TCP connect (and the handshake over https), its
auth step the login when one is declared, then the stream’s GET with the scheme’s credential and the
jar. A 200 carrying text/event-stream opens it; a refusal is judged as any request’s; anything else is
a failed attempt on the backoff. Its unit is one event, offered to the listeners like a line, claimed
by event name, a data prefix or regex, or a JSON field. A stream has no upstream, so its listeners
declare no arm.
Resume. A dropped stream reads recovering and reconnects with Last-Event-ID after the server’s
retry (held between 250 ms and 30 s), so nothing is lost and nothing lands twice. The resume point
lives in the outpost’s memory, never persisted. An event past 1 MiB is dropped whole and named unclaimed.
Beside polls. The endpoint’s polls and commands stay requests of their own, sharing the stream’s auth state, so one login serves them all. A refusal on either side gates the other through the one fingerprint gate.
websocket and wss
Section titled “websocket and wss”A websocket carries a subscription’s pushes and the answers to requests on one socket. websocket holds
it, and wss holds it over the TLS primitive, pinned as tls is
(ADR-1034).
A message is a text frame, routed by the same precedence a line session uses, and a request is a
frame: a line sent verbatim or a JSON body rendered injection-safe.
transport: wsssession: credential: login scheme: basic upgrade: { path: /api/ws }listeners: - name: volume-change arm: ['{"type":"subscribe","paths":["status.audio.volume"]}'] match: { field: { path: path, equals: status.audio.volume } } emits: - { name: volume, extract: { jsonpath: value } }polls: - name: volume schedule: { every: 60s } request: { body: { type: get, path: status.audio.volume }, reply: { correlate: id } } emits: - { name: volume, extract: { jsonpath: value } }- The upgrade is the auth step: a
GETbuilt as any http request is (path, query, headers, the scheme’s credential, a login’s session). A101opens the socket. A401or403to the upgrade is a terminalauth, since the upgrade is one request; a lapsed login logs in once more first.digestis refused at validation, since it answers a challenge per request. - A reply is matched by a minted id. A request whose reply declares
correlate: <field>has a fresh random id written into that field when the frame is sent, and its answer is the frame carrying the id back, whatever pushes interleave. A correlated request with no answer in time fails alone, keeping the socket. - Keepalive and bounds. The outpost pings every 30 s and the socket is dead after two silent
intervals, so a device that stops answering reads
recoveringwithout waiting for a poll. A frame past 1 MiB, or a binary frame, is dropped and named unclaimed. The outpost sends noOriginunless the upgrade’s headers declare one.
udp is the line protocol as datagrams, one line each, and stateless: no connection, no
session-state
(ADR-0163).
- Each endpoint binds its own socket on the outpost, on its driver’s
listen-portinput (unset, the kernel picks one), so the device’s replies and pushes arrive on one socket with no table of sources. The operator points the device at the outpost’s address and that port. A shared port routed by source was rejected, since two endpoints behind one address (an IP-to-serial gateway) would be indistinguishable. A datagram from any other address is counted, self-logged and dropped. - A DNS name is followed: the target is re-resolved once per tick, and a moved address moves the socket’s peer in place.
- The rung is the driver’s named request answered (
ladder.transport.request, required): an answer reads responsive, silence reads not responsive, and a port the host reports unreachable readsrefused(heard through the socket’s error queue). Each answered probe landsudp-response-time. - Every request declares its reply shape, so a push arriving mid-exchange still reaches its
listener. A lost datagram is re-sent (
request.retries, default 2 for a poll and the rung), the attempts sharing one timeout. A command is sent once unless its binding declares retries, since a relative command (a volume step) must not be sent twice. - Listeners ride the socket: their
armis sent once when the socket opens and again when the rung recovers, since a rebooted device forgot its subscriber.
Text payloads only, unicast only. A reply the driver declares terminal gates the endpoint at the transport rung, since nothing logs in over udp.
snmp is v2c and stateless
(ADR-0821).
Its rung is a get of a standard OID answered (ladder.transport.request.get, by default
1.3.6.1.2.1.1.3.0, sysUpTime.0) carrying the endpoint’s community, a secret the driver’s community
input references. Any response is an answer, noSuchObject included: the rung reads responsive, lands
snmp-response-time, and, since a v2c agent answers only a community it accepts,
endpoint-authenticated yes.
The v2c limit, stated plainly: a wrong community is dropped silently by the protocol, so it reads
not responsive and retryable, indistinguishable from a stopped agent. Only an agent that answers
authorizationError refuses detectably: a terminal auth at the session rung, and since v2c has no
request without the community, nothing more is sent under that fingerprint. Beneath that gate the rung
reads up with the reason held: auth since <ts>, never a down it did not observe. Polls are scalar gets
only: no walk, no tables, no v1.
Push ingress: webhooks on the server
Section titled “Push ingress: webhooks on the server”A push endpoint is one a sender pushes to rather than one an outpost dials
(ADR-1024).
webhook is the first: hosted by the server (it takes no outpost), naming one component, with no probe
and no ladder (one declared on it is refused at write). In place of a reachability it reads last
heard, stamped by every post that lands, and it is never shown down for silence.
Every pushed message runs one pipeline, the listener primitive: bound (token buckets per source,
per endpoint and per listener, a cap on posts in flight, a 1 MiB body, a read deadline),
authenticate, attribute, route (listeners first), extract, land. A sender’s source is
the client address the server resolves: the connection’s peer, or the rightmost forwarded hop outside
OMNIGLASS_TRUSTED_PROXIES when the peer is a trusted proxy
(ADR-1185).
The URL and its token. Creating a webhook endpoint mints its token (128 random bits) as a
webhook-token secret on the component: sealed, revealed only under secret:reveal, deleted with the
endpoint, and rotated by POST /endpoints/{endpoint}:rotateToken. A sender posts to
/api/v1/webhooks/<token>. The token names one endpoint and so one component, which is the conduit for
any identities a post names (shared-API collection).
The scheme is declared by the driver, never defaulted:
session.scheme | Credential | What is checked |
|---|---|---|
hmac | an hmac-key secret | a signature header over the body, optionally over a signed timestamp joined to it |
token | a bearer-token secret | a shared token in a declared header |
basic | a basic-auth secret | the request’s basic login |
none | none | nothing: the endpoint reads unsigned, with no replay protection |
hmac over a signed timestamp is the one to reach for first. A timestamp more than five minutes from arrival refuses, and a declared delivery id is remembered for that window, so a redelivery lands once. Every comparison runs in constant time, and a scheme whose secret no longer resolves refuses every post.
The body has a declared format (json, xml, form, text), and the listeners claim and read it
through the one extraction primitive; a listener may also match a header the sender sets. What no
listener claims lands as a log line.
The answers. Senders retry on anything but 2xx, so: 202 only once the post is published; 401
for a refused scheme, saying nothing of which part failed; 404 for an unknown, rotated or malformed
token, byte for byte the same; 409 with Retry-After for a redelivery still landing; 413 past 1 MiB;
429 with Retry-After past a limit. A GET verifying the URL echoes the driver’s declared challenge
parameter, or answers 204.
Writers, refusals and strangers. A post lands with its component as owner under a writer that admits
only collected keys, so a leaked token writes only collected keys on one component. A refused post is
counted, never gated: it lands as webhook-refusal-count beside webhook-post-count
(collection telemetry).
A post to a token no endpoint holds lands its sender in the unclaimed sources inbox
(GET /unclaimed-sources, outpost:read): one row per source address with a count and the last message
cut to 512 bytes, at most 256 sources, aged out after seven days. The token a stranger tried is never
kept.