Results 1 to 3 of 3

Thread: SecurityContext accross clustered environment

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Default SecurityContext accross clustered environment

    I've been studying the examples carefully but I have a hard time grasping about possible implementation and authentication storage accross multiple node. How would I go about doing that? Let the appserver replicate the HttpSession with the SecureContext in it or the Authentication object itself.

    In other words what would be the best way to distribute my Authentication object that is in the locally bound SecureContext?

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

    Default

    SecureContext is an interface that can be stored in a ContextHolder, with the latter being a ThreadLocal-bound object holder.

    You wouldn't replicate the SecureContext. Instead, you'd replicate the HttpSession. The HttpSessionIntegrationFilter is responsible for setting up the ContextHolder with an appropriate SecureContext (populated with an Authentication from the HttpSession) at the start of each request, and removing the ContextHolder object at the end of each request.

    So, it's pretty simply. Just use the net.sf.acegisecurity.ui packages "as-is" and the HttpSession should replicate just fine without special handling. You might want to think about caching, though. Ensure you're using it and if you write something that evicts objects from the cache, consider a cluster-aware cache like SwarmCache.

  3. #3
    Join Date
    Aug 2004
    Posts
    2

    Default

    Thanks, for the insight, it makes sense both distribution as well as replicating the Authentication.

Similar Threads

  1. Replies: 11
    Last Post: Jun 1st, 2006, 04:30 PM
  2. Notification component in a clustered environment
    By spring04 in forum Architecture
    Replies: 5
    Last Post: Oct 13th, 2005, 02:51 AM
  3. ApplicationContext in a clustered environment
    By Shpongle in forum Architecture
    Replies: 2
    Last Post: Sep 25th, 2005, 03:08 AM
  4. spring in a clustered environment
    By kshacks in forum Container
    Replies: 1
    Last Post: Sep 29th, 2004, 07:50 PM
  5. Spring in clustered environment
    By dwojtas in forum Container
    Replies: 2
    Last Post: Aug 15th, 2004, 12:41 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
  •