wso2 IS: Oauth hidden by default; gives exceptions when manually "unhidden" - wso2

After installing the Identity Server, I can't follow the tutorial
here
because "OAuth" doesn't appear under main->manage in the admin console. Inspecting carbon.xml shows that it is hidden by default (reasonable explanations are welcome).
Enabling it in carbon.xml makes it appear, but when I register a new application, I get this error:
ERROR {org.apache.catalina.core.ApplicationDispatcher} - Servlet.service() for servlet
bridgeservlet threw exception {org.apache.catalina.core.ApplicationDispatcher}
java.lang.NullPointerException
at org.apache.jsp.application.configure_002dservice_002dprovider_jsp._jspService(org.apache.jsp.application.configure_002dservice_002dprovider_jsp:155)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
...
ERROR {org.apache.tiles.jsp.taglib.RoleSecurityTagSupport} - IO Error executing tag: JSPException
while including path '/application/configure-service-provider.jsp'. ServletException while
including page. {org.apache.tiles.jsp.taglib.RoleSecurityTagSupport}
java.io.IOException: JSPException while including path '/application/configure-service-provider.jsp'. ServletException while including page.
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:465)
....
Anybody else seen this before? I'm using WSO2 Identity Server 5.0.0

That article was written for WSO2 IS 4.6.0 and have not tried in IS 5.0 yet. But you should be able to get it working with IS 5.0 too. The only challenge is IS 5.0 has a little different UI structure than 4.6.0.
For OAuth related configuration in IS 5.0, please go to Service Providers and add a new Service Provider. Then go to Inbound Authentication Configurations > OAuth/OpenID Connect Configuration > Configure
Hope this helps.
Edit: You can find official docs here.

Related

WSO2 IS does not work after upgrade to 5.11.0

I have upgraded wso2 server from wso2 IS 5.10.0 to IS 5.11.0. I understand that there has been change in CORS, I have removed CORS filter from web.xml and added configuration to deployment.toml. I still see below two errors in logs of wso2.
ERROR {org.wso2.carbon.identity.authz.service.handler.AuthorizationHandler} - Error occurred while trying to authorize, Operation is not supported.
ERROR {org.wso2.carbon.identity.cors.valve.CORSValve} - CORS management service error when intercepting an HTTP request. org.wso2.carbon.identity.cors.mgt.core.exception.CORSManagementServiceServerException
Please guide me how to fix this errors

WSO2 Api Manager 3.0 Data Mapper does not work

I have installed wso2 Api Manager 3.0 on my windows by downloading the binaries.
I wonder if the datamapper does work in the v3.0 of the Api Manager.
it does not work in my case.
I am using OOTB sequences, but unfortunately unable to actually save it:
The logs are saying that the XML sequence are not found for the datamapper, regarding the apache-synapse configuration.
Steps to reproduce the issue:
1.)Downlaod AM3.0 Binaries and install in windows machine
2.)Open publisher and create a dummy api and in request mediator select the json_to_xml or any ootb sequences. and click on save button.
SAME FLOW WORK PERFECTLY FINE IN 2.6
Please find the errror log file attached.
Please find the server logs:
org.wso2.carbon.apimgt.api.APIManagementException: Issue is in accessing the Registry[2019-11-18 17:41:43,883] ERROR - APIUtil Issue is in accessing the Registry
[2019-11-18 17:41:43,900] ERROR - APIMappingUtil Error occurred while getting the uuid of the mediation sequence
org.wso2.carbon.apimgt.api.APIManagementException: Issue is in accessing the Registry
at org.wso2.carbon.apimgt.impl.utils.APIUtil.getMediationPolicyAttributes_aroundBody322(APIUtil.java:5438) ~[org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
at org.wso2.carbon.apimgt.impl.utils.APIUtil.getMediationPolicyAttributes(APIUtil.java:5373) ~[org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
at
Caused by: org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException: Resource does not exist at path /_system/governance/apimgt/customsequences\in
at org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.get(MountHandler.java:449) ~[org.wso2.carbon.registry.core_4.5.1.jar:?]
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.get(HandlerManager.java:2446) ~[org.wso2.carbon.registry.core_4.5.1.jar:?]

Exception running the WSO2 Identity Server STS Client

I running the STS Client from sample located in
https://docs.wso2.com/display/IS540/Downloading+a+Sample
I am using 'sts-policy-ut.xml' as my policy (please refer to the code). I get the SAML2 tokens and I can validate too. When when I enable relyingPary flag in the 'client.properties' file, I get the following error :
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to org.w3c.dom.Element
at org.apache.rampart.builder.BindingBuilder.handleSupportingTokens(BindingBuilder.java:392)
at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:499)
at org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:86)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
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:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
at org.wso2.carbon.identity.samples.sts.Client.run(Client.java:239)
at org.wso2.carbon.identity.samples.sts.Client.main(Client.java:95)
Please let me know how to fix it. I just using the recommended Maven way to build the project and running the supplied batch file.
I finally upgraded the Axis 2 library including the Ramapart jars to the following :
i) Axis 2 - 1.7.7
ii) Rampart - 1.7.0
This solved the problem. So this seems to be a bug with Axis 1.6.1 the version which the WSO2 uses for its examples.

