#26623: Customizing environment variable for for RemoteUserMiddleware requires
subclass
------------------------------+--------------------
Reporter: adelton | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/26623>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.9aa6c1bb27b43961593376721f7c1d14%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.