Auth & network
How a Telys server decides who may connect — trusted Unix sockets, token-gated TCP with constant-time comparison, the length-prefixed JSON wire protocol, and the offline license gate.
A Telys server has a small, explicit security model: the transport decides trust, an access token gates TCP, an optional license gate blocks boot, and the wire protocol is a length-prefixed JSON frame with a hard size cap. There are no accounts, roles, or per-collection permissions, and the server makes no outbound network calls.
Transport decides trust
The server authorizes connections by how they arrive, not by a per-user identity.
Created with 0600 permissions (owner read/write only) and treated as trusted. Any local process that can open the socket file is authorized; no token is required or checked.
Trust here is filesystem trust: the socket-file permissions are the access control. Keep the socket in a directory only trusted users can reach.
telys serve --path ./memory --socket /run/telys/telys.sockReachable from other hosts, so it is never anonymous. Supply an access token when starting the server; a TCP server refuses connections without one, and a client that omits or mismatches the token is rejected.
telys serve --path ./memory --host 0.0.0.0 --port 9099 \
--access-token "$TELYS_ACCESS_TOKEN"Bind TCP to a private interface behind a firewall — the token authenticates the caller, it does not encrypt the link.
The token handshake
A client given a token sends an authentication handshake as its first message, before any other request. The server compares the presented token against the configured one and either continues or drops the connection.
from telys.client import connect
# token is sent as the first frame, then normal calls follow
with connect("tcp://memory.internal:9099", token="$TELYS_ACCESS_TOKEN") as client:
print(client.ping())The token is bearer-style — possession is authorization. Treat it like a password: pass it through $TELYS_ACCESS_TOKEN rather than a flag to keep it out of shell history and the process list, and rotate it by restarting the server with a new value.
The license gate
Independently of transport auth, a server can require a valid license before it will run. Start it with --require-license (or require_license=True in serve()), optionally with --license / $TELYS_LICENSE:
On boot the server verifies a products.telys version-2 license entirely offline — signature and claims are checked against an embedded public key, with no call to a license server. If verification fails, the server refuses to start; there is no unlicensed fallback. This enforces the telys_team self-host tier. The verification rules (issuer, audience, expiry, product claims) are in Offline licenses & verification.
The wire protocol
Client and server speak a small framed protocol over the socket:
Each message is a 4-byte length prefix followed by a JSON payload of that many bytes.
The maximum frame size (
MAX_FRAME) is 256 MiB. A frame that declares or exceeds this size is rejected rather than buffered, bounding server memory.
Framing is identical on both transports; only the socket underneath differs. Requests name a method and its arguments; responses carry the result or an error. Vectors and metadata cross the wire as JSON — batch large ingests into reasonable frames and remember the 256 MiB per-frame ceiling.
What never happens
No telemetry, phone-home, or usage reporting from the server.
No online license check — verification is local and offline.
No per-user identity or role system — trust is transport plus one shared token.
Next steps
Next: Deployment notes — run the server behind a private network, under a supervisor, with backups.
Security overview — how Telys's trust anchors fit together.
Connect with RemoteTelys — the client side of this protocol.
Last updated
Was this helpful?