Results 1 to 3 of 3

Thread: A couple of requests

  1. #1
    Join Date
    Sep 2004
    Posts
    23

    Default A couple of requests

    Hello, I'm completing the integration of acegi into an existing application, and I was wondering what is the best way to propagate custom information with the SecureContext into the current thread. What I've done is subclass the context with a custom class and use that class into HttpSessionContextIntegrationFilter: I then complete it with custom data after validation and upon further use in the application. A couple of questions/requests:
    1) would it be possible to make the http session attribute key for the secure context configurable? Currently the value is fixed to ACEGI_SECURITY_CONTEXT
    2) currently the secure context instance is created into the HttpSessionContextIntegrationFilter.generateNewCon text: this is public and as such it is easily subclassable. What I'd like to do instead is extract a ioc-configured prototype from spring context using a lookup-method. The problem is that acegi's jar are signed, and this seem to be incompatible with the use of aop-features based on subclassing such as this one: the app explodes with the error "signer information does not match signer information of other classes in the same package". Does this mean I can't use this unless I build acegi by myself and produce non-signed jars?

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

    Default

    I have no problem with making the attribute name configurable. Although I'm not sure how often it would be customised...

    The signed JAR issue is more difficult and I can't offer any suggestions on that front short of re-jaring. Alternatively, we could easily make the generateNewContext() method as part of an interface such that custom implementations could be offered.

    Please note current CVS has extensively refactored the context handling approach. You might like to take a look. If you wish to submit a patch for HttpSessionContextIntegrationFilter, please feel free.

  3. #3
    Join Date
    Sep 2004
    Posts
    23

    Default

    Quote Originally Posted by Ben Alex
    I have no problem with making the attribute name configurable. Although I'm not sure how often it would be customised...
    Well, this is simply because we have legacy struts bean tags that extract "our" custom secure context bean from the session (i.e.: the object that performed the same role as securecontext and that has been refactored in order to implement the acegi interface) and use it in order to access a couple of custom properties. I prefer providing my own name than having to use ACEGI_SECURITY_CONTEXT.

    Quote Originally Posted by Ben Alex
    The signed JAR issue is more difficult and I can't offer any suggestions on that front short of re-jaring. Alternatively, we could easily make the generateNewContext() method as part of an interface such that custom implementations could be offered.
    Well, for now I have re-jarred the classes and used the lookup-method approach: I believe that moving that method in an interface is not really needed, since one could subclass and override it: at the end having to subclass and change the name of the class used in the filter is even less work than having to specify another bean and set it as a "contextGenerator" property.

    Quote Originally Posted by Ben Alex
    Please note current CVS has extensively refactored the context handling approach. You might like to take a look. If you wish to submit a patch for HttpSessionContextIntegrationFilter, please feel free.
    Ok, I'll take a look.

Similar Threads

  1. Replies: 4
    Last Post: Jul 30th, 2005, 07:52 PM
  2. Replies: 3
    Last Post: Jul 29th, 2005, 03:06 PM
  3. Replies: 1
    Last Post: Jun 28th, 2005, 08:21 AM
  4. RmiServiceExporter and concurrent requests
    By burakbayramli in forum Remoting
    Replies: 1
    Last Post: Apr 7th, 2005, 12:59 AM
  5. Dispatching requests.
    By infectedrhythms in forum Architecture
    Replies: 5
    Last Post: Dec 21st, 2004, 03:02 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
  •