community.dhcf.eu Sign in

Upgrading to external auth

Replace built-in auth with Authentik, Authelia, or another proxy.

Overview

The built-in auth (lazysite-auth.pl) and external auth proxies use the same mechanism: HTTP headers. The processor reads X-Remote-User and X-Remote-Groups regardless of what sets them. Upgrading from built-in to external requires no changes to pages or the processor.

Steps

  1. Set up your auth proxy (Authentik, Authelia, etc.) with your domain
  2. Configure the proxy to forward X-Remote-User and X-Remote-Groups headers to the backend
  3. If your proxy uses different header names, update lazysite.conf:
auth_header_user: Remote-User
auth_header_groups: Remote-Groups
  1. Change the Apache FallbackResource from lazysite-auth.pl back to lazysite-processor.pl:
FallbackResource /cgi-bin/lazysite-processor.pl
  1. Replace login.md with a redirect to your proxy's login page
  2. Test:
curl -H "X-Remote-User: alice" -H "X-Remote-Groups: admins" \
  https://example.com/protected-page

What stays the same

After upgrading, these all work identically:

What changes