The reason that SECRET_KEY is not used is that SECRET_KEY is used for
other applications which might require key cycling - typically for short
lived data where key cycling isn't going to cause too much of a problem.
So if it was used as a salt for passwords, you would lose the ability to
check passwords when you cycled the key.
That consideration doesn't stop you from using another value as a salt,
of course.
If you are trying to get authentication to match an existing system, it
seems like a better approach would be to write a custom Django
authentication backend, rather than the other way around, especially if
you don't want to lose the security features of what you have already:
https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#writing-an-authentication-backend
I guess I need to decide which way to go. Either a custom password hasher that uses a static salt, or use Django's existing password hasher and not think about it.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.
2) Should Django's security be improved by an additional salt that isn't
stored in the database?
Regarding number 2, this is not likely to happen quickly, due to
backwards compatibility issues, and the need to introduce a new setting
etc. (That may help you to decide question 1).
It's definitely worth considering, of course. We would have to consider
whether it is worth the work. For many installations, if an attacker has
the database they are very likely to have the source code too. Of
course, we should try to layer security so that it isn't all or nothing.
But given the difficulties of changing things, we'd have to consider
whether the increase in security, in a typical setup, would justify the
change.