I am developing an Asp.NET site for a customer, and want to make sure I am using a secure authentication scheme.
In my user table, I have an authentication hash column that is calculated as sha1(salt + username + password)
. The site is being served via HTTPS. To log in, the user submits their name and password via HTTPS. The web server calculates the hash, and compares it to the database stored value to authenticate.
Does this sound reasonably secure? I ran this scheme past a friend of mine, and he said it was vulnerable to nefarious sys-admins. He said I should do the following:
- Server specifies a unique salt every time the login page is served.
- Hash the password the unique salt on the client via javascript before submission.
- Send this hash to authenticate, but not the password.
- Do some fancy crap that I don't understand to authenticate the hash.
What should I do?