What a share link is
slideless share <id> (or the dashboard/MCP equivalents) mints a URL like
https://your-instance/v/{secret}:
- The secret is a 384-bit random path token, stored hash-only — the
database never holds the URL, and a leaked database does not leak working
links. The URL is shown once at creation and is never retrievable again, with
one exception: a create sent with an
Idempotency-Keycan be replayed with that same key for 24 hours (the cached response is encrypted under the auth secret). - Links are per-recipient: each can carry its own expiry, viewer
password (scrypt-hashed), pinned version or follow-latest mode, and view
stats. Revocation is instant — viewer entries are served
no-storeand assets are revalidated on every request. - Anyone with the URL (and the password, if set) can view the deck. Treat share URLs as the credential they are.
What counts as an open
A link’s view stats (accessCount, “last opened”) count entry-document
loads only — asset fetches, HEAD requests, password challenges, and the
dashboard’s own preview never count. To keep the number meaning “opens”
rather than “HTTP requests”, repeat loads from the same browser inside a
short window count once: a counted open sets a signed, link-scoped,
HttpOnly cookie, and while the browser presents it the deck is served
without re-counting. That collapses browser prefetch/prerender, reloads,
and second tabs into one open. The window is
VIEW_DEDUPE_WINDOW_MINUTES (default 10
minutes; 0 disables de-duplication and counts every entry load). Two
consequences worth knowing: cookie-less clients that ask for the deck’s HTML
(mail-provider link scanners, a ?raw pull) count on every fetch, and a very
large window shifts the metric toward “unique browsers” rather than “opens”.
A read of the link’s agent index (a fetch that does not ask for HTML, or
?format=agent, ?format=json) counts as an agent read, never as a view,
and sets no cookie (Share links, read by agents).
How untrusted HTML is contained
Every byte of deck content is served under this exact header set:CSP: sandbox without allow-same-origin drops the document into an
opaque origin: the deck’s JavaScript cannot read cookies, cannot touch
localStorage/IndexedDB, cannot register service workers, and cannot make a
credentialed call to the instance’s API — verified empirically on Chromium,
WebKit, and Firefox with a hostile deck and a live owner session in the
browser. The dashboard’s own preview additionally wraps decks in
a sandbox iframe as a second, independent lock.
allow-popups-to-escape-sandbox is the one token that reaches outside the
deck: a window the deck opens (a window.open, a link with
target="_blank") runs as a normal top-level page instead of inheriting the
deck’s opaque origin, so a deck that links out to an application can open it.
It changes nothing about the deck itself, which still runs without
allow-same-origin.
This is the safe default: with zero configuration, a share link on the
app origin cannot be used to steal a dashboard session.
The still image: the one place Slideless opens a deck itself
Everything above happens in a visitor’s browser. The dashboard’s deck cards show a still image of each version, and that image is the one place Slideless itself opens deck HTML, with the deck’s script running. It does so in a separate, optional container, the renderer (Deck images), under layers that each hold on their own:- Its own container, with nothing in it. The renderer holds a headless Chromium and a small HTTP server. No database, no file storage, none of the app’s secrets. The app hands it a job with a one-time key; the renderer pulls that version’s files from the app with the key and puts the image back with it. The key opens one version, only while the job lives, and dies with the outcome, so a renderer that were ever taken over could write the images of the versions it was handed and read nothing else. The app never waits for the renderer and behaves the same without it.
- Chromium’s own sandbox, never disabled. There is no setting that turns it off. The renderer refuses to start where the sandbox cannot, and stops if it fails later.
- Only the version’s own files. Every request the page makes is intercepted: the version’s files are served from its manifest through the app, and every other request is refused before it leaves, including other hosts on your network, the app’s other routes, the cloud metadata server and the public internet. Beneath that, Chromium is pointed at a proxy nothing listens on and every host name resolves to nothing, so a request that ever slipped past the interception still reaches no one.
- No service workers and no WebSockets. Both are blocked.
- A process with nothing to steal. Chromium starts with a clean environment, a throwaway profile, a capped JavaScript heap and a single renderer process.
- Nothing outlives a capture. A fresh browser opens for every capture and a hard timeout kills it, whatever the deck does. Captures run one at a time.
The one hardening knob: VIEWER_BASE_URL
The default’s protection is one header on one route — regression-tested,
but structurally a single layer. Setting VIEWER_BASE_URL to a dedicated
user-content origin (a second hostname that fronts the same instance but
carries no app cookies and hosts no API, e.g. a separate domain proxied to
the same container) makes share links get built on that origin instead:
app-kind decks — are the target
architecture and remain open.)
Who can read a deck at all
Deck reads are private by construction, never workspace-wide:- A deck’s content is readable by its owner, workspace admins/owners, an active per-deck collaborator grant, or — for content only — a valid share token.
- Plain workspace membership is not a read grant: collaborators are external parties invited to one deck, and revoking a grant cuts content access immediately.
- A failed read check answers 404, never 403 — the existence of a deck (or a share token) is not probeable.
- The rule reaches the raw bytes, not just the deck endpoints. The
generic file surface (
/api/v1/files, and the blob download under it) applies the same check: a member sees the blobs they uploaded plus those belonging to decks they can read, and nothing else. There is no route on which workspace membership alone yields another deck’s content — and a version commit can only reference blobs its author is allowed to read, so one deck’s content cannot be re-published from another.
The account boundary
- Sign-up is closed. Accounts enter only through the one-shot first-boot setup, workspace invitations, or per-deck collaborator claims. Anonymous visitors of share links never have accounts.
- Machines authenticate with
slk_API keys or the instance’s own OAuth 2.1 tokens, and reach only the endpoints consciously allowlisted for their scopes — everything else fails closed with 403. Each instance is its own OAuth authorization server; on a self-hosted instance no central identity exists (the cloud edition signs people in through the Antasphere hub). - Annotator share links use a deliberately public, token-authed annotation API bounded by rate limits — the token in the URL is the whole credential, and it can only write notes on its own deck+version.
- Share links with forms on use the same kind of public, token-authed API for form responses. It is the one place an anonymous visitor can write files to the instance: a form’s file field, when the link has uploads on. The instance bounds it (size per file, files per response, total per deck, a rate limit), stores the files apart from deck assets, never serves them back to a link holder, and hands them to the deck’s owner as downloads only, never rendered on the app origin. The accepted types a deck author lists are checked in the respondent’s browser, not by the server, so treat what arrives as untrusted. Details in security.md and Forms.
Operator checklist
- Serve the instance over HTTPS behind a reverse proxy (reverse-proxy.md) — share secrets travel in URLs.
- Consider
VIEWER_BASE_URL(above) once share links leave your team. - Size the disk for form uploads, or switch them off: each deck can hold up
to
FORMS_MAX_UPLOADS_MB_PER_DECK(default 5120 MB) of files sent by anonymous respondents.FORMS_MAX_UPLOAD_MB=0turns the feature off for the whole instance (deployment-profiles.md). - Never hand out
data:export-scoped keys casually; never share the/v/{secret}URL of anything sensitive without an expiry or password. - Treat any code change touching
apps/server/src/viewer/routes.tsor the security-header middleware as security-critical — the regression tests assert the exact sandbox header set on every viewer response shape.