Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions changelog.d/5512.security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- **An empty host no longer counts as loopback on the cleartext, revocation and trust-anchor
checks.** The shared on-box check read `""` as this machine, so in the shipped code a hop with an
unset host would have skipped those checks while its real destination was unknown. Each caller
now says what an empty host means. A blank HTTP listener host binds `127.0.0.1`, so the
peer-control gate reads it as on-box. A log forwarder with no host has no hop to judge. The
log-forwarding and key-share checks still count a blank value as this host. A generic ODBC
`server`, and the `server` of the SQL Server preset (`Database`, `DatabasePoll`,
`DatabaseLookup`, `DatabaseRef`), that names no host is refused at every posture, and neither
`tls_hop_attested` nor `cleartext_accepted` crosses it. A preset `server` of `None`, as a
`DatabaseRef` can carry, is refused too, and is never sent as the host `None`. At least a blank
value, a bare `:port`, `[]`, an empty entry beside a comma, and a host made only of brackets,
colons and digits that is neither all digits nor an IPv6 literal, such as `[,]` or `:1433:`,
name no host. A plain number, bare or before a port (`1433`, `[1433]`, `12:34`), and the IPv6
literals `::` and `[::]` are accepted. A protocol prefix with nothing after it, such as `tcp:`,
is not caught. The same values are refused at load in a SQL Server
`[store].server`, and a value of spaces in a PostgreSQL one. An empty PostgreSQL `server` still loads, and that hop is judged off-box.
(`BACKLOG #5512`)
2 changes: 1 addition & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ backend-limited.
| `vault_revocation_attested_reason` | str | — | **required** with `vault_revocation_attested = true`: what covers revocation of the store Vault's certificate, for example its short lifetime, and of an `https://` proxy's in front of it. The flag without it, a blank one, one holding a control character or a lone surrogate, or a reason without the flag is refused at load. It is printed in the loosening report and the serve-time warning, so put no secret in it. Env: `MEFOR_STORE_VAULT_REVOCATION_ATTESTED_REASON` |
| `require_encryption` | bool | `false` | keeps the keyless refusal in force past the audited opt-out. It does not create that refusal, which is the default; [PHI.md](PHI.md#3-encryption-at-rest) §3 states the rule and the opt-out. It encrypts nothing itself, so a key is still needed. |
| `allow_unencrypted_phi` | | | **→ moved to `[security].allow_unencrypted_phi`** (ADR 0118) — set it there; no longer accepted in `[store]`. |
| `server`, `port` | str/int | — / 1433 | server DBs (required for `sqlserver`) |
| `server`, `port` | str/int | — / 1433 | server DBs (required for `sqlserver`, where at least a blank value, a bare `:1433`, `[]`, an empty entry beside a comma, and a host made only of brackets, colons and digits that is neither all digits nor an IPv6 literal (such as `[,]` or `:1433:`) are refused at load, while a plain number such as `1433` or `12:34`, `::` and `[::]` are accepted, and a protocol prefix with no host, such as `tcp:`, is not caught; on `postgres` a value of spaces is refused, and an empty one reads as `PGHOST`, then asyncpg's local default, with the hop judged off-box) |
| `database` | str | — | server DBs (required for `sqlserver`) |
| `auth` | enum | `sql` | `sql` · `integrated` · `entra` (SQL Server). `integrated` connects `Trusted_Connection=yes` — the **service account's** Windows identity authenticates (no SQL password); the turnkey **gMSA** walkthrough (grant the gMSA a SQL login + run the service under it) is [`DEPLOY-SERVER-DB.md` §1.1](DEPLOY-SERVER-DB.md). |
| `username` | str | — | server DBs (required when `auth = sql`) |
Expand Down
10 changes: 8 additions & 2 deletions docs/CONNECTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,12 @@ host.
`DatabasePoll`, which takes only [its allowlist](#the-generic-driver-allowlist).
`DatabaseLookup` and `DatabaseRef` take only a Microsoft driver.
- `server` must hold no comma, since the preset adds its own `,<port>`. Put the port in `port`.
- `server` must name a host (BACKLOG #5512), at every posture, and neither `tls_hop_attested`
nor `cleartext_accepted` crosses the refusal, since the preset would send `SERVER=,<port>` and
the driver would pick its own destination. A `server` of `None`, which a `DatabaseRef` can carry,
is refused the same way and is never sent as the host `None`. What counts as naming no host is
stated once, in the `server` row of the generic dialect's [*Values*](#values-on-the-generic-dialect)
table, and the preset reads the same spellings.
- `server` must hold no `\`. The preset always sends a port, so an instance name there is not what
the driver dials; a driver that reads the instance in place of the port, as FreeTDS does, would
dial a port the check never compared. Set `port` to the instance's port.
Expand Down Expand Up @@ -2441,7 +2447,7 @@ built, and the error names the setting and never the value:
| `database`, `username`, every `odbc_params` value (`PORT` and `SSLmode` included) | plain, `SSLmode=verify-full` | printable ASCII; none of `;`, `{`, `}`, `=`, `"`, `'`; not empty or blank; no leading or trailing space. An `odbc_params` value of `None` is refused, never sent as the text `None`; leave the keyword out instead. An `odbc_params` value of `true` or `false` is refused, never sent as the text `True` or `False`; write the driver's own spelling as a string. An unset `database` or `username` is left out of the string |
| `SSLmode`, in any case of the keyword | plain | for MySQL Connector/ODBC under its registered name, exactly one of `DISABLED`, `PREFERRED`, `REQUIRED`, `VERIFY_CA`, `VERIFY_IDENTITY`, in upper case; refused on Microsoft's `ODBC Driver <n> for SQL Server`, which reads `Encrypt` instead; for psqlODBC, exactly one of `disable`, `allow`, `prefer`, `require`, `verify-ca`, `verify-full`, in lower case. See [*The `SSLmode` spelling*](#the-sslmode-spelling) |
| `odbc_driver` | braced, `DRIVER={PostgreSQL Unicode}` | printable ASCII, and none of `;`, `{`, `}` |
| `server` | plain | printable ASCII, and none of `;`, `{`, `}`, `=`, `"`, `'`; `None` is refused |
| `server` | plain | printable ASCII, and none of `;`, `{`, `}`, `=`, `"`, `'`; `None` is refused, and so is at least a blank value, a bare `:port`, `[]`, an empty entry on either side of a comma, and a host made only of brackets, colons and digits that is neither all digits nor an IPv6 literal (such as `[,]` or `:1433:`), whatever the posture, `tls_hop_attested` or `cleartext_accepted`. A plain number (`1433`, `[1433]`) or digits-only host with a port (`12:34`), and the IPv6 literals `::` and `[::]`, are accepted. The SQL Server preset (`Database`, `DatabasePoll`, `DatabaseLookup`, `DatabaseRef`) refuses the same spellings the same way, except that a value holding a comma meets the preset's own comma refusal first. A protocol prefix with no host after it, such as `tcp:`, is not caught |
| `password` | braced, with the `}}` escape | printable ASCII. See below |

Why no braces. On 2026-10-30, the engine's braced strings were measured against real drivers.
Expand Down Expand Up @@ -4247,7 +4253,7 @@ that carries no recognized credential crosses in three ways that do not claim th

| | claim | disposition |
|---|---|---|
| the hop is **on-box** (loopback / `localhost` / empty host) | not a network exposure | ALLOW |
| the hop is **on-box** (loopback / `localhost`; an empty host is not on-box) | not a network exposure | ALLOW |
| `cleartext_accepted = true` + `cleartext_reason` | this hop is **not** secure, and we accept that | **WARN** — crossed, loudly logged **and recorded at every construction** |
| `[security].enforcement = warn` | the instance-wide refuse/warn dial is at `warn` | WARN — but **only for the raw transports** (`MLLP()`, `Tcp()`, `X12()`, `DICOM()`, `Email()`, `Ftp()`). The HTTP family (`Rest()`, `Soap()`, `FHIR()`, `DICOMweb()`, `FhirLookup()`) shipped these refusals unconditionally, and ADR 0092 decision 5 forbids a cell getting weaker, so a no-loosen floor turns that WARN back into a REFUSE there. The dial is **not** a substitute for the declaration |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ secure hop (a proxy-terminated / trusted-segment hop) that replaces reliance on
A thin `enforce_insecure_hop(disp, *, message, cell, audit_sink)` acts on the decision: raise
`InsecureHopRefused` (a `ValueError`, so it surfaces as a config-load / `build_check` error) on REFUSE;
loud-log **+ audit** on WARN; no-op on ALLOW. `transports/rest._is_loopback_egress_host` is **hoisted** to
`tls_policy.is_loopback_hop_host` (literal `127.0.0.0/8`, `::1`, `localhost`, empty host) so the HTTP-egress
`tls_policy.is_loopback_hop_host` (literal `127.0.0.0/8`, `::1`, `localhost`; BACKLOG #5512 removed the empty host) so the HTTP-egress
cell and the authority share **one** definition; it **never resolves DNS** — an unprovable name is REMOTE
(fail-closed), so a hostname can't smuggle an off-box hop past the on-box carve-out.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Do not restate it as one. §6 names what would flip it.
one keyed on a single host: it puts one leg on loopback and the other off-box, both ways round, and
asserts that the off-box leg's own cell refuses. The WARN arm also sees both legs, one warning
each. `::test_an_oidc_leg_with_no_host_is_refused_not_treated_as_loopback` pins that a leg whose
host cannot be read is refused, since the guard would otherwise treat an empty host as loopback.
host cannot be read is refused, whatever the posture.

**AC-4 WAS PARTIAL UNTIL 2026-09-23, AND THE OIDC LEGS ARE NOW BUILT (BACKLOG #1887).** Under #1498
it covered two hops of the three, and this notice said the OIDC token and JWKS legs were not built.
Expand Down
Loading
Loading