#25029: When external authentication via REMOTE_USER is only configured on
/admin/login/, the authentication does not persist
-------------------------------+--------------------------------------
     Reporter:  adelton        |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  contrib.auth   |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by adelton):

 Replying to [comment:2 carljm]:
 > Is there any compelling benefit to having this in core Django rather
 than an external library?

 The benefit is increased number of deployments of **existing**
 applications that can be done by changing one line in MIDDLEWARE_CLASSES
 in settings.py. In many cases the person deploying that application which
 needs to consume external authentication is not a programmer and dealing
 with extra code is a blocker. Having the option come directly with Django
 seems more straightforward. From maintenance point of view, the class
 touches some internals of Django that it seems best to have it with the
 rest of the `RemoteUserMiddleware` code so that should the internals
 change, people are not faced with the task of getting correct version of
 the external library.

 Normally I'd say that `RemoteUserMiddleware` should not even insist on
 seeing the REMOTE_USER filled upon every request but I guess changing the
 current behaviour might be disruptive, that's why I'm proposing a way for
 admin to be explicit with their choice of behaviour.

 The traditional model of REMOTE_USER being produced primarily by setups
 with HTTP Basic Auth which keeps sending the credentials with every
 request and thus the username available with every request is no longer
 there as virtually noone uses Basic Authentication, while external
 authentication in frontend HTTP server can bring benefits especially in
 large organizations when the Apache modules are used for cross-realm
 authentication or identity federation. The typical use-case is then to
 override or extend one (logon) URL. We have a writeup about the approach
 at http://www.freeipa.org/page/Web_App_Authentication.

 Another benefit for Django as a project is that it would make it much
 easier to use Django in demos of external authentications, be it Kerberos,
 SAML, or other.

 > I'm not convinced the need is frequent enough to have it in core Django.
 (Even `RemoteUserMiddleware` itself is on the edge, IMO).

 It's not in core Django, it's in `django/contrib/auth`. I thought the
 contrib in the name makes it a good place to live, especially for
 "integration" code like this.

 You might not see many `RemoteUserMiddleware` deployments exactly for the
 reason that with other authentication mechanisms than Basic Auth, it's
 currently not particularly useful.

--
Ticket URL: <https://code.djangoproject.com/ticket/25029#comment:3>
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/065.1d5d8a27967e2a29dd3c3141d822f812%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to