| Help! Most of this discussion I understand. One point
is, it all involves lots of work with browser
cookies stored on the user's computer. My approach so far is to send the user
the character string version of a GUID
(globally unique identifier, supposely
unique in all space and time, on all computers
or some such) in an HTML text box marked
as "hidden" so that it doesn't show on the
screen. Then I use that GUID value as
a key in a key-value store where the value
keeps the short term info I want on the
user and their 'session'. I wrote my
own little key-value store with TCP/IP,
some class instance de/serialization,
and two instances of a .NET collection
class. However, my understanding is that some browsers
are willing to help implement the function
"Remmeber me on this computer" without help of
cookies. How? My guess: For the text boxes on the
login in Web page, in the HTML use names
for the boxes that the browser interprets
as 'user name' and 'password', and then
the browser stores the contents
in its dedicated disk space
by Web page. Right? So, there's a 'security hole' here
if the user is on a computer shared
with other people! Also, my understanding is that
so far on mobile devices, the browsers
do not permit cookies. True? And
if so, do mobile browsers permit
the function of remember me I
described above? Thanks. |
> GUID
GUIDs are really not the best idea, they can be (sort of) predicted - an attacker can guess which GUIDs are in use as session identifiers. Better to use a random string (generated by a cryptographic random number generator)
> without cookies
Browsers can store user's password when they request it. It is a security hole, consciously made by the user for added convenience. Also, only the user who made this decision can fall into this hole - it's his credentials that get stolen.
> mobile devices ... do not permit cookies
they do (although some might not store the cookies for as long as the expiration would require). However, they don't allow the user to store the password (as in the previous paragraph, the remember me function as you call it)
To round it up, it's a good thing you're experimenting with your own key/value store and session implementation, but it's usually better to use tested components in production (especially for the session stuff - it's very easy to get wrong). Anyway, keep experimenting, that's the best way to learn - I just hope somebody reviews your stuff before you shoot yourself in the foot :)