Just reduce the surface of attach, memory/time and make it more difficult
there is no bullet proof way.
Few notes: ( keep an open mind )
What if a super hacker gets into your memory or session and change the role
to Admin role.
I would not store encrypted passwords in the database, I would Hash and Salt
them ( Pepper is optional )
Is Public shared can be easier to access?
After Authentication store the user id then check the role on every page
access. I have seen that on web sites ( no kidding )
that way no one can change the role.
What if they change the Id? if they know it you have a point. You might
issue a GUID with exportation as a token and not an Id.
Expire the Token every few minutes. and renew the GUID with a new
expiration. Then the super hacker need to find the new GUID etc..
To completely not allow hackers to sniff or detect your session then check
out Quantum Optical Photon Encryption.
Thank You,
SA
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. .
The encrypt function wouldn't contain anything sensitive as such. It
takes a string, MD5 encrypts it, and returns the encrypted string. Are
you saying persistent objects, such as ones initiated at application
start, are a potential security risk? Also, once I authenticate a user,
I store the fact they are authenticated in an object created at session
start - no sesntive information is there, just their role, username and
isLoggedIn = true etc. Is this wrong to do? If so, what would be a
secure way of maintaining the knowledge a user has successfully logged
in?
paul