Results 1 to 2 of 2

Thread: repeated authentication of Authentication object

  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Default repeated authentication of Authentication object

    This is my understanding of the SecurityInterceptor mechanics:
    For each request a Authentication object is retrieved from the SecureContext. The Authentication object gets authenticated and the authenticated Authentication object gets placed back in the SecureContext.

    Question: Why is it necessary to (re)authenticate a Authentication object even if it has already been authenticated in a previous request? Specifically are there any security concerns regarding this procedure or could the (re)authentication also be avoided by simply reusing an authenticated Authentication object?

    Thanks for your patience
    Chris

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    From http://www.mail-archive.com/acegisec...msg00498.html:

    By constantly re-authenticating, the Authentication is guaranteed to always represent the latest state of the authentication repository. This is important if an account is disabled (how many times have sys admins got "the call" saying, "the GM is with <insert employee here> and he's asked me to ask you to cancel their computer access right away and call him when it's done"). On a more positive note, it also ensures any changes in GrantedAuthority[]s are reflected immediately. At a performance level there is little cost in doing this due to the inclusion of caching interfaces. I hear someone thinking, "doesn't caching undermine that use case just mentioned?". No, because the caching implementations can provide cache eviction methods - they need not be based on a timeout. The point is it's an implementation option, which would not exist if relying on Authentication.isAuthenticated() alone.

Similar Threads

  1. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  3. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Replies: 8
    Last Post: Dec 7th, 2004, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •