#28017: Add option to specify a different secret to PasswordResetTokenGenerator
----------------------------------------+------------------------
               Reporter:  jannh         |          Owner:  nobody
                   Type:  New feature   |         Status:  new
              Component:  contrib.auth  |        Version:  master
               Severity:  Normal        |       Keywords:
           Triage Stage:  Unreviewed    |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 In the PasswordResetTokenGenerator class, it is very difficult to use a
 secret different from settings.SECRET_KEY. In Django however, it would be
 very easy to add an attribute "secret" to the class, which defaults to
 settings.SECRET_KEY and is handed to "salted_hmac" in the method
 "_make_token_with_timestamp".

 Currently, one would have to overwrite the _make_token_with_timestamp
 method, which is not documented and likely to change, or one could misuse
 modify_settings or override_settings in production.

 Our usecase is, that we have a site for our employees and a self-service-
 site for customers deployed on different servers and with different
 SECRET_KEYs. Both sites should be able to generate Reset-Links for the
 self-service site.

--
Ticket URL: <https://code.djangoproject.com/ticket/28017>
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/048.e430c18616523b5f13174d57709e93ef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to