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:

Configuration

  1. In .env, set:
    AUTH_METHODS="ENV"
    
    Or add ENV to an existing authentication method (like LOCAL) to try environment variable authentication, then fall back.
  2. Configure the ENV auth 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
    
  3. Configure the web server to set the REMOTE_USER variable based on some trusted authentication mechanism (see above).