• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Authentication attempts and the session...

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm playing with a servlet that is "protected" behind a BASIC authentication response.
The number of attempts are next to limitless, unless I set up an "attempts counter." Making it a private field is not an option as it crosses users, sessions, etc.
Putting the counter on the session seems the way to go. Anybody consider this a bad practice, best practice? And is the overhead of getting and setting the object on the session high?
TIA,
Tim
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
disclaimer: I'm thinking out loud.

The 'thing' that does the authentication is the Tomcat container. So you'd need to keep track of login attempts through BASIC auth through there, right?

Also.. is there such a thing as a Session before a user logs in? I know there is jsessionid when browsers don't have cookies. But BASIC auth happens (or should?) before this point. Or does it?

More questions.. no answers.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic