I have Axis2 web services running in an Application Server (like JBoss, WebSphere and Weblogic) and till now I am passing the user details within a request and authenticating the user before processing it.
The next step is that I want to delegate the authentication bit to the Java EE Application Server and once authenticated the application server should pass the UserPrinciple which I will be using as context to execute the request.
I am not sure if I have asked the question correctly? I think I am mixing the WebContainer authentication with WS-Security stuff.
Can anyone please point me to the right direction with some documentation which I can refer as start-up guide.
OK, I have tried a solution and it worked to some extent. Here are details;
Created TestService with following services.xml
Implemented PWHandlerServer.java
Implemented TestRequestContext
Now I should be able to access my TestRequestContext.getUserPricipal() in my web service class and pass it on DB for transaction and switching a security context. The only problem is when I am trying to access the service via SoapUI its giving me following exception;
Within SoapUI, I am simply using ‘Auth’ tab to set username and password and invoke? do I need to setup anything else before invocation.
Also, the approach to use ThreadLocal is correct or I can access the principle some otherway as well?
Thanks.