We are building an application that will consist of a rich Java client (Java WebStart) that calls web services (Apache Axis) implementing the bulk of the business logic. We are investigating ACEGI Security as one possible framework upon which to base our web services security.
The documentation seems to suggest using HTTP authentication (i.e. user and password passed in HTTP headers), but we wish to be compliant with WS-Security which passes user names and passwords in SOAP headers rather than HTTP headers. Also, there appears to be some reliance on an HTTP session. Our web services are stateless and we do not currently use HTTP sessions (which are per web service anyway in Axis), but we would like to avoid reauthenticating the user every time a web service is called if at all possible. We initially planned to do our own session management (of a sort) by generating a token when the user initially authenticates via some authenticate() web service and caching that token along with the username for comparison on subsequent web service calls. We also had plans to put some expiration period on the token to force reauthentication after some period of time (or possibly inactivity). But this was all prior to considering ACEGI and I'm now trying to evaluate what needs to change.
I have the following questions for starters.
1) How do I get the authentication token into the secure context? It looks like I can't use any of the provided implementations. Do we need to write our own SOAPProcessingFilter to extract the username and password from the SOAP header and set the Authentication token in the context?
2) How do I prevent the need to reauthenticate every time? Can I still use a sort of application provided session by rewriting my own filter that does something similar to what HttpSessionContextIntegrationFilter does (i.e. copy the context to and from the context holder at the start and end of each request)?
Assuming I'm on the right track on both of these, has anyone else done this already? Is any work under way or has any consideration been given to supporting sessionless web services and/or ws-security more directly in a later release? If I do need to 'roll my own', any idea how big the job might be? Thanks in advance.


