Repository navigation
Closed
Labels
agent-readyMaintainer-approved for the Tale agent fleetbugBugdocsDocumentationservice: platformPlatform service
Description
Summary
The environment reference (en, de and fr) and the v0.5.74 upgrade notes describe TOTP_CLIENT_NAME and TOTP_ENVIRONMENT by their allowed characters only. Both leave out two rules the backend enforces at startup:
- The first character must be a letter or digit.
- An empty value is invalid, unlike an unset one.
An operator who follows the documentation can therefore write a value the backend refuses, for example TOTP_CLIENT_NAME=& Co or an empty TOTP_CLIENT_NAME= line in .env. The documents themselves say "Invalid names prevent backend startup".
Source and environment
mainat890de6258945af5c86521dd9846dc8955cffb112.- Found by reading the schemas and the documents. No deployment was started.
Evidence
- The schemas (
services/platform/lib/shared/authenticator-name.ts):TOTP_CLIENT_NAMEis trimmed, inner whitespace collapsed to one space (:29), then matched against/^[\p{L}\p{N}][\p{L}\p{N} &'.+-]{0,39}$/u(:34). The first character must be a letter or digit, and""doesn't match.TOTP_ENVIRONMENTis trimmed (:43), then matched against/^[a-z0-9][a-z0-9_-]{0,31}$/i(:45). Same first-character rule;""doesn't match.
- The backend parses both at startup (
services/platform/backend/env.ts:64–65). An invalid value fails the environment schema.- The web tier only warns and ignores an invalid value (
services/platform/lib/authenticator-env.ts:24–38), so the two roles behave differently on the same value.
- The web tier only warns and ignores an invalid value (
- The documents:
docs/en/self-hosted/configuration/environment-reference.md:27–28(and the same rows indeandfr) say "1–40 letters, digits, spaces or&'.+-, trimmed" and "1–32 letters, digits, underscores or hyphens, trimmed and uppercased"..github/release-notes/v0.5.74.md:107repeats the character list.- None of them states the first-character rule, that an empty value counts as invalid, or that inner spaces collapse.
- For comparison, the v0.5.73 notes did warn about
TOTP_ENVIRONMENT: "Leave it unset rather than empty: an empty or invalid value stops the backend from starting."
- Compose passes neither setting explicitly.
backend-apiandbackend-workerload.env, so aTOTP_CLIENT_NAME=line with no value reaches the backend as"".
Expected and observed
- Expected: the reference rows, and the upgrade note, state every rule whose violation stops the backend.
- The first character must be a letter or digit.
- An empty value is invalid: leave the variable unset rather than empty.
- For
TOTP_CLIENT_NAME, inner spaces collapse to one.
- Observed: only the character set is listed.
Impact and severity
- Severity: low. Client names rarely start with a symbol, but an empty line in
.envis a common pattern. - Consequence: either case stops the backend from starting after an upgrade that otherwise followed the documentation.
Acceptance checks
- The
TOTP_CLIENT_NAMEandTOTP_ENVIRONMENTrows indocs/{en,de,fr}/self-hosted/configuration/environment-reference.mdstate:- the first-character rule;
- that an empty value is invalid (leave the variable unset);
- for the client name, that inner whitespace collapses.
- The v0.5.74 upgrade note says the same, or links to the reference row, if the notes can still change before the release.
- Optional: a docs check, or a test that asserts the documented rules against the schemas' regexes, so they can't drift apart again.
Limits
- Static only: read from the schemas, environment parsing, Compose and documents at the SHA above. No backend was started with these values.
- Not judged: whether the web tier should also refuse invalid values instead of ignoring them. That's a design choice for the owner.
Found by TALE-358 Review A (product and experience, DOCS): occurrence 2026-10-06 08:15 Europe/Zurich, run 844c1971-1269-4696-8e56-a46d0b51ee95.
Metadata
Metadata
Assignees
Labels
agent-readyMaintainer-approved for the Tale agent fleetbugBugdocsDocumentationservice: platformPlatform service
Activity
docs: state the TOTP name rules that stop the backend
docs: state the TOTP name rules that stop the backend