• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Queries on handling Sessions without login

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a web application that shows an "Unlock user" link in the login page whenever users gets locked from entering consecutive wrong passwords. When user clicks that link, here is what happens


Step1: User email is asked
Step 2: if valid user email, system shows next screen
Step 3: Next screen is where other user security questions is asked (e.g. when is your birthday? what is the name of your pet? etc)
Step 4: If this is valid, system displays a next screen where account number is asked.
Step 5: User enters account no.
Step 6: System receives acct number then connects to a third party system to verify if it is valid

What if the third party system for account is down? and user gets stuck in Step 6. Would this invalidate the session? because the flag that says user email and privacy questions are answered correctly are stored in session.

I mean if user keeps on repeating step 6 for an hour, would the session still stay? when would it be invalidated?




Mods: i just realized that maybe this topic is more fit to be in the servlet forum. apologies. let me know if this will be transferred


 
Saloon Keeper
Posts: 13889
314
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I moved your topic.

I think some of these are bad steps. For instance, showing a certain screen only if the user e-mail is valid is actually a big privacy concern. Your system should never betray the existence of a user account to potentially malicious parties. If you want to 'lock users', you should also do so for e-mail addresses that haven't been registered by your application. This means that you have to keep track of e-mail addresses that aren't linked to an account, giving attackers an opportunity to flood your database with locked addresses.

Security questions are bad. Drop them.

If the third party system is down, your password reset option is obviously down as well. That's the inherent drawback of using third party authentication. Use it or don't.

I'm not really sure how any of this relates to the session though. What are you saving to or retrieving from the session before the user logs in? If it's something like a shopping cart, then the session should stay valid as long as the user is actively using it. This includes attempting to log in.
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic