Skip to content

Proxy Authentication

Daniel Nevoigt edited this page Nov 16, 2026 · 3 revisions

Proxy authentication / Anmeldung hinter Proxys

English

Since 1.2.0: Requests carrying Forwarded, X-Forwarded-For or X-Forwarded-Host require a valid Bearer token for /api/v1/*, /hook/*, /ui and /ui/*. Empty header values and values claiming localhost also count. The built-in assistant gateway preserves this evidence and the Authorization header.

Since 1.2.1 this holds on every local route, not only on /api/v1/*, /hook/* and /ui. X-Real-IP, X-Forwarded-Proto and Via also count as proxy headers. Only the public OAuth documents under /.well-known/ stay open, as before.

Direct local clients without those headers keep their existing access. This is proxy detection, not proof of the caller's operating-system account. A proxy or tunnel that rewrites Host to a local address and sets no proxy header cannot be told from a direct local caller. Do not publish the local port through such a proxy. Preserve the public Host and verify an unauthenticated request from outside returns 401. Keep hooks and the UI private; the API token is not a username/password browser login.

BASTRA_AUTH_LOOPBACK_SKIP=0 disables the API's local exception, but can require changes to local clients. Follow the remote-access guide for tunnel setup and the external check. The separate username/password login is still a plan, not shipped behavior.

Deutsch

Seit 1.2.0 gilt: Anfragen mit Forwarded, X-Forwarded-For oder X-Forwarded-Host brauchen für /api/v1/*, /hook/*, /ui und /ui/* ein gültiges Bearer-Token. Auch leere Headerwerte und localhost-Angaben zählen. Der eingebaute Assistenten-Gateway erhält diese Merkmale und den Authorization-Header.

Seit 1.2.1 gilt das auf jeder lokalen Route, nicht nur auf /api/v1/*, /hook/* und /ui. Auch X-Real-IP, X-Forwarded-Proto und Via zählen als Proxy-Header. Offen bleiben wie bisher nur die öffentlichen OAuth-Dokumente unter /.well-known/.

Direkte lokale Clients ohne diese Header behalten ihren bisherigen Zugriff. Das erkennt Proxys, beweist aber nicht das Betriebssystem-Konto des Aufrufers. Ein Proxy oder Tunnel, der den Host auf eine lokale Adresse umschreibt und keinen Proxy-Header setzt, ist nicht von einem direkten lokalen Aufrufer zu unterscheiden. Veröffentliche den lokalen Port nicht über einen solchen Proxy. Öffentlichen Host erhalten und von außen prüfen, dass eine Anfrage ohne Anmeldung 401 liefert. Hooks und UI bleiben privat; das API-Token ist keine Browser-Anmeldung mit Nutzername und Passwort.

BASTRA_AUTH_LOOPBACK_SKIP=0 schaltet die lokale API-Ausnahme ab, kann aber Anpassungen lokaler Clients erfordern. Die Fernzugriff-Anleitung beschreibt Tunnel und Außenprüfung. Die getrennte Anmeldung mit Nutzername und Passwort ist weiterhin ein Plan, keine ausgelieferte Funktion.

Navigation

English — 1.2.1

Deutsch — 1.2.1

Clone this wiki locally