Hi Susinda,
Creating proxy from DevS and Specifying security policy at the proxy
configuration level and deploying it through a CAR works without a problem
for me. Following is my proxy configuration.
<proxy name="StockQuoteProxy"
transports="https http"
startOnLoad="true"
trace="disable">
<target>
<endpoint
name="endpoint_urn_uuid_27ae1680-a557-4590-84e7-a49f181a387a">
<address uri="
http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
<inSequence/>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
</target>
<policy key="sec_policy"/>
<enableSec/>
</proxy>
I have used a local entry to store the security policy.
<localEntry key="sec_policy"
src="file:repository/samples/resources/policy/policy_3.xml"/>
Since you have following as the policy location, I guess you have done
something to make the Proxy configuration/meta files a mess.
<policy key="conf:/repository/axis2/service-groups/Kasun/services/
Kasun/policies/UTOverTransport"/>
Can you please try with a more clean approach as above?
Thanks.
On Wed, May 28, 2014 at 5:45 PM, Susinda Perera <[email protected]> wrote:
> Hi All
>
> I got the following exception[1] when invoking secuered proxy service.
> Steps i followed as follows
>
> 1. Created a proxy service in devS as in [2]
> 2. Invoke it via soapui as described in [3]
>
> But this works when i did all these steps only using ESB management
> console. Therefore it seems like there is a issue in capp deploying and use
> of service-metafiles.
>
> Please have a look.
>
> Thanks
>
>
>
> [1]
> [2014-05-28 17:35:11,114] ERROR - AxisEngine The security token could not
> be authenticated or authorized; nested exception is:
> javax.security.auth.callback.UnsupportedCallbackException: Check failed
> : System error
> org.apache.axis2.AxisFault: The security token could not be authenticated
> or authorized; nested exception is:
> javax.security.auth.callback.UnsupportedCallbackException: Check failed
> : System error
> at
> org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:186)
> at
> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
> at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
> at
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: org.apache.ws.security.WSSecurityException: The security token
> could not be authenticated or authorized; nested exception is:
> javax.security.auth.callback.UnsupportedCallbackException: Check failed
> : System error
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:180)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:61)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:332)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249)
> at org.apache.rampart.RampartEngine.process(RampartEngine.java:214)
> at
> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
> ... 10 more
> Caused by: javax.security.auth.callback.UnsupportedCallbackException:
> Check failed : System error
> at
> org.wso2.carbon.security.util.ServicePasswordCallbackHandler.handle(ServicePasswordCallbackHandler.java:116)
> at
> org.apache.rampart.TokenCallbackHandler.handle(TokenCallbackHandler.java:116)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:168)
> ... 15 more
> [2014-05-28 17:35:11,116] ERROR - ServerWorker Error processing POST
> request for : /services/Dushan.DushanHttpsSoap12Endpoint
> org.apache.axis2.AxisFault: The security token could not be authenticated
> or authorized; nested exception is:
> javax.security.auth.callback.UnsupportedCallbackException: Check failed
> : System error
> at
> org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:186)
> at
> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
> at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
> at
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: org.apache.ws.security.WSSecurityException: The security token
> could not be authenticated or authorized; nested exception is:
> javax.security.auth.callback.UnsupportedCallbackException: Check failed
> : System error
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:180)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:61)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:332)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249)
> at org.apache.rampart.RampartEngine.process(RampartEngine.java:214)
> at
> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
> ... 10 more
> Caused by: javax.security.auth.callback.UnsupportedCallbackException:
> Check failed : System error
> at
> org.wso2.carbon.security.util.ServicePasswordCallbackHandler.handle(ServicePasswordCallbackHandler.java:116)
> at
> org.apache.rampart.TokenCallbackHandler.handle(TokenCallbackHandler.java:116)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:168)
> ... 15 more
>
> [2]
> <proxy xmlns="http://ws.apache.org/ns/synapse" name="Dushan"
> transports="https" startOnLoad="true" trace="disable">
> <target>
> <inSequence>
> <log level="full"/>
> <respond/>
> </inSequence>
> <outSequence/>
> <faultSequence/>
> </target>
> <policy
> key="conf:/repository/axis2/service-groups/Kasun/services/Kasun/policies/UTOverTransport"/>
> <enableSec/>
> </proxy>
>
> Please note that
> key="conf:/repository/axis2/service-groups/Kasun/services/Kasun/policies/UTOverTransport"/
> exists in the system/
>
> [3] -
> http://charithaka.blogspot.com/2010/11/invoking-secure-web-services-using.html
>
>
>
>
>
> --
> *Susinda Perera*
> Software Engineer
> Mobile:(+94)716049075
>
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>
--
*Isuru Udana*
Senior
* Software Engineer*
WSO2 Inc.; http://wso2.com
email: [email protected] cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev