Thanks Asela. I have checked, it is OK now. But still need the fix for Entitlement Stub for continue the work.
On Tue, Jul 31, 2012 at 12:13 PM, Asela Pathberiya <as...@wso2.com> wrote: > > > On Tue, Jul 31, 2012 at 9:57 AM, Andun Gunawardena <an...@wso2.com> wrote: > >> Hi all, >> >> I have corrected the ESB mediator issue. Attached the patches to >> https://wso2.org/jira/browse/CARBON-13752 >> > > Thanks for providing a patch. I did some modifications and applied. > > Thanks, > Asela. > > >> >> Thanks >> AndunSLG >> >> >> On Tue, Jul 31, 2012 at 9:01 AM, Andun Gunawardena <an...@wso2.com>wrote: >> >>> Hi All, >>> >>> I think I have found the problem here,the exception which is given below >>> is thrown by org.wso2.carbon.core.services.authentication. >>> AuthenticationUtil class's public static void >>> validateRemoteAddress(String address) method. >>> >>> Authentication Failed : Invalid remote address passed - >>> https://10.200.3.118: >>> ${carbon.management.port}${carbon.context}/services/ >>> >>> I have debugged the code and found that ESB is sending something like >>> this "https://${carbon.local.ip}:${carbon.management.port}${carbo >>> n.context}/services/" as the argument for this method. So >>> our first thought was this argument should be corrected like this " >>> https://localhost:9444/service". But even if I pass this as the >>> argument the method gives exceptions. >>> So I checked with Asela and this argument should be a IP address. Not >>> something like this. So have to correct the mediator in ESB. So I will look >>> in to that. >>> >>> Thanks >>> AndunSLG >>> >>> On Mon, Jul 30, 2012 at 10:29 PM, Dushan Abeyruwan <dus...@wso2.com>wrote: >>> >>>> Hi >>>> I think security guys should answer this, because I see a >>>> significant changers in the entitlement mediator compare to 4.0.3 >>>> >>>> 403 >>>> configContext = cfgCtx; >>>> * serverUrl = getServerURL(serverUrl, >>>> msgContext.getConfigurationContext());* >>>> client = new EntitlementServiceClient(remoteServiceUrl, >>>> configContext, >>>> remoteServiceUserName, remoteServicePassword, >>>> serverUrl); >>>> decision = client.getDecision(userName, resourceName, >>>> action, env); >>>> >>>> 450 >>>> * decision = client.getDecision(userName, resourceName, action, >>>> env);* >>>> >>>> entitlementDecision = new >>>> EntitlementDecision(); >>>> >>>> entitlementDecision.setCachedTime(Calendar.getInstance().getTimeInMillis()); >>>> entitlementDecision.setResponse(decision); >>>> simpleDecisionCache.put(key, >>>> entitlementDecision); >>>> >>>> and *getServerURL is depreciated method in 450* >>>> >>>> private static String getServerURL(String url, ConfigurationContext >>>> config) { >>>> if (url.indexOf("${carbon.https.port}") != -1) { >>>> String httpsPort = CarbonUtils.getTransportPort(config, >>>> "https") + ""; >>>> url = url.replace("${carbon.https.port}", httpsPort); >>>> } >>>> >>>> if (url.indexOf("${carbon.management.port}") != -1) { >>>> String httpsPort = CarbonUtils.getTransportPort(config, >>>> "https") + ""; >>>> url = url.replace("${carbon.management.port}", httpsPort); >>>> } >>>> >>>> if (url.indexOf("${carbon.context}") != -1) { >>>> // We need not to worry about context here - just need the >>>> server url for logging >>>> url = url.replace("${carbon.context}", ""); >>>> } >>>> return url; >>>> } >>>> >>>> >>>> >>>> cheers >>>> Dushan >>>> >>>> >>>> On Mon, Jul 30, 2012 at 9:30 PM, Afkham Azeez <az...@wso2.com> wrote: >>>> >>>>> This means due to some reason the other two System properties are not >>>>> set. Need to find out why those are not set. >>>>> >>>>> >>>>> On Mon, Jul 30, 2012 at 6:20 PM, Andun Gunawardena <an...@wso2.com>wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I have debugged the org.wso2.carbon.core.util.Utils class's >>>>>> method public static String replaceSystemProperty(String text) and notice >>>>>> that the the argument is passed as >>>>>> "https://${carbon.local.ip}:${carbon.management.port}${carbon.context}/services/" >>>>>> and comes out as >>>>>> "https://10.200.3.177:${carbon.management.port}${carbon.context}/services/". >>>>>> Is there a error ? Why the IP address is only replaced while others are >>>>>> remain same. >>>>>> >>>>>> Thanks >>>>>> AndunSLG >>>>>> >>>>>> >>>>>> On Mon, Jul 30, 2012 at 6:11 PM, Dushan Abeyruwan <dus...@wso2.com>wrote: >>>>>> >>>>>>> Hi >>>>>>> IMO Seems like its a bug with at ServerConfiguration it gives >>>>>>> https://10.200.3.118:${carbon.management.port}${carbon.context}/services/ >>>>>>> , If I remember correctly we did some fix to mediation-initializer >>>>>>> some time back, >>>>>>> >>>>>>> >>>>>>> [Carbon-dev] ESB stratup failure java.net.MalformedURLException: For >>>>>>> input string: "${carbon.management.port}${carbon.context}" >>>>>>> carbon_dev >>>>>>> x >>>>>>> Rajika Kumarasiri >>>>>>> via<http://support.google.com/mail/bin/answer.py?hl=en&ctx=mail&answer=1311182> >>>>>>> wso2.org >>>>>>> Feb 23 >>>>>>> to carbon-dev >>>>>>> [2012-02-23 15:54:11,995] ERROR - ServiceBusInitializer Error >>>>>>> while parsing the server URL https://10.200.3.196: >>>>>>> ${carbon.management.port}${carbon.context}/services/ >>>>>>> java.net.MalformedURLException: For input string: >>>>>>> "${carbon.management.port}${carbon.context}" >>>>>>> at java.net.URL.<init>(URL.java:601) >>>>>>> at java.net.URL.<init>(URL.java:464) >>>>>>> at java.net.URL.<init>(URL.java:413) >>>>>>> at org.wso2.carbon.mediation.initializer >>>>>>> .ServiceBusInitializer.setHttpsProtForConsole(ServiceBusInitializer.java:323) >>>>>>> at org.wso2.carbon.mediation.initializer.Servic >>>>>>> >>>>>>> Would this be related to the same ? >>>>>>> >>>>>>> >>>>>>> cheers >>>>>>> Dushan >>>>>>> >>>>>>> On Mon, Jul 30, 2012 at 6:02 PM, Andun Gunawardena >>>>>>> <an...@wso2.com>wrote: >>>>>>> >>>>>>>> Hi All, >>>>>>>> >>>>>>>> I am trying to do Test Automation for the Entitlement Mediator. I >>>>>>>> have configured the ESB, IS as given in >>>>>>>> [1]<http://wso2.org/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform>. >>>>>>>> When the request is come to the created Entitlement Proxy At the ESB, >>>>>>>> there >>>>>>>> is unexpected error shown in the console of IS. It is given below. It >>>>>>>> related to the ServerURL system property of Carbon. What will be the >>>>>>>> solution ? >>>>>>>> >>>>>>>> Thanks >>>>>>>> AndunSLG >>>>>>>> >>>>>>>> [1] - >>>>>>>> http://wso2.org/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform >>>>>>>> >>>>>>>> Exception Sequence : >>>>>>>> >>>>>>>> [2012-07-30 17:51:06,187] WARN >>>>>>>> {org.wso2.carbon.core.services.authentication.AuthenticationUtil} - >>>>>>>> Could >>>>>>>> not find IP address for domain name : https://10.200.3.118: >>>>>>>> ${carbon.management.port}${carbon.context}/services/ >>>>>>>> [2012-07-30 17:51:06,188] ERROR >>>>>>>> {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - >>>>>>>> Authentication >>>>>>>> Failed : Invalid remote address passed - https://10.200.3.118: >>>>>>>> ${carbon.management.port}${carbon.context}/services/ >>>>>>>> org.wso2.carbon.core.common.AuthenticationException: Authentication >>>>>>>> Failed : Invalid remote address passed - https://10.200.3.118: >>>>>>>> ${carbon.management.port}${carbon.context}/services/ >>>>>>>> at >>>>>>>> org.wso2.carbon.core.services.authentication.AuthenticationUtil.validateRemoteAddress(AuthenticationUtil.java:178) >>>>>>>> at >>>>>>>> org.wso2.carbon.core.services.authentication.AuthenticationAdmin.login(AuthenticationAdmin.java:86) >>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>> at >>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>>>>>> at >>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>>>>> at >>>>>>>> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212) >>>>>>>> at >>>>>>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117) >>>>>>>> at >>>>>>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) >>>>>>>> at >>>>>>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) >>>>>>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) >>>>>>>> at >>>>>>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) >>>>>>>> at >>>>>>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) >>>>>>>> at >>>>>>>> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:205) >>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) >>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >>>>>>>> at >>>>>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) >>>>>>>> at >>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) >>>>>>>> at >>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67) >>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:58) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) >>>>>>>> at >>>>>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) >>>>>>>> at >>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:133) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) >>>>>>>> at >>>>>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:49) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >>>>>>>> at >>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >>>>>>>> at >>>>>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001) >>>>>>>> at >>>>>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) >>>>>>>> at >>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) >>>>>>>> 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) >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Dev mailing list >>>>>>>> Dev@wso2.org >>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Dushan Abeyruwan >>>>>>> *Senior Software Engineer* >>>>>>> *Integration Technologies Team* >>>>>>> *WSO2 Inc. http://wso2.com/* >>>>>>> *Mobile:(+94)714408632* >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Dev mailing list >>>>>> Dev@wso2.org >>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Afkham Azeez* >>>>> Director of Architecture; WSO2, Inc.; http://wso2.com >>>>> Member; Apache Software Foundation; http://www.apache.org/ >>>>> * <http://www.apache.org/>** >>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 >>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>>>> twitter: >>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>>>> * >>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>>>> * >>>>> * >>>>> *Lean . Enterprise . Middleware* >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> Dev@wso2.org >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Dushan Abeyruwan >>>> *Senior Software Engineer* >>>> *Integration Technologies Team* >>>> *WSO2 Inc. http://wso2.com/* >>>> *Mobile:(+94)714408632* >>>> >>>> >>> >> >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev