nforwardauth

Lightweight forward-auth service for reverse proxies

157 stars 8 forks last commit first released MIT

Actively maintained

Last commit 10 Jul 2026.

nforwardauth is a lightweight forward authentication service written in Rust that provides a single auth middleware for reverse proxies. It validates requests, issues signed auth tokens (cookies), and redirects unauthenticated users to a simple login page.

Key Features

  • Forward-auth middleware compatible with common reverse proxies such as Traefik, Caddy, and nginx
  • Uses a passwd file of usernames and hashed passwords (sha-512) for credential storage
  • Issues signed authentication tokens/cookies using a configurable TOKEN_SECRET
  • Optional downstream header (X-Forwarded-User) to pass authenticated identity
  • Configurable cookie name, domain, secure flag, port, and pass-through behavior
  • Built-in, configurable rate limiter to mitigate brute-force login attempts
  • Distributed as a Docker image and usable with docker-compose; simple static login UI

Use Cases

  • Protect multiple self-hosted web apps behind a single authentication wall
  • Integrate a simple auth layer into Traefik/Caddy/nginx setups for homelabs and small deployments
  • Provide password-based access control where a full identity provider is unnecessary

Limitations and Considerations

  • Authentication is limited to username/password entries in a local passwd file; no built-in OIDC/SAML/OAuth providers
  • No built-in CSRF protection as of current roadmap items
  • Not intended as a full SSO or enterprise identity solution; focuses on minimalism and simplicity

nforwardauth is designed for minimal operational overhead and fast response times. It is well suited to homelab and small deployments that need a simple, centralized forward-auth layer without external identity provider integrations.

Categories:

Tags:

Tech Stack:

Share:

Similar to nforwardauth

OAuth2 Proxy

Reverse proxy and middleware for OAuth2/OIDC authentication

14.9k
2.2k
Last commit

OAuth2 Proxy is a reverse proxy and middleware that protects web apps with OAuth2/OIDC login and forwards authenticated user identity to upstream services.

MITActively maintained
Alternative to:
Cloudflare Access logo
Cloudflare Access
+14

Pomerium

Identity- and context-aware access proxy for zero trust access

5k
350
Last commit

Pomerium is an identity-aware access proxy that provides zero trust, per-request authorization to internal web apps and services without a traditional VPN.

Apache-2.0Actively maintained
Alternative to:
Cloudflare Access logo
Cloudflare Access
+12
Kong Gateway logo

Kong Gateway

Cloud-native API and LLM gateway with extensible plugins

44k
5.2k
Last commit

Kong Gateway is a high-performance, cloud-native API gateway for routing, securing, and observing API traffic, with an extensible plugin system and Kubernetes support.

Apache-2.0Actively maintained
Alternative to:
Amazon API Gateway logo
Amazon API Gateway
+7

Tyk Gateway

Open source API gateway for REST, GraphQL, gRPC, and TCP

10.8k
1.2k
Last commit

Tyk Gateway is an open source, cloud-native API gateway for securing, managing, and scaling REST, GraphQL, gRPC, and TCP APIs with auth, rate limits, and policies.

Actively maintained
Alternative to:
Amazon API Gateway logo
Amazon API Gateway
+6
Zoraxy logo

Zoraxy

HTTP reverse proxy and gateway with web UI and real-time analytics

5.4k
320
Last commit

A general-purpose HTTP reverse proxy and forwarding tool for homelabs, offering web UI, ACME/TLS, stream proxy, plugins and realtime monitoring.

AGPL-3.0Actively maintained
Alternative to:
ngrok logo
ngrok
+16
g3proxy logo

g3proxy

Enterprise-oriented generic forward proxy and TCP/TLS stream proxy

894
81
Last commit

High-performance Rust proxy supporting HTTP/SOCKS5 forwarding, transparent proxying, TLS MITM, ICAP integration, ACLs, auth, and observability features.

Apache-2.0Actively maintained
Alternative to:
Bright Data logo
Bright Data
+10