WSO2 Api Manager + Authentication + Websocket - wso2

In our architecture there are clients (web or mobile) that connects to the frontend webapp protected with SSO from an authentication filter using WSO2 Identity Server to enforce user login.
I developed a proxy servlet to wrap all invocations to the backend services, this servlet is deployed in the fronted webapp. Everithing works until this point.
The architecture is the following:
User <--> Firewall <--> Apache Proxy <--> Frontend WAR <--> Backend WAR
The problem is that these clients need to connect to a Websocket endpoint deployed on the backend WAR.
Looking around I found that WSO2 Api Manager starting from version 2.1 has the Websocket support.
I tried to follow the provided tutorial: https://docs.wso2.com/display/AM210/Create+a+WebSocket+API
But in the example is not mentioned how to connect to the API exposed endpoint using a pure javascript.
Do you have any suggestion on how to achieve this?
Regards

Related

WSO2 Api Manger 3.0.0 how to use HA routing of services

We have two API servers running in HA mode i.e. same set of services are running on both VMs with same environment. We would like to use WSO2 APIM for API Security but the problem is that we have not been able to find how to use HA routing services in WSO2 APIM.
E.g.
API Server 1- http://192.168.0.2/getCustomerDetails
API Server 2- http://192.168.0.3/getCustomerDetails
API Gateway- 192.168.0.10
Once registered on API Gateway the service endpoints become-
URL1- https://192.168.0.10:8243/getCustInfo1
[edit]
URL2- https://192.168.0.10:8243/getCustInfo2
Now the question is how does WSO2 APIM decides where to route the request i.e. URL1 or URL2 for accessing the same business service? Or there is some concept like virtual ip usage in WSO2 APIM?
You don't have to create 2 APIs in API Manager for your 2 backend URLs. Create a single API and use Load Balancing or Failover Endpoints[1].
[1] https://apim.docs.wso2.com/en/latest/Learn/DesignAPI/Endpoints/high-availability-for-endpoints/

Inspecting RESTful web services using IntelliJ

I am working on a microservices application that has a webapp backend consuming a RESTful web service endpoint.
I use IntelliJ and I would like to see the traffic (requests, responses, headers, etc.) between the webapp backend (the client) and the web service endpoint.
How is that possible?
Note:
I have tried using the bundled REST Client but it is just meant to issue requests to a web service endpoint.
The chrome console is of no use either because it just monitor the traffic between the SPA and the webapp backend...
My webapp and endpoint are developed in Spring/Java.

Google App Engine - JBoss authentication

I have a web service hosted in a JBoss AS. Add a app running on Google App Engine. Now I want to access my web service hosted in JBoss AS only by my App Engine app and I want to restrict others from accessing my web service. How can I do that? Please help.
Use the AppEngine URL Fetch Service to call your JBoss web services from your AppEngine app. Use the HTTPS option to secure the network connection. Furthermore create request headers and payload such as to satisfy whatever JBoss security requirements you can establish between JBoss and AppEngine (for example client user authentication).

Where are WSO2 SOAP APIs / WSDL?

I've been reading everywhere including here and here that WSO2 provided SOAP APIs for its services. My question is where are they? How can I locate them? For example, if there's a XACML API provided by WSO2, how can I find it.
What I understand about the WSO2 platform is that ESB, STS, DSS, IS are all services. To expose their functionalities, you have to write out standard XML, then import it into the WSO2 backend. After this, a WSDL is generated which can be used by a client. Am I right?
If not, then I have simple questions;
What is the endpoint or service url for all IS services?
What is the endpoint or service url for all ESB services?
What is the endpoint or service url for all STS services?
What is the endpoint or service url for all DSS services?
Thanks for explaining.
WSO2 uses Admin services and by default they are not exposed to outside and exposed over https.
You can view the list of services available by by referring this thread.
Another sample on using an Admin service is available here.
Sample developed to create proxy services using Proxy admin service is available here

WSO2 ESB: Usage of https client certificate in mediation

I was planning the following setup:
A proxy service in WSO2 ESB that interacts with a backend service via JMS.
Proxy service clients connects to the WSO2 ESB using https with mutual authentication.
Within the proxy service mediators, information from the client's certificate are needed.
Is there some way the client certificate could be made available to mediators?
You do not need to provide client certificates provided at mediator level. Medeators are put together in a pipes & filter chain, and it is the endpoint at the end that connects to the back-end and it is at the endpoint level, you have to secure it. The blog post on How to invoke secured backend service using WSO2 ESB shows how to ahcive this.
First you have to enable mutual authentication in WSO2 ESB.If you do not know how to do that please refer Enable Mutual SSL for Proxy services in WSO2ESB.Then refer following block post to know how to get client's certificate in class mediator