WSO2 Integrator 6.1.1 HTTP Session Replication : Non-serializable attribute CarbonAuthenticator

I have 2 WSO2 Enterprise Integrator behind a load balancer.
I want to activate the tomcat http session replication, and followed the WSO2 documentation.
It seems quite simple :
Add
<Cluster className="org.wso2.carbon.core.session.CarbonTomcatSimpleTcpCluster"/>
and
<Valve className="org.wso2.carbon.webapp.mgt.session.CarbonTomcatSessionReplicationValve"/>
in catalina-server.xml, and make application distributable by adding <distributable/>
in web.xml.
Badly, it seems that WSO2 add some non serializable attributes to the session, making the replication fail.
When I try to connect to the carbon application, I get the following exception :
ERROR - ApplicationDispatcher Servlet.service() for servlet bridgeservlet threw exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute CarbonAuthenticator
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1453)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1413)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:149)
at org.eclipse.equinox.http.servlet.internal.HttpSessionAdaptor.setAttribute(HttpSessionAdaptor.java:96)
at org.wso2.carbon.ui.tracker.AuthenticatorRegistry.getCarbonAuthenticator(AuthenticatorRegistry.java:82)
at org.wso2.carbon.ui.CarbonUILoginUtil.getAuthenticator(CarbonUILoginUtil.java:69)
at org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:76)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:60)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
Precision : I tried with a fresh WSO2EI 6.1.1 installation, doing only the previously described modifications.
I also had to manually add tomcat-juli-7.0.75.jar and tomcat-trives-7.0.75.jar on wso2/lib/endorsed to avoid ClassNotFoundException.
I checked the WSO2 source code, and saw that the CarbonAuthenticator class is effectively non serializable.
Does anyone already configured the http session replication successfully ?
Thanks in advance,
Regards,
Laurent

Create Mediation Exception In WS02 API Manager

I am having following issues and questions:
I am getting exceptions when creating a mediation. When select the ‘Browse’ icon in the Resources tab, I got blank screen with following error. I am using IE browser. Java env is JDK8.
[2016-01-17 22:23:36,275] ERROR - RoleSecurityTagSupport IO Error executing tag: JSPException while including path '/res ources/resource.jsp'. ServletException while including page. java.io.IOException: JSPException while including path '/resources/resource.jsp'. ServletException while including page.
Could you please specify the API Manager Version?
We don't support JDK8 for API Manager versions released until API Manager 1.9.1. However we support JDK8 in the API Manager 1.10.0
Therefore if you are using a version which is APIM 1.9.1 or older, please downgrade JDK to JDK 1.7
For References:
https://docs.wso2.com/display/AM191/Installation+Prerequisites - API Manger 1.9.1
https://docs.wso2.com/display/AM1100/Installation+Prerequisites - API Manager 1.10.0