---
title: "Tenant hosts under one domain (ADR-035)"
description: "Every tenant product lives under fortspace.eu beside the platform: slug rules, cookies and same-site threats, the Public Suffix List, certificates and DNS."
---

**Decision (product, 2026-12-03, answers [Q-21](/architecture/decisions-open-questions#open-questions)):
everything stays under `fortspace.eu`.** A tenant without its own domain gets
`<product>.<slug>.fortspace.eu` (`meet.acme.fortspace.eu`, later `chat.acme.fortspace.eu`), beside the
platform hosts `id.`, `cockpit.`, `api.`, `livekit.`, `infisical.`, `s3.`, `storage.`, `mail.`. A
separate domain for tenant products was considered and **rejected**. A tenant's own domain stays a
later upsell ([03](/architecture/identity-access#custom-domains)).

| | |
|---|---|
| **Status** | **Accepted** (product, 2026-12-03); answers [Q-21](/architecture/decisions-open-questions#open-questions). Implemented in draft PRs and proven on dev; not merged, not on prod |
| **Answers** | Q-21 (the tenant public domain scheme) |
| **Touches** | ADR-032 (one issuer, one Zitadel project per product): the login host stays `id.<platform-domain>`, so a tenant host is same-site with it |
| **Code** | [control-plane#14](https://github.com/FortSpace/control-plane/pull/14), [go-meet#7](https://github.com/FortSpace/go-meet/pull/7), [bastion#12](https://github.com/FortSpace/bastion/pull/12) (drafts) |

One registrable domain for everyone means one **site** for everyone: every tenant host is
*same-site* with `id.fortspace.eu`, with `cockpit.fortspace.eu` and with every other tenant. This page
records what that exposes, what was changed so it is handled, what was proven on dev, and what is
left. The code is in [control-plane#14](https://github.com/FortSpace/control-plane/pull/14),
[go-meet#7](https://github.com/FortSpace/go-meet/pull/7) and
[bastion#12](https://github.com/FortSpace/bastion/pull/12) (drafts; the ADR-035 row in
[11](/architecture/decisions-open-questions) names them too).

## What one registrable domain exposes

A host can set a cookie for its **parent** domain (`Domain=fortspace.eu`), and the browser sends it
to every other host under it. `SameSite` does not help: it separates *sites*, and all these hosts are
one site. A page on another tenant's host (a "neighbour": a malicious tenant, a compromised tenant
stack, later a stored XSS in a tenant product) can therefore:

| Threat | What it does | Where it would hurt |
|---|---|---|
| Cookie tossing | Sets `name=value; Domain=fortspace.eu` (with a longer `Path` it is even sent *first*) | Any cookie read by name on another host |
| Session fixation | Plants a session id it knows, waits for the victim to log in, uses the id | An app that keeps the pre-login session id |
| Login CSRF | Plants its *own* valid session, so the victim acts as the attacker | Login and SSO cookies (Zitadel) |
| Same-site CSRF | Sends a form/`fetch` to another host; `SameSite=Lax`/`Strict` cookies go along | Every cookie-authenticated state-changing endpoint |
| Clickjacking | Frames another host; framed, it shares the top site's cookies and storage partition | Every UI without frame protection |
| User content | An uploaded HTML/SVG served from a `fortspace.eu` host *is* a neighbour | The S3 host, any product serving uploads |

A tossed cookie cannot **read** anything; it writes. The damage is takeover (fixation), acting as
someone else (login CSRF), or denial of service (shadowing a real cookie until the user clears it).

## Alternatives considered

| Alternative | Why it was rejected |
|---|---|
| **A separate domain shared by every tenant product** (tenant hosts under a second registrable domain, the platform hosts staying under `fortspace.eu`) | **rejected by the product decision (2026-12-03).** Technically it only separates the tenants from the platform hosts (`id.`, `cockpit.`): the tenants stay one site with each other, so every defence on this page is needed anyway |
| **Each tenant on its own domain from the start** (`acme.com`, the customer's own domain) | a domain, a DNS zone and a certificate to operate per customer before the platform has any. It stays a later upsell ([03](/architecture/identity-access#custom-domains)): a customer who brings its own domain gets its own certificate and its own cookies |
| **One shared product host with the tenant in the path** (`meet.fortspace.eu/acme`) | one origin and one session cookie for every tenant: a tenant's page would share the origin (and the storage partition) of the others, so there is no isolation at all — the opposite of what this page buys |
| **A dedicated login domain** (the IdP on its own registrable domain) | it would separate `id.` from the tenant hosts (still one issuer, on another domain), but it means a second domain against "everything stays under `fortspace.eu`", an issuer migration for every app, token and verifier, and the tenants stay one site with each other. Separating the sites is the Public Suffix List's job (below), not a domain's |

## Slugs (the host labels)

The slug is a DNS label of every tenant host, and may later be a host of its own
(`<slug>.fortspace.eu`, a tenant portal). A **new** slug (`parseNewSlug`, control plane) must match
`^[a-z][a-z0-9-]{1,30}$` (ASCII only, no dot, at most 31 characters) and also:

| Rule | Why |
|---|---|
| no trailing `-` | not a valid host label |
| no `--` anywhere | refuses `xn--…` (a punycode IDN that a browser shows as Unicode: a look-alike of another tenant or of the platform) and every other reserved `??--` label (RFC 5891) |
| not a platform host label (`PLATFORM_HOST_LABELS`: `id`, `livekit`, `infisical`, `s3`, `api`, `cockpit`, `storage`, `mail`) | a tenant's hosts would sit *under* a platform host; Zitadel's `zitadel.useragent` cookie is set with `Domain=id.<domain>` (measured), so it would reach `meet.id.<domain>` |
| not a product label (`PRODUCT_HOST_LABELS`: `meet`, `chat`, `console`, `docs`, `office`, `files`, `drive`, `webmail`, `calendar`, `contacts`, `calls`, `video`) | `meet.meet.…` reads as the product |
| not a namespace label (`PLATFORM_NAMESPACE_LABELS`: `platform`, `infra`, `internal`, `svc`, `edge`, `region`, `eu`) | **the label right under the platform domain of a future multi-label platform host is one of these** (`livekit.de.edge.fortspace.eu`, never `livekit.de.fortspace.eu`), so a platform host can never equal `<product>.<slug>`; the country codes other than `eu` (which is one of these labels) are therefore not reserved |
| not a dev host label (`cp`: the API is `cp.fortspace.local` on dev) | a dev tenant would sit under it |
| not a well-known name (`www`, `wpad`, `isatap`, `autoconfig`, `autodiscover`, `mta-sts`, `smtp`, `imap`, `mx`, `ns1`, `localhost`, …), an RFC 2142 mailbox (`abuse`, `postmaster`, …), a planned service (`turn`, `stun`, `cdn`, `static`, `usercontent`, …) | software looks these up by itself; the slug may become a host |
| no `fortspace` anywhere | `acme-fortspace` reads as ours |

Stored slugs are re-read with the old pattern only, so tightening the rules never invalidates a
tenant. Every tenant host stays within 253 characters: the worker refuses at startup a
`PLATFORM_DOMAIN` that would allow more, and `hostnames()` asserts it. Not covered: look-alikes
other than punycode (`f0rtspace`, `fort-space`) and the cockpit form (the API answers the rule's
message; the shared zod schema does not carry the reserved list yet).

**A new platform host** takes a label that is already reserved, or is added to
`PLATFORM_HOST_LABELS` (and checked against the existing tenants) *before* bastion uses it; a
multi-label platform host goes under a namespace label. The control plane's test carries a **copy**
of bastion's `hostsFor` list: two repositories, one review — a label added on one side must be
added on the other. Nothing compares the two lists automatically.

## Cookies: inventory and what a neighbour can do

Measured on dev (Chrome 155, `pnpm --filter @fortspace/dev-tools e2e --two-tenant --same-site` and
the requests listed under "How measured"), not taken from vendor docs. "Prod" notes where prod
differs from dev (dev is plain http: Zitadel's dev proxy strips `Secure`, Infisical runs without
`HTTPS_ENABLED`). No component sets a `Domain=fortspace.eu` cookie.

| Host | Cookie | Domain | Path | Secure | SameSite | HttpOnly | Prefix |
|---|---|---|---|---|---|---|---|
| `meet.<slug>.` (go-meet) | `__Host-sessionid` | host-only | `/` | yes | Lax | yes | `__Host-` |
| `meet.<slug>.` (go-meet) | `__Host-lobbyParticipantId` (unit-tested; the lobby was not exercised in the dev run) | host-only | `/` | yes | Lax | yes | `__Host-` |
| `meet.<slug>.` (go-meet) | `csrftoken` (read by the stock frontend) | host-only | `/` | yes | Lax | no | none |
| `cockpit.` (ours) | `__Host-fs_cockpit`, `__Host-fs_cockpit.0…3` (chunks) | host-only | `/` | yes | Lax | yes | `__Host-` |
| `cockpit.` (ours) | `__Host-fs_cockpit_login` (login loop guard, 120 s) | host-only | `/` | yes | Lax | yes | `__Host-` |
| `id.` (Zitadel API) | `zitadel.useragent` (device id, signed) | **`id.<domain>`** (host and below) | `/` | yes (prod) | Lax | yes | none |
| `id.` (Zitadel login v2) | `sessions` (session ids and tokens, signed since v4.19.2) | host-only | `/` | yes (prod; stripped by the dev proxy) | Lax | yes | none |
| `id.` (Zitadel login v2) | `fingerprintId` (browser id, one year) | host-only | `/` | yes (prod; stripped by the dev proxy) | Lax | yes | none |
| `infisical.` | `jid` (refresh token) | host-only | `/api` | **no** before this change; yes with `HTTPS_ENABLED` | Strict | yes | none |
| `infisical.` | `infisical-project-assume-privileges` (cleared at login) | host-only | `/api` | as `jid` | Strict | yes | none |
| `storage.` (RustFS console) | `i18n_redirected` (language) | host-only | `/` | no | Strict | no | none |
| `storage.` (RustFS console) | — credentials are in `localStorage` (`auth.credentials`), requests are SigV4-signed | | | | | | |
| `mail.` (Mailpit) | none of its own; prod's `traefikoidc` login sets its session cookie (not on dev, see residuals) | | | | | | |
| `api.` (control-plane API) | none: bearer tokens only | | | | | | |
| `livekit.` (the signaling host) | none: the client carries a LiveKit token | | | | | | |
| `s3.` (RustFS S3 API) | none: SigV4 / presigned URLs | | | | | | |

How measured: the e2e records every `Set-Cookie` line Chrome receives over https for go-meet and the
cockpit and the cookies of Zitadel's login (`.tmp/e2e/cookie-inventory.json`); Infisical's and the
RustFS console's by logging in through their UI in headless Chrome; Zitadel's API, Mailpit, the
control-plane API and S3 with plain requests.

### Per component: what a neighbour could do, and what was changed

**go-meet (ours).** Before: the session middleware adopted **any** id the `Cookie` header named, and
the OIDC callback kept the pre-login id. A neighbour could plant `sessionid=<chosen>`, the victim
logged in, and the attacker used the same id: **account takeover**. Fixed in go-meet:

* an id the store does not know (or not shaped like a session id) is treated as no cookie (a fresh
  id is minted at the next save); a store failure answers 503 instead of an empty session whose
  save would replace the user's cookie;
* the callback moves every login to a **new id**, deletes the anonymous record (Django's
  `cycle_key`) and starts from a clean session, so nothing of a previous login survives;
* a session read from the store is saved only while its record exists (atomic in Redis): a request
  that started before a logout, a back-channel logout or a login's id change cannot bring it back;
* the logout callback ends a session only with its `state` (an `<img>` on a neighbour's page would
  otherwise log the user out);
* the session and lobby cookies are named `__Host-sessionid` / `__Host-lobbyParticipantId` (the
  control plane renders `SESSION_COOKIE_NAME` and `LOBBY_COOKIE_NAME`); a `__Host-` name is always
  `Secure`. A neighbour can neither set nor shadow them. Without the prefix, the planted lobby id
  would let the attacker enter a room as the admitted visitor;
* every browser `POST`/`PUT`/`PATCH`/`DELETE` from another origin is refused
  (`net/http.CrossOriginProtection`: `Sec-Fetch-Site`, else `Origin` against `Host`), the trusted
  origins being `CSRF_TRUSTED_ORIGINS`, and `CORS_ALLOWED_ORIGINS` only with credentials (neither
  may ever list another tenant's host or `*.fortspace.eu`). Webhooks and the back-channel logout
  (no browser headers) pass; the anonymous room-creation callback stays callable across origins.
  The double-submit `csrftoken` stays for the stock frontend, and the header may match **any**
  `csrftoken` the request carries: a tossed one with a longer path is sent first and would
  otherwise lock the user out of every write;
* the GET logout (the stock frontend navigates to it) is refused when `Sec-Fetch-Site` is
  `same-site` or `cross-site`;
* every answer has `X-Content-Type-Options: nosniff`, `Content-Security-Policy: frame-ancestors
  'none'`, `Cross-Origin-Resource-Policy: same-origin` and a `Referrer-Policy`.

**Cockpit (ours).** Its session is sealed (iron-session), so a tossed value cannot be forged, but a
tossed cookie could shadow it (logout loop) and TanStack Start's own CSRF check was only an
implicit default. Fixed: over https every cookie is `__Host-` (the chunks too); `src/start.ts`
registers the CSRF middleware for server functions explicitly (`Sec-Fetch-Site: same-origin`, else
`Origin`/`Referer` equal to `COCKPIT_PUBLIC_URL`; a tenant host is `same-site` and refused); every
answer carries `X-Frame-Options: DENY`, `frame-ancestors 'none'`, `nosniff` and
`Cross-Origin-Resource-Policy`/`Cross-Origin-Opener-Policy: same-origin`. The logout was already
POST-only with an origin check. Deploying it logs every operator out once (the old `fs_cockpit`
cookie is no longer read).

**Control-plane API (ours).** Bearer tokens only, no cookie: neither tossing nor CSRF applies.
CORS stays closed.

**Zitadel (not ours).** `sessions` (login v2) and `zitadel.useragent` (API) have no `__Host-` prefix
and cannot be renamed by configuration. Both are **signed**, so a neighbour cannot forge a value.
Measured on dev:

* a forged `sessions` cookie tossed with `Path=/ui/v2/login` (sent before the real one) gives the
  attacker nothing and the victim no other identity (e2e 7e);
* the attacker's **own** valid `sessions` cookie tossed the same way is a **login CSRF** vector: the
  login page then works with the attacker's sessions. On meet the org scope and go-meet's tenant
  check stop it (e2e 7e: no foreign identity reaches meet-acme); on a product without its own org
  check (the planned console) the victim could land in the attacker's tenant;
* either cookie can be shadowed (denial of service until the victim's cookies are cleared).

Residual, accepted for now. What reduces it, in order of value: keep every product's own
org/role check after login (go-meet and the cockpit have one; the console must have one);
`prompt=select_account` on interactive logins makes the account choice visible; the PSL
(below) removes the vector entirely; a proxy in front of the login app that renames its cookies to
`__Host-` was considered and is not worth its fragility (it must rewrite both `Set-Cookie` and
`Cookie` headers and track Zitadel's cookie names across releases).

**Infisical (not ours).** Operators only; the access token is a bearer header, so CSRF does not
apply. `jid` (the refresh token) is `SameSite=Strict`, which does not stop a neighbour: a tossed
`jid` with a longer path only logs an operator out or, with an attacker's own token, into the
attacker's account (tenants have no Infisical account). **Changed (bastion):** `HTTPS_ENABLED=true`,
without which Infisical marks none of its cookies `Secure` (measured). It already sends
`X-Frame-Options: SAMEORIGIN`.

**RustFS (not ours).** The console keeps its credentials in `localStorage` and signs requests;
cookies play no role. It sends **no frame protection**, and a framed console under a tenant page
shares the operator's storage partition (same site): **changed (bastion)** to
`X-Frame-Options: SAMEORIGIN`. The S3 host serves **objects tenants put there** (recordings, later
files) from a `fortspace.eu` host: an uploaded HTML or SVG opened from a presigned link would be a
neighbour. **Changed (bastion):** every S3 answer carries `Content-Security-Policy: sandbox` (an
opaque origin: no script, no cookie; verified against Traefik 3.6); SDK clients ignore it. Cost: a
PDF opened from `s3.` (the console's PDF preview included) downloads instead of rendering inline.
No `nosniff` there: it might block media stored without a media type (assumed, not measured). The deploy now checks that
`s3.`, `storage.` and `mail.` answer with their headers.

**Mailpit (not ours, temporary).** No cookie of its own and a CSP without `frame-ancestors`:
**changed (bastion)** to `X-Frame-Options: SAMEORIGIN` (it frames its own previews). On prod the
`traefikoidc` plugin sets its session cookie; the plugin is not part of the dev stack, so that
cookie was **not measured**: check its `Domain` on prod (it must be host-only) before relying on it.

**What no cookie attribute prevents.** A neighbour can always fill the `Cookie` header of every
host with `Domain=fortspace.eu` cookies until requests are refused as too large (a "cookie bomb":
431/400 on `id.`, `cockpit.`, navigations to `api.` and every tenant until the victim clears its cookies). Only the
PSL removes it. go-meet's lobby adopts the participant id of its cookie as it is: only the
`__Host-` name keeps a neighbour from planting one (go-meet refuses to start on an https deployment
without it). On plain-http dev a tossed path-specific `sessionid` still shadows the real one.

**User-uploaded content, generally:** never served from a product host or a platform host other
than `s3.` with the sandbox header. A product that needs to render user files inline gets a
dedicated *user-content* origin decision then.

### Proven on dev

`pnpm --filter @fortspace/dev-tools e2e --two-tenant --same-site` (step 7, needs Caddy and port
443) runs Chrome over https on the dev parent domain `fortspace.local` (Caddy with its own CA in
front of meet-acme, the cockpit and a neighbour host) against the real dev Zitadel, a real go-meet
and the real cockpit build:

| Check | Result |
|---|---|
| 7a. a neighbour's `__Host-` cookie with `Domain=fortspace.local` (also `__HOST-`, and the nameless `=__Host-…` form) | refused by Chrome (`InvalidPrefix`) |
| 7a. a neighbour's unprefixed `Domain=fortspace.local` cookie | reaches meet-acme, the cockpit and `id.`: the threat is real |
| 7a. a neighbour's `__Secure-` cookie with `Domain` | accepted: only `__Host-` keeps a neighbour out |
| 7b. session fixation with the tossable name `sessionid` | the planted id gives the attacker nothing (id rotation alone) |
| 7b. session fixation against `__Host-sessionid` | the victim's only session cookie is host-only and fresh; the planted id gives nothing |
| 7c. cookies tossed after the login | the victim's session survives |
| 7d. the neighbour's logout of meet-acme (fetch POST, form POST, GET navigation) | 403, session survives; the same POST from meet-acme itself logs out |
| 7d. the neighbour calls a cockpit server function | 403; the cockpit's own call passes |
| 7d. framing | neither the cockpit nor go-meet can be framed |
| 7e. a forged / a foreign `sessions` cookie at Zitadel's login | no other identity reaches meet-acme (residual above) |

## Consequences

What the decision buys and what it costs, in one place:

* **A neighbour is a real threat model.** Every tenant host can act as one, so the platform's own
  state-changing endpoints must refuse a cross-origin write from a host that is not its own. That is
  the rule the code now follows (origin checks, `__Host-` cookies, a fresh session id at every login),
  not a new feature.
* **The PSL is the only complete answer** to cookie tossing between tenants, and it is not submitted
  (below). Until it is, the platform's own defences are what keeps one tenant out of another's
  session.
* **Operators are logged out of the cockpit once** when the change deploys: the old `fs_cockpit`
  cookie is no longer read (the new one carries the `__Host-` prefix). The same holds for a tenant's
  go-meet: the old `sessionid` cookie is ignored, so its people log in again.
* **A PDF opened from `s3.` downloads** instead of rendering inline: the sandbox CSP (above) makes
  the object an opaque origin. A tenant's own products that show files inline need a dedicated
  *user-content* origin decision.
* **go-meet must be deployed with the `__Host-` cookie names** (the worker renders them). An https
  stack (`OIDC_REDIRECT_REQUIRE_HTTPS=true`) that names them otherwise **refuses to start**: a
  neighbour could plant that cookie (the lobby participant id would be adopted). It also refuses a
  trusted origin that is another tenant's host. The other way round: the prefixed
  names need **https** — over plain http the browser drops a `Secure` cookie, so a stack served over
  http has no session at all (the dev stack over http therefore keeps the plain names).
* **Zitadel's login cookies stay unprefixed** (their code, not their configuration): a neighbour can
  shadow them (the victim is logged out) or plant a valid session (login CSRF). Every product must
  check the org and the role after the login, not trust the IdP's cookie.
* **A tenant's name is public** in certificate transparency logs (every option, see below). A tenant
  that objects needs its own domain or an opaque label.
* **Existing tenants keep their slug**: the tightened rules apply to new slugs only, so nothing
  breaks; the certificate and DNS work is per tenant host and is done when a tenant gets a product.

## Public Suffix List (evaluated, not submitted)

Adding `fortspace.eu` to the PSL's private section would make every `<label>.fortspace.eu` its own
registrable domain ("eTLD+1"), like `github.io`.

**What it changes**

* **Cookies:** `Domain=fortspace.eu` is refused by every PSL-aware browser: cookie tossing between
  tenants, and from a tenant to `id.`/`cockpit.`, is gone, for Zitadel's cookies too. A tenant's own
  products stay one site (`meet.acme` and `chat.acme` share `acme.fortspace.eu`).
* **Sites:** tenants and platform hosts become **cross-site** to each other: `SameSite=Lax` and
  `Strict` start to separate them, `Sec-Fetch-Site` reads `cross-site`, storage and third-party
  cookies are partitioned per tenant.
* **Our own cross-host flows:** login and silent re-authorization are top-level GET redirects to
  `id.`, which carry Lax cookies cross-site: they keep working (the same reasoning as custom domains
  in [03](/architecture/identity-access#custom-domains)). Anything that relies on `id.`'s cookies in
  an iframe or a cross-site POST (`response_mode=form_post`, iframe renewal) would break; none is
  used. Passkeys/WebAuthn must use `id.fortspace.eu` as RP ID, never `fortspace.eu` (a public suffix
  cannot be an RP ID): check before enabling passkeys.
* **Let's Encrypt:** the 50-certificates-per-registered-domain-per-week limit would apply per tenant
  instead of to all of `fortspace.eu` together. The PSL does not accept an entry whose **sole
  purpose** is to circumvent a third party's rate limit: that may not be the rationale.
* **Reputation:** Safe Browsing and similar lists judge each tenant's domain separately: one abusive
  tenant no longer taints `fortspace.eu`.

**Requirements and cost:** a pull request to `publicsuffix/list` from the domain owner, a `_psl` TXT
record naming the PR (kept forever), the registration paid more than two years ahead (and kept
more than one year ahead), a detailed rationale. **Smaller projects (under a few thousand users)
are usually declined**, there is no SLA, and propagation into browsers, operating systems and
libraries takes months and is not uniform. **Undoing it** is a second PR with the same delays, and
copies of the list in the field keep the old entry for years.

**Recommendation:** not now. The fixes above make the platform safe without it, and a submission
today would likely be declined for size. Revisit when the platform serves thousands of users and
before any product renders tenant-controlled HTML on a tenant host; prepare it then (rationale:
mutually untrusting tenants under one domain, the GitHub-Pages case). Whatever happens, keep
`__Host-` cookies and origin checks: PSL-unaware clients exist.

## Certificates and DNS for `<product>.<slug>.fortspace.eu`

**Decided (product, 2026-12-03): a Traefik DNS-01 resolver with Scaleway (lego provider
`scaleway`), one certificate per tenant** — option B below. What is left is how, not whether: the
Scaleway wildcard check, the scope of the key, and who writes the per-tenant records. Nothing is
applied yet.

**Two wildcard rules, easy to confuse.** A wildcard **certificate** covers one label only:
`*.fortspace.eu` does not cover `meet.acme.fortspace.eu`. A wildcard **DNS record** covers every
name below it, as long as no node exists in between (RFC 4592 §2.2.1: `*.example.` answers
`foo.bar.example.`): `*.fortspace.eu` A covers `meet.acme.fortspace.eu` too. That is why the
certificate and the DNS of a tenant host are two different questions.

The platform hosts get per-host certificates today through Coolify's default `letsencrypt` resolver
(HTTP-01 through frp's port 80). DNS is at Scaleway.

**The fact that shapes the choice (measured with BIND 9.20 on dev):** a wildcard answers only for
names with no closer existing node. With `* A` in the zone and **any** record under `acme.` (the
`_acme-challenge.acme` TXT of a DNS-01 validation, or a CNAME delegating it), `acme.fortspace.eu`
becomes an empty non-terminal: the closest encloser of `meet.acme.fortspace.eu` is then
`acme.fortspace.eu`, the source of synthesis would be `*.acme.fortspace.eu` — which does not exist
— and the name answers **NXDOMAIN** (resolvers cache that for the SOA's negative TTL), while
`meet.globex.fortspace.eu` still resolves through the platform wildcard (RFC 4592). The same zone
answers `meet.acme.fortspace.eu` normally as long as nothing exists under `acme.`, and a **tenant**
wildcard `*.acme.fortspace.eu` is not affected at all (its own parent is the node). Scaleway's
behaviour must be checked on a throwaway zone before relying on any of this; if it behaves like
BIND, a `*.fortspace.eu` wildcard alone cannot serve tenant hosts during (or, with delegation,
after) a DNS-01 validation.

| | A. HTTP-01, one certificate per tenant (SANs = its product hosts) | B. DNS-01, one wildcard per tenant (`<slug>` + `*.<slug>`), Scaleway | C. DNS-01 with a delegated validation zone |
|---|---|---|---|
| DNS records per tenant | none (`*.fortspace.eu` A covers every tenant host) | none in principle, **but** the transient `_acme-challenge.<slug>` TXT breaks the wildcard for that tenant at every issuance and renewal; in practice `<slug>` + `*.<slug>` records per tenant | one permanent `_acme-challenge.<slug>` CNAME per tenant, which breaks the wildcard permanently: `<slug>` + `*.<slug>` records per tenant are required |
| DNS credential on the edge | none | a Scaleway key with `DomainsDNSFullAccess` on the **project** that holds `fortspace.eu`: it can rewrite `id.`, `api.`, MX, everything in every zone of that project | a key scoped to a dedicated Scaleway project that holds only the validation zone; the main zone's per-tenant records still need a writer |
| Edge configuration | none new (the existing `letsencrypt` resolver; the tenant compose sets its routers) | a second resolver (`--certificatesresolvers.scaleway.acme.dnschallenge.provider=scaleway`, `SCW_SECRET_KEY`, optionally `SCW_PROJECT_ID`) in Coolify's proxy configuration | as B, plus CNAME following (lego's default) |
| New product for a tenant | a new certificate (the SAN set changes) | covered by `*.<slug>` | covered |
| Let's Encrypt limits | 1 new certificate per tenant (and one per product added); 50 / week for all of `fortspace.eu`; renewals with ARI are exempt | 1 per tenant; same 50 / week | same as B |
| Certificate transparency | every product host of every tenant | `<slug>` and `*.<slug>` | as B |
| Failure modes | port 80 must stay reachable through frp | the ENT outage; a leaked key is a platform takeover; the proxy restart to add the resolver interrupts all traffic | the ENT is permanent unless the per-tenant records exist |

**Certificate transparency** exposes the tenant's name (`acme`) in every option: the decided scheme
puts the org in the host name, and any public certificate names it. Customers who need their name
kept out of public logs need a custom domain (the upsell) or an opaque label; this is a product
decision, not a technical one.

**The decided option is B.** A (HTTP-01) needs no DNS credential and stays the fallback if the
Scaleway check fails or until the resolver is in place: the tenant's Pulumi stack then declares its
routers with `tls.certresolver=letsencrypt` and the SAN list of its product hosts. B goes in only
after the Scaleway check above, with:

* a **dedicated Scaleway project** holding only `fortspace.eu`'s DNS (nothing else: no buckets, no
  other zones), and an IAM application whose single policy is `DomainsDNSFullAccess` on that
  project; Scaleway IAM has no per-zone or TXT-only restriction, so this is the smallest scope there
  is, and it still covers the whole `fortspace.eu` zone. A further step is to move tenant names into
  a delegated sub-zone, which the decided scheme does not allow;
* per tenant, `<slug>` and `*.<slug>` records (CNAME to one edge name) written by the control plane
  (its DNS port) — which then needs a DNS key too, so prefer the worker, never the API process;
* the resolver in Coolify's proxy configuration **managed as code by bastion**: Coolify's API saves
  the proxy compose (`PUT /servers/{uuid}/proxy/configuration`, resource `coolify_server_proxy` of
  the Terraform provider) and restarts it (`POST …/proxy/restart`). Coolify keeps a saved
  configuration across its own upgrades and does not update an existing proxy's image by itself;
  edits on disk are overwritten by the next restart through Coolify. The key would sit in the proxy
  compose (Coolify's database, the Pulumi state, the container environment); `SCW_SECRET_KEY_FILE`
  avoids the environment only with a file Coolify does not manage.

Nothing of this was applied: no DNS record, no key, no proxy change.

## Decisions only the product owner can make

| # | Decision | Recommendation |
|---|---|---|
| 1 | Accept the Zitadel login-CSRF / cookie-shadowing residual until the PSL (a dedicated login domain was rejected with ADR-035) | Accept; require an org/role check after login in every product (the console included) |
| 2 | Submit `fortspace.eu` to the PSL | Not now; revisit at a few thousand users or before tenant-controlled HTML on tenant hosts |
| 3 | Certificates (decided: DNS-01 with Scaleway, one per tenant): the scope of the Scaleway key (`DomainsDNSFullAccess` is project-wide: it can rewrite every record of `fortspace.eu`) and when the resolver goes in | A dedicated Scaleway project holding only the DNS, the key on the worker and the proxy only; run the Scaleway wildcard check on a throwaway zone first; HTTP-01 (A) until then |
| 4 | Tenant names are public in certificate transparency (every option) | Accept; offer custom domains (or opaque labels) to customers who object |
| 5 | Reserved slug list: names a paying customer may want (`demo`, `test`, `dev`, `app`, `my`, `portal`, two-letter `eu`) | Keep reserved; release one by hand if a customer asks |
| 6 | A tenant portal on `<slug>.fortspace.eu` (the slug host itself) | Keep the option; the reserved list already assumes it |
