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
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# auth-proxy

![auth-proxy architecture: the agent holds only a surrogate; auth-proxy swaps in the real credential; ap-egress handles allowlisted CONNECT egress; the agent registers surrogates through the runtime, which registers them with the proxy over the session plane; per-UID netfilter rules and a self-check confine the agent. Standalone passthrough mode is described in a note in the image.](docs/images/architecture.svg)
![auth-proxy architecture: the agent holds only a surrogate; auth-proxy swaps in the real credential; ap-egress handles allowlisted CONNECT egress; the agent registers surrogates through the runtime, which registers them with the proxy over the session plane; per-UID netfilter rules and a self-check confine the agent. Passthrough mode is described in a note in the image.](docs/images/architecture.svg)

## How it works

Expand Down Expand Up @@ -49,7 +49,7 @@ flowchart LR
auth-proxy runs in two deployment models. The gate's mechanisms — caller check,
canonicalization, per-identity policy, credential swap, and audit — work the same in
both. The sidecar `require_approval` mechanism ([#5](https://github.com/openabdev/auth-proxy/issues/5)) is still
planned and not implemented; standalone mode already has a `hold` verdict (see the Muse sections below). What changes is the trust
planned and not implemented; single-host deployment already has a `hold` verdict (gated passthrough) (see the Muse sections below). What changes is the trust
scaffolding around the gate: who vouches for the caller, where the proxy sits, and
where the real credential lives.

Expand All @@ -65,9 +65,9 @@ flowchart LR

UP1 ~~~ TP

subgraph STAND["Standalone service mode — third-party callers (Muse pilot implemented)"]
subgraph STAND["Single-host service deployment — third-party callers (Muse gated passthrough pilot implemented)"]
TP["Third-party caller<br/>Muse / Grok · pre-provisioned caller key"]
GATE["auth-proxy<br/>standalone service<br/>on a user-controlled host"]
GATE["auth-proxy<br/>single-host service<br/>on a user-controlled host"]
UP2["Upstream APIs<br/>Discord is the first consumer"]
TP -->|"no registrar — caller key<br/>provisioned out of band"| GATE
GATE -->|"platform vault path (proposed, not built): approval proof only<br/>the platform's egress would swap the credential"| UP2
Expand All @@ -85,9 +85,9 @@ reaches the proxy over loopback only, the proxy is in the data path, and upstrea
credentials live in the proxy's own store. See
[Kubernetes deployment (Option A)](#kubernetes-deployment-option-a) below.

**Standalone service mode** serves callers on platforms we do not operate — Muse,
**Single-host service deployment** serves callers on platforms we do not operate — Muse,
Grok, or another external agent platform. There is no runtime and no registrar, so
caller keys are provisioned out of band, and the proxy runs as a standalone,
caller keys are provisioned out of band, and the proxy runs as a
reachable service on a host the user controls. Enforcement shifts from network
control to credential control, in two sub-shapes.

Expand All @@ -101,12 +101,19 @@ control to credential control, in two sub-shapes.
architecture that #5 does not contain and no design review has covered yet. It is
not settled and is not part of Phase 1.

Neither sub-shape is built. What runs in standalone mode is the Muse gated passthrough below: the
caller's own `Authorization` passes through and the gate only decides. Stage 1, stage 2 (`hold`) and
asynchronous polling are implemented on main and in pilot use for one consumer and one upstream; that pilot is not
a general standalone product, and Phase 1 is unchanged.
Neither sub-shape is built. What runs in this deployment is the Muse passthrough below: the
caller's own `Authorization` passes through. Stage 1 (passthrough with allow and deny rules only) is the
base; stage 2 (gated passthrough: `hold` and human approval on Telegram) and its asynchronous polling option are implemented on main and in pilot use for one consumer and one upstream; that pilot is not
a general single-host product, and Phase 1 is unchanged.

## Muse gated passthrough (stage 1, pilot)
**Names.** "Gated passthrough" (also "the approval gate for passthrough routes") is the feature: a route runs
in passthrough mode (the caller's own credential is forwarded; the proxy neither stores nor swaps credentials)
and write requests are held until a human approves them on Telegram. "Stage 1" is passthrough with allow and
deny rules only; "stage 2" is gated passthrough (hold and human approval). The stage words are
development-phase labels only. Asynchronous polling is an option of gated passthrough (per-route
`hold_mode = "async"`), not a separate product.

## Muse passthrough with allow and deny rules (stage 1, pilot)

A second mode for one consumer (Muse) and one upstream (Discord): the caller's own `Authorization`
passes through unchanged and the gate only decides allow or deny. The caller key travels in a header,
Expand Down
13 changes: 10 additions & 3 deletions docs/design/muse-gated-passthrough.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Muse gated passthrough: a hold-the-connection approval gate
# Muse gated passthrough: the approval gate for passthrough routes

**Names.** "Gated passthrough" is the official name of this feature: a route runs in passthrough mode (the
caller's own credential is forwarded; the proxy neither stores nor swaps credentials) and write requests are
held until a human approves them on Telegram. In short prose it may be called the "approval gate for passthrough
routes". "Stage 1" is passthrough with allow and deny rules only; "stage 2" is gated passthrough (hold and human
approval). The stage words are development-phase labels. The asynchronous polling route is an option of gated
passthrough (per-route `hold_mode = "async"`), not a separate product.

Status: stage 1 is implemented and measured. Stage 2 (held-connection approval) is implemented on
main (merged), in pilot use, and tested in CI against a mock upstream; the through-the-front hold window was measured in stage 1
(a 300 s probe completed end to end, see docs/evidence/muse-stage1.md), and the disconnect signal is still open. The asynchronous route needs no long client connection. Asynchronous polling is also implemented on main, see
[muse-async-poll.md](muse-async-poll.md). Scope: a minimal proof
of concept (PoC) for one consumer, Muse calling the Discord HTTP API through auth-proxy in standalone
service mode. See "Stage 2 implementation notes" at the end of section 7 for where the code differs from
of concept (PoC) for one consumer, Muse calling the Discord HTTP API through auth-proxy in a single-host
deployment. See "Stage 2 implementation notes" at the end of section 7 for where the code differs from
this text.

This document supersedes, for this PoC only, two earlier sketches: the "platform vault path" in the
Expand Down
2 changes: 1 addition & 1 deletion docs/design/webauthn-approval.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ Until that enrolment is done, holds expire without a forward.

**Add their own credential, and then approve anything they can see a challenge for.** Say so plainly. The
protection is the file system: owner-only mode, the proxy user's directory, and the fact that the agent and
Muse have no access to the gate host [A, standalone deployment on the owner's own node]. This is the same
Muse have no access to the gate host [A, single-host deployment on the owner's own node]. This is the same
trust as the Basic hash in the config file today (anyone who can write the config can replace it) [I]. A
MAC key stored next to the file would add nothing. Detection instead: the proxy writes an audit line at load
and at every change listing the credential count and the short fingerprint of each credential (section 12),
Expand Down
2 changes: 1 addition & 1 deletion docs/evidence/muse-stage1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Muse stage 1: measurement results

Records the stage 1 measurements of the Muse gated passthrough (design: `docs/design/muse-gated-passthrough.md`).
Records the stage 1 measurements of the Muse passthrough (design: `docs/design/muse-gated-passthrough.md`).
Redacted: no hostnames, addresses, logins, URLs or keys.
Companion file for the front and framing checks: `docs/evidence/muse-stage1-front-measurements.md`.

Expand Down
6 changes: 3 additions & 3 deletions docs/images/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/runbooks/muse-stage1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Muse gated passthrough, stage 1 runbook
# Muse passthrough, stage 1 runbook

Design: `docs/design/muse-gated-passthrough.md` (sections 3, 6, 7). Stage 1 is measurement plus
allow/deny passthrough for one consumer (Muse) and one upstream (Discord), on a single instance. No
Expand Down
4 changes: 2 additions & 2 deletions docs/runbooks/netfilter-selfcheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the `netinit` init container installs. If those rules are missing or ineffective
rule flushed, a changed UID mapping, a lost capability) the boundary is gone, and before this check
the proxy kept serving. Now it fails closed.

Standalone and passthrough deployments (a loopback listener behind a private-network TLS front, no
Single-host and passthrough deployments (a loopback listener behind a private-network TLS front, no
per-UID rules) are out of scope and unchanged. The check exists only when the proxy is started with
the `--netfilter-*` flags, and a passthrough-only config refuses to start with them.

Expand Down Expand Up @@ -155,6 +155,6 @@ passthrough-only config started with any `--netfilter-*` flag exits with status
`passthrough_config_with_the_netfilter_check_exits_with_status_2`), so no process can park a request
in a world where the check is failing, and no approval can be granted into one. The fail-closed
choice is therefore enforced at startup: the combination is refused, not degraded. Passthrough and
standalone runs without the flags are unaffected by the gate. In the sidecar profile the admin socket
single-host runs without the flags are unaffected by the gate. In the sidecar profile the admin socket
and `/ready` stay responsive while the gate is closed; only the agent listener answers
`503 netfilter_unverified`.