Hi, I was able to return a SOAP fault to the client by explicitly specifying a fault sequence (was under the impression if a fault sequence is not specified it would go through the default fault sequence on an error condition) containing a makeFault mediator for the proxy in order to return the client the proper error. Otherwise it silently drops the message. Thanks Asela for the off-line tip.
Regards Buddhika On Sun, Jun 17, 2012 at 11:10 AM, Andun Gunawardena <[email protected]> wrote: > +1 For Buddhika. > > I am also notified that, because these days I am trying to build a Tomcat > Valve to do the same task one by Entitlement Mediator. So I did also play > with the the existing one. So notice that client only show a Exception when > authorization is false. > > Exception in thread "main" org.apache.axis2.AxisFault: The input stream > for an incoming message is null. > > Also ESB console only show some info if authorization is false only when > debug log is enabled. It shows this, > > [2012-06-17 09:33:35,098] DEBUG - EntitlementCallbackHandler Service name > http://localhost:8280/services/echo > [2012-06-17 09:33:36,098] DEBUG - EntitlementMediator User not authorized > to perform the action :Deny > > So I think Buddhika's suggestion is good to make the scenario good. > Because the message "The input stream for an incoming message is null." can > miss lead the person who use it. > > Thanks > AndunSLG > > On Sun, Jun 17, 2012 at 8:45 AM, Suresh Attanayaka <[email protected]>wrote: > >> Hi Chamith, >> >> Sorry for the mistake. I was trying a Oauth-XACML scenario so was >> mistaken. No, it did not went through the fault sequence. >> >> Thanks, >> Suresh >> >> >> On Sun, Jun 17, 2012 at 7:02 AM, Buddhika Chamith <[email protected]>wrote: >> >>> Hi Suresh, >>> >>> Well it's the entitlement mediator I tried out. I think you have tried >>> out the OAuth mediator. Anyway I am getting following log at IS. >>> >>> [2012-06-17 08:31:45,595] INFO >>> {org.wso2.carbon.identity.entitlement.policy.PolicyCollection} - Matching >>> XACML policy found urn:sample:xacml:2.0:samplepolicy >>> [2012-06-17 08:31:45,599] INFO >>> {org.wso2.carbon.identity.entitlement.pip.CarbonAttributeFinder} - No >>> attribute designators defined for the attribute group >>> >>> Did the flow went through the fault sequence when the OAuth >>> authorization failed? >>> >>> Thanks and Regards >>> Buddhika >>> >>> >>> On Sun, Jun 17, 2012 at 4:11 AM, Suresh Attanayaka <[email protected]>wrote: >>> >>>> Hi Chamith, >>>> >>>> I do get an error log for failed authorizations at the ESB console. >>>> Given bellow is the exception I could generate. >>>> >>>> [2012-06-17 02:25:53,044] ERROR - OAuthMediator Error occured while >>>> validating oauth consumer >>>> org.apache.synapse.SynapseException: OAuth authentication failed >>>> at >>>> org.wso2.carbon.identity.oauth.mediator.OAuthMediator.mediate(OAuthMediator.java:120) >>>> at >>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) >>>> at >>>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114) >>>> at >>>> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:154) >>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) >>>> at >>>> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144) >>>> at >>>> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139) >>>> at >>>> org.apache.synapse.transport.nhttp.util.RESTUtil.processGetAndDeleteRequest(RESTUtil.java:139) >>>> at >>>> org.apache.synapse.transport.nhttp.DefaultHttpGetProcessor.processGetAndDelete(DefaultHttpGetProcessor.java:464) >>>> at >>>> org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor.process(NHttpGetProcessor.java:296) >>>> at >>>> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:258) >>>> at >>>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173) >>>> at >>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>>> at >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>>> at java.lang.Thread.run(Thread.java:662) >>>> >>>> Do you get any error logs in the IS console ? what is the scenario you >>>> tried ? >>>> >>>> Thanks, >>>> Suresh >>>> >>>> On Sun, Jun 17, 2012 at 1:35 AM, Buddhika Chamith >>>> <[email protected]>wrote: >>>> >>>>> Hi, >>>>> >>>>> I didn't see any log or exception at ESB when I tried the xacml >>>>> sample with a failed authorization. I was under the impression the flow >>>>> would go through the fault sequence once authorization failed. May I know >>>>> the intended behavior once this happens specially as seen by the client? >>>>> (I >>>>> am simply getting an org.apache.axis2.AxisFault: The input stream for an >>>>> incoming message is null at my sample client. Shouldn't the error be more >>>>> specific for a failed authorization?). >>>>> >>>>> Regards >>>>> Buddhika >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Suresh Attanayake >>>> Software Engineer; WSO2 Inc. http://wso2.com/ >>>> Blog : http://sureshatt.blogspot.com/ >>>> Twitter : https://twitter.com/sureshatt >>>> LinkedIn : http://lk.linkedin.com/in/sureshatt >>>> Mobile : +94755012060,+94770419136,+94710467976 >>>> >>>> >>> >> >> >> -- >> Suresh Attanayake >> Software Engineer; WSO2 Inc. http://wso2.com/ >> Blog : http://sureshatt.blogspot.com/ >> Twitter : https://twitter.com/sureshatt >> LinkedIn : http://lk.linkedin.com/in/sureshatt >> Mobile : +94755012060,+94770419136,+94710467976 >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
