Results 1 to 2 of 2

Thread: Using Run-As replacement

  1. #1
    Join Date
    Aug 2004
    Posts
    1,070

    Default Using Run-As replacement

    Hopefully someone can help me out with Run-As managers.

    I completely understand the mechanics of the RunAsManagerImpl, but I'm struggling with seeing a real-world application of it. The use of RunAsManagerImpl in the contacts example is good, but seems a bit too simple (the comments even state that it isn't necessary for that example).

    The sticky point for me in the contacts app is that it seems odd to me that you'd put a facade in front of a backend bean when both reside in the same application (even defined in the same context).

    Can someone describe a real-world scenario in which RunAsManagerImpl would be useful? (I don't need specifics, just a high-level picture of what circumstances would benefit from using RunAsManagerImpl).

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

    Default

    Run-as replacement has limited value in a single webapp. It can help reduce programming errors in unusual situations where service layer beans call authorised methods of other service layer beans and you don't want to define the same roles against those other service layer beans. I agree this is fairly unusual.

    RunAsManager is of most value when coupled with remoting. If you were calling a remote web service, you could get the remoting class to look at the current ContextHolder to obtain the Authentication to use, with that Authentication having been run-as replaced. As such a static username/password could be run-as replaced and used to call the web service. Acegi Security currently doesn't have a class which does this, although the hooks are certainly there.

Similar Threads

  1. Replacement for find in hibernate3
    By sonalnd in forum Data
    Replies: 6
    Last Post: Nov 17th, 2005, 03:46 AM
  2. Replacement of CactusStrutsTestCase in SPRING
    By rahul_maggu in forum Web
    Replies: 2
    Last Post: Jul 7th, 2005, 05:06 AM

Posting Permissions

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