I have spring web service and a business layer deployed separately on two tomcat
servers. (As explained in the question Spring WS separately deploy web service and bussiness layer).
Business layer is just a servlet container and web service communicate with it spring httpinvoker
.
I use tomcat container based authentication with springs PreAuthenticatedAuthenticationProvider
and J2eePreAuthenticatedProcessingFilter
. Here I does not provide client application with any authentication token. (I mean I am not manually doing any session handling. It is managed only by tomcat)
Now I want to make sure requests to my business layers are from a authenticated client. One thing I found is to pass the Authentication
object which I get from the web service's security context as SecurityContextHolder.getContext().getAuthentication()
as request parameter to the business layer. But there I do not have a way to verify that Authentication
object. So any idea on a way to achieve security in my business layer?