0015: Web origins and the hosted service
- Status: accepted
- Date: 2026-09-22
- Domain choice superseded by 0027: the
origins below now live on
vaultfold.app; the three-origin split stands.
Context
vaultfold will have a marketing site with documentation, a hosted service
(relay, sync, share blob store, accounts and billing) and share pages whose
decryption key travels in the URL fragment. Any script running on an origin
can read location.hash, and marketing sites inevitably carry third-party
code: analytics, embedded video, fonts, form widgets. Putting a page that
handles a secret's key on the same origin as any of that exposes the key to
every script on the page. The hosted service holds accounts and billing
state and needs its own strict policy, separate from both.
.io was chosen over .dev for positioning: the product is sold to teams
and businesses, not only developers, and .dev reads as developer-only.
vaultfold.io is to be submitted to the HSTS preload list at
hstspreload.org once live, with
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
set on every origin.
Decision
Three origins with distinct trust levels:
vaultfold.io: marketing site and documentation, built as static files fromweb/. Third-party scripts are tolerated here. Never handles a secret or a key.cloud.vaultfold.io: the hosted service. Accounts, billing via Polar, team administration, sync endpoints and relay endpoints. First-party code only and a strict Content Security Policy. Served by one self-hostable Go binary incloud/.s.vaultfold.io: share reveal and share request pages. Zero third-party scripts, zero analytics, no cookies, a Content Security Policy with no external sources at all, and a page small enough to audit in one screen of source. The static pages are built fromweb/but deployed to this separate origin; the blob API they call lives oncloud.vaultfold.io.
vaultfold.io is the primary domain. vaultfold.dev and any other domains
owned redirect to it.
Consequences
- A compromised or curious third-party script on the marketing site cannot observe share keys or hosted-service sessions.
- Three deployments instead of one;
web/produces two static bundles. - The share pages must be self-contained (WebCrypto in the browser, no bundled dependencies that pull from a CDN).
- Self-hosters of
cloud/need to provide their own equivalents of thecloud.ands.origins; the binary serves both. - The
.ioccTLD's long-term status after the 2024 Chagos sovereignty transfer should be re-checked before major brand investment, and the.comshould be pursued.
Alternatives considered
- One origin with paths (
/cloud,/s). Rejected: the same-origin policy gives no isolation between paths, so any script on the site can read the fragment on the share page. - Share pages on
cloud.vaultfold.dev. Rejected: the hosted service has cookies and account sessions; the share page should have neither, so that a share link can be opened by someone with no relationship to vaultfold. .ioas the primary domain. Rejected: not HSTS-preloaded at the TLD.