The credential conformance table, and the cross-backend suite that runs it
through each backend's _testing_credential_read action.
credential_conformance.json (beside this module) is the one statement of
how both spines read the three credential headers — the session cookie in
Cookie, the API token in Authorization: Bearer, the daemon token in
X-Daemon-Token (auth/credential_headers.ts, the Rust
fuz_auth::credential_headers). It holds two tables:
- rows —
{name, lines, read, authenticates, clears_session_cookie}:
a request's credential header lines (each Name: value; a name may
repeat), how each credential leg reads them (read), and what a request
carrying them observably does — which credential authenticates it
(null for none) and whether the response clears the session cookie. - refused —
{name, lines, reason}: lines that are no header lines at
all, or more or longer lines than the action reads
(TESTING_CREDENTIAL_READ_LINES_MAX,
TESTING_CREDENTIAL_READ_LINE_LENGTH_MAX), which
_testing_credential_read refuses with invalid_params and that reason.
A line is bytes, one per character: a character U+0080–U+00FF is that byte
on the wire, which a runtime hands a handler as the same character.
Live values are per run, so lines and expected tokens name them with
{placeholders} (CredentialConformancePlaceholders), which each leg fills
from its own keyring and credentials. The legs:
- the TS unit test, through the action's input schema and
run_testing_credential_read;
- the Rust unit test in
fuz_testing, over a byte-identical copy of the
file (fuz_app's cross-backend parity project holds the two copies
byte-equal); - describe_credential_conformance_cross_tests here, sending every row to
a backend's
_testing_credential_read action; credential_conformance_wire.ts, sending each row's lines as a real
request and asserting authenticates and clears_session_cookie.
A row may carry a note for the reader. Edited by hand, never generated.