web.search.searxng called the internal products-net SearXNG host over plain
http and the egress client's https-only policy blocked it ("only https is
allowed: http://"). EgressConfig gets a new http_hosts: exact host:port
entries (never a wildcard) derived only from SWITCHYARD_SEARXNG_URL when it
is http -- those hosts, and only those, are also exempted from the
private/internal-address block (the whole point of allowing http for an
internal Docker-network service name). Every other host keeps the existing
SSRF policy unchanged: https only, no private IPs, no other internal hosts.
4 new egress tests cover the scoping (own host only, not via allow_hosts,
not via IP literal).
Separately, Toolgate's native Menivor adapter sent the platform credential
as `Authorization: Bearer <token>`, but Menivor's resolve_principal only
accepts a raw key via `x-api-key` (Bearer is Clerk-JWT-only there) -- a
protocol mismatch that made every menivor.* call 401 regardless of token
validity (confirmed live: the same real service-account key gets 401 via
Bearer, 200 against GET /api/v1/jobs via x-api-key). Added with_api_key()
(send the credential verbatim, no prefix) and switched menivor_render/
menivor_status/menivor_tts to it; left Scribase/Rally on with_bearer
unchanged. Catalog's menivor provider credential placement corrected to
match (x-api-key, no prefix) for documentation accuracy.
cargo test --workspace: 0 failures.
30 lines
954 B
YAML
30 lines
954 B
YAML
# Our own products. Their base URLs come from server config, and each host is
|
|
# added to the egress allowlist at startup.
|
|
- id: relay
|
|
title: Relay (Railyard model rail)
|
|
kind: own
|
|
egress_host_from_config: relay_url
|
|
tos_resale_ok: true
|
|
- id: scribase
|
|
title: Scribase
|
|
kind: own
|
|
egress_host_from_config: scribase_url
|
|
tos_resale_ok: true
|
|
credential: { header: Authorization, prefix: "Bearer " }
|
|
- id: rally
|
|
title: Rally
|
|
kind: own
|
|
egress_host_from_config: rally_url
|
|
tos_resale_ok: true
|
|
credential: { header: Authorization, prefix: "Bearer " }
|
|
egress_hosts: [cloudflare-dns.com]
|
|
- id: menivor
|
|
title: Menivor
|
|
kind: own
|
|
egress_host_from_config: menivor_url
|
|
tos_resale_ok: true
|
|
# Menivor's resolve_principal only accepts a raw key via x-api-key -- a
|
|
# Clerk-signed JWT is the only thing it will take via Authorization:
|
|
# Bearer. No prefix: the stored key goes in the header verbatim.
|
|
credential: { header: x-api-key }
|