Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salt option for passwords #29

Closed
Xqua opened this issue Apr 4, 2017 · 1 comment
Closed

Salt option for passwords #29

Xqua opened this issue Apr 4, 2017 · 1 comment

Comments

@Xqua
Copy link

Xqua commented Apr 4, 2017

I can't seem to find any option to add salt on password hash for MD5 SHA512 or other hash (except Crypt)

Am I missing something ?

@nitmir
Copy link
Owner

nitmir commented Aug 29, 2017

There is none.
Direct hash are just here to give some authentication class examples.
You should write you own authentication class implementing https://github.com/nitmir/django-cas-server/blob/master/cas_server/auth.py#L37

You can always subclass SqlAuthUser or LdapAuthUser (I do not known which one you are using) and just change the test_password method to suit your case.

I do not intend to add salt options for plain hash algorithms as some people may hash differently (with the salt before or after for exemple) with the salt stored differently (in another field, on the first bytes of the password hash, with a separator in the password hash, ...). Contrary to the the crypt format which is well documented.

@nitmir nitmir closed this as completed Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants