Skip to content

fix(catalog): a private endpoint over http is not a key on the wire - #8

Merged
klNuno merged 1 commit into
mainfrom
feat/catalog-private-http
Aug 13, 2026
Merged

klNuno merged 1 commit into
mainfrom
feat/catalog-private-http

Conversation

@klNuno

@klNuno klNuno commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The cleartext guard refused any http:// catalogue that carries a key, with loopback as the
only exception. An endpoint on a home LAN is reached over http for inference too, with the
same token in the same header on every call, so refusing to list its models protects nothing
and pushes the config toward auth = "none", which fails against anything that
authenticates.

is_loopback_url becomes is_private_url and parses the host rather than matching on its
shape: loopback, RFC 1918, CGNAT, link-local, unique-local v6, and .local / .internal
names. Public hosts are refused as before, lookalikes included: 10.0.0.1.evil.invalid is a
public name and is treated as one.

One file, src/config.rs, tests included.

The cleartext guard refused any `http://` catalogue that carries a key, with
loopback as the only exception. That reads as careful and is incoherent: an
endpoint on a home LAN is reached over http for inference too, with the same
token in the same header on every single call, so refusing to *list* its
models protects nothing. What it does instead is push the config toward
`auth = "none"`, which fails outright against anything that authenticates.

`is_loopback_url` becomes `is_private_url` and now parses the host rather than
matching on its shape: loopback, RFC 1918, CGNAT (a tailnet), link-local,
unique-local v6, and `.local` / `.internal` names. Public hosts are refused
exactly as before, lookalikes included: `10.0.0.1.evil.invalid` is a public
name and is treated as one.

The case that prompted it: a broker on the LAN that serves its own
`/v1/models`, authenticated by the same virtual key the harness already sends
it on every request.
@klNuno
klNuno merged commit 66ecf7e into main Aug 13, 2026
5 checks passed
@klNuno
klNuno deleted the feat/catalog-private-http branch August 13, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant