Results 1 to 6 of 6

Thread: about resources

  1. #1
    Join Date
    Dec 2006
    Posts
    4

    Question about resources

    As far as my knowledge, we are specifying resources to be secured in config. files (e.g applicationContext.xml) . Is there any way to sepcify resource to secured at runtime , I mean without editing config file. Please correct me if I am thinking wrong.

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    What do you mean by specifying resources at runtime? You want to change the security settings?

    You don't have to specify security in the applicationContext, you can use the @Secured annotation.

  3. #3
    Join Date
    Dec 2006
    Posts
    4

    Default

    Thanks for quick reply.
    I just gone thro Reference Guide and I got your point. Please may I know if we can sepcify the resources(which can be URL or method call) to be secured somewhere else instead of specifying it in class(in case of method ) or in config file(in case of URL) like in database as we can specify user role mapping in database. I am very new to ACEGI and Spring concepts. Please correct me if I am thinking in wrong direction.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    In theorie you could, although you would have to provide your own implementation of the needed classes. You could implement a database version of the FilterInvocationDefinitionSource.

    I can see a added value for securing/configuring URL's this way, I wonder about configuring method based security this way.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Marten beat me to it . I think there was a thread on here a while ago about this. If I remember rightly some code was posted that did exactly that. It was pretty simple though so you could do it yourself. All your doing is populating said class with the security instructions from DB instead of file.

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    Quote Originally Posted by karldmoore View Post
    Marten beat me to it
    I'll buy you drink at the next Spring conference we both attend .

    I did some searching and found this thread however they did not post a solution, but you might be able to contact them and request for their solution.

    This thread has some sample code, although it contains errors (as mentioned in the thread) it should provide you with a way to go.
    Last edited by Marten Deinum; Jan 3rd, 2007 at 06:03 AM.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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