cookies - How should I manage username/password session information? -


I have a website (in which the original essence is described), and I have no way of storing a user name And some information about the user continually when they use the site (i.e., upload and download data).

Right now, given a successful login, I was returning the hash with password as well as any associated information. At any time the user tries the user, his user name, hash, and what should be in the database next to it. If the user logs out, then all information is flushed in their local Sinatra session.

I know that this is a very simple approach. Is there a better way to handle user session information? Wikipedia entry on cookies mentions that a session uid is used instead of this other information; What is the advantage of that approach? I suspect that this approach is too weak for other attacks, but since I have done everything I verify, I am not sure which attacks I am opening.

In addition, if / when I apply SSL, are these transactions 'encrypted automatically', or I will need to do something else to ensure that the wire Are they safe if they are needed?

This is really a very complex problem, just to describe, you have an account lock-out The problem is: If you stop based on unsuccessful attempts, how easy is it for an attacker to dos your website?

I started some best practices:

  1. The username and user id have the password Snuff and hazard Store (you should also store salt next to hash.)

  2. Reject frequently bad-password attempts (once every few seconds More than times)

  3. If any user or any IP address (more than 3x in a minute) attempts are unsuccessful , Then some human-validation is required , like Captcha, it allows you to stop total dos attacks

  4. If an auto If the logging system is implementing, then use token authentication system

  5. For the token authentication system, a secure random number generator Use plain senders to send users, but salt and housed tokens Send.

  6. Use TLS / SLL if possible , but after data is closed, do not rely on your security.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -