Environment variable authentication - munkireport/munkireport-php GitHub Wiki
Authenticate a user from an environment variable set by the web server (does not apply to the development server). Typical use cases:
- Authentication via trusted reverse proxy header (e.g. Tailscale Identity Headers)
- Forward authentication (e.g. nginx Subrequest Authentication)
Configuration
- In
.env, set:
Or addAUTH_METHODS="ENV"ENVto an existing authentication method (likeLOCAL) to try environment variable authentication, then fall back. - Configure the
ENVauth method:# Defaults: # Which environment variable to get the trusted username from AUTH_ENV_USER_VAR="REMOTE_USER" # Whether an empty or missing environment variable results in login failure AUTH_ENV_DENY_EMPTY=FALSE - Configure the web server to set the
REMOTE_USERvariable based on some trusted authentication mechanism (see above).