﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26623	Customizing environment variable for RemoteUserMiddleware requires subclass	Jan Pazdziora	nobody	"Currently, when deploying Django project and the environment variable for external authentication is different than the default `REMOTE_USER` like in environment behind HTTP proxy environment where the data comes in HTTP request headers and is seen as `HTTP_REMOTE_USER` or `HTTP_X_REMOTE_USER`, the way to ""configure"" Django is to subclass the `RemoteUserMiddleware` or `PersistentRemoteUserMiddleware`.

Coding the configuration with a class and then enabling it in `settings.py` is a hurdle especially in devops environments.

Since the `RemoteUserMiddleware` already depends on externally set environment variable for operation, here's a proposal to make the environment variable name externally configurable as well, with `DJANGO_REMOTE_USER_VAR`. That way the specifics of the external environment can be configured in the configuration of that external environment, like Apache HTTP Server configuration, without the admins having to work with Python code. I propose update of the `RemoteUserMiddleware` behaviour because that way it can be consumed by subclasses as well."	New feature	closed	contrib.auth	1.9	Normal	wontfix			Unreviewed	1	0	0	0	0	0
