ProxyAuth / Security

ProxyAuth × BeyondCorp: an application access layer, mechanism by mechanism

ProxyAuthSecurity / Zero TrustUpdated on 2026-09-18

Someone commented on the project:

“You should look into Google’s new thing. It’s what comes after BeyondCorp. You’ll find it directly relevant.”

They meant Beyond Zero, Google’s security model for the AI era — contextual, risk-based authorization down to the resource and action, including for AI agents. ProxyAuth is not an attempt to reproduce Google’s architecture. But the underlying question is the same:

How should access to applications be decided — per request, not per network?

This post answers it concretely, with what ProxyAuth enforces today.

The BeyondCorp idea in one paragraph

Being “inside the network” should grant nothing. Every request to an application goes through an access proxy that knows who is asking, from where, and under what policy, and decides then. The application behind it is not reachable any other way.

ProxyAuth is that access proxy for applications you host, with one difference in scope: it is a single binary you run, not a cloud service, and its policy is a file you can read.

Principle 1 — nothing is reachable except through the gate

The backend listens on 127.0.0.1 or a private interface; ProxyAuth is the only public entry. Several properties make that entry trustworthy:

  • Identity is asserted, not relayed. The backend receives X-User, X-User-Roles, X-User-Groups. Client copies are stripped, so they cannot be forged.
  • No framing ambiguity. Hop-by-hop headers are stripped and bodies re-framed, which closes request smuggling past the access checks.
  • Optional backend mTLS. With cert on a route and strict_mtls: true, the backend can require proof that the caller is ProxyAuth.

Principle 2 — every request is evaluated

A token is verified on each request: signature and expiry, then — never cached — the user lookup, the current expiry policy and the revocation set. Revoking a token, editing a user or shortening token_expiry_seconds takes effect on the next request. Across nodes, revocations propagate over Redis within one 15-second tick.

Principle 3 — policy is per application

One instance, many vhosts, each with its own policy:

vhosts:
  - vhost: ["grafana.example.com"]
    allow_groups: ["observability"]
    login_via_otp: true
    max_age_session_cookie: 3600
    # ...

  - vhost: ["admin.example.com"]
    allow_roles: ["admin"]
    exclude_users: ["contractor-temp"]
    login_via_otp: true
    max_age_session_cookie: 900
    redirect_protect:
      allow_ip: ["10.0.0.0/8"]
    # ...

A vhost that names nobody accepts no login: a new application is closed until someone decides who belongs. That is the Zero Trust default, written into the configuration model.

Principle 4 — authentication is not authorization

Two gates, deliberately separate:

  1. May this account log in on this vhost? allow_users, allow_groups, allow_roles, with exclude_users overriding all.
  2. May this logged-in account reach this route? username, groups, roles per route.

And beneath them, conditions that are not about identity at all:

SignalMechanism
networkip_blocklists, route allow_ips/deny_ips, per-account allow
methodallow_methods
request contentfilters on method, path, headers, query, body
rateratelimit_auth, ratelimit_proxy
second factorlogin_via_otp per vhost
application stateredirect_protect.paths, asking the backend itself
- prefix: "/v1/deploy"
  target: "http://127.0.0.1:8000"
  required_login: true
  roles: ["ci"]
  allow_ips: ["10.20.0.0/16"]
  allow_methods: ["POST"]

“The CI role, from the build network, with POST only” is already an action-level rule for one endpoint.

Principle 5 — the decision is explainable

The authorization function reports why access was granted — a username, a group, a role, or an open route — and the CLI calls the same function:

proxyauth routes-audit
proxyauth check-access --username alice

An access layer whose decisions cannot be explained cannot be audited. Add the access log with [username], [token-id], [vhost] and [route], ship it to Loki, and every decision has a trace.

Principle 6 — contain the blast radius

Tokens are tied to the build that issued them. Instances only accept each other’s tokens where build constants were deliberately shared with sync. That makes it possible to split a deployment into trust groups — public front, internal admin, back-office — so that one compromised node cannot mint sessions everywhere.

Where ProxyAuth stops today

Being precise matters more than the comparison:

  • No device posture. ProxyAuth does not know whether a laptop is managed, encrypted or patched. Network signals are not device trust.
  • No continuous risk scoring. Policy is declarative, not adaptive: it does not raise requirements because behaviour looks unusual.
  • No step-up per action. TOTP is required at login per vhost, not re-asked before a sensitive operation.
  • WebSocket is not supported through the proxy.
  • Policy is per path and method, not per resource instance (“this user may edit this document”).

The last point is where redirect_protect.paths helps a little: it lets the backend, which knows the resource, answer the question.

Agents change the question

An API client, an automation, an AI agent: each can authenticate perfectly and still do something nobody intended.

An authenticated identity is not a trustworthy action.

The pieces ProxyAuth already has point in that direction — bearer tokens with explicit expiry, per-route roles, method and body filters, immediate revocation, a per-token usage view at /adm/stats/sessions. What is missing is the layer above: short-lived, narrowly scoped permissions for agents, context attached to a request, and a second verification before high-risk actions.

Those are open questions, and the ones I find most interesting.

Not a replacement for anything

Authelia, Authentik and others are good projects. ProxyAuth takes a different shape: authentication, authorization and access control in the same process that routes the request, with a configuration model built around many applications and strict defaults.

If you work on Zero Trust, IAM, reverse proxies or agent security, I would like to hear where you think an authentication proxy should stop — and where policy for actions, not just identities, should begin.