feat: add proxy authentication middleware (Authentik, Authelia support)#143
Open
brian-olson wants to merge 1 commit intoEugeny:masterfrom
Open
feat: add proxy authentication middleware (Authentik, Authelia support)#143brian-olson wants to merge 1 commit intoEugeny:masterfrom
brian-olson wants to merge 1 commit intoEugeny:masterfrom
Conversation
Add ProxyAuthMiddleware for authenticating users via reverse proxy headers. When PROXY_AUTH_ENABLED=true, the middleware: - Trusts X-Auth-User-Email header from auth proxies (Authentik, Authelia, etc.) - Auto-creates users by email (get-or-create pattern) - Logs users in automatically - Optionally reads X-Auth-User-Name and X-Auth-Tenant-Id headers This enables integration with self-hosted identity providers and SSO solutions that use ForwardAuth or similar patterns to pass authenticated user info via headers. Fixes Eugeny#140, Eugeny#126, Eugeny#116
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
ProxyAuthMiddlewarefor authenticating users via reverse proxy headers. This enables integration with self-hosted identity providers like Authentik, Authelia, and any ForwardAuth-compatible service.When
PROXY_AUTH_ENABLED=true, the middleware:X-Auth-User-Emailheader from auth proxiesX-Auth-User-NameandX-Auth-Tenant-IdheadersConfiguration
The middleware expects these headers from the auth proxy:
X-Auth-User-EmailX-Auth-User-NameX-Auth-Tenant-IdUse Cases
Fixes
Testing
Tested with ForwardAuth proxy setting headers: