Am working with wso2esb 4.7.0 and wso2dss 3.0.0.
I have diffident number of data services in my DSS
so, when we are creating a proxy service in my ESB, generally will send the payload to the respective address endpoint of the particular data service in the DSS and will execute the proxy
But what i want to do is create an Endpoint in ESB and configure all my DSS Address endpoints in this Endpoint and use this in all my proxy services
some of my Address endpoints in DSS are as shown below
localhost:9764/services/Get_details/
localhost:9764/services/Get_geodetails/
localhost:9764/services/muser_DataService/
how can i create a default endpoint with this Address endpoints in my ESB
You can use a single proxy in ESB and call different DSS endpoints based on the message contents. Please go through the mediators under Filter category.
For your scenario, you may use the Switch Mediator. From that, you can check for different conditions and send to appropriate endpoint.
For eg: please refer Content-Based Router Pattern
You may use a mediator like Payload Factory to transform message depending on the target endpoint.
I hope this helps.
Related
I have an API that is exposed through WSO2 API Manager, it is secured by OAuth2 so client must pass an apikey, token or credentials in order to get access to resources. So far so good. But now, I'd like to protect backend's endpoint as well. Backend only accepts calls from API Manager (IP security) but it is open, I mean, if someone with access to APIM's host does the call, it will accept since there is no authentication between them.
I would like to use Identity Server to protect backend but according to APIM documentation, supported endpoint security are BASIC or DIGEST.
What is the best approach to implement BASIC/Digest auth in SpringBoot backend and use WSO2 Identity Server as user registry? This way I can centralize every security details to a single solution.
Thanks in advance.
If you use basic auth or any such, your back end might have to do another API call to WSO2 to validate that token. Instead, you can pass a self contained JWT token from the API manager to the backend. So that the back end can validate that the JWT is issued by the API manager it self using using the certificate without relying on anything else.
From this way you can verify if the call was made y API Manager, additionally the end user as well from the JWT content.
Doc : https://apim.docs.wso2.com/en/latest/learn/api-gateway/passing-end-user-attributes-to-the-backend/passing-enduser-attributes-to-the-backend-using-jwt/?fbclid=IwAR1JT9DLOclmA-xw0Ev9C2Xrje5EDGrDBnmMkfDKMcbxTlCLf0swSPucMfA
I am new to API gateways and am trying to understand how they work. I am using WSo2 but figured they all probably work on same fundamentals.
I have a backend API written in SOAP which works fine.
I created a WSo2 API that connects to my backend SOAP API through swagger and works fine.
I also ran Wso2 endpoint from SOAP ui and got my response.
Next step is to create a client that will invoke WSo2 API and will eventually hit the backend SOAP API and get a response back. Should I use SOAP Backend API WSDL to create java objects while writing client for WSO2 API I created in step 2?
So:
wso2 client -> wso2 API -> backend SOAP API
and I create backend SOAP API WSDL to create java objects for wso2 client?
Usually, for REST APIs the gateways expose OAS documents and you can use those to generate REST API clients.
However, in case of SOAP APIS, the gateways mostly work in passthrough manner. In that case, if you want to generate a client you can use the backend WSDL.
Is there a way to add a custom provider to VFS within WSO2 ESB? The requirement is to add a custom VFS provider for S3 within WSO2 ESB. I have tried it out with Apache Commons VFS on its own but can't figure out a way to customise WSO2 ESB.
Thanks
You can use your own vfs listener / sender classes (see repository/conf/axis2/axis2.xml and search for transportReceiver name="vfs" and transportSender name="vfs").
You can add your own providers (see repository/components/plugins/commons-vfs2_2.0.0.wso2v14.jar : in META-INF/vfs-provider.xml you will have a sample that add a "smb" and a "mime" provider) and have a look to this sample : http://detailfocused.blogspot.fr/2009/06/add-plugin-for-apache-vfs.html
But probably the best way would be to use the dedicated esb connector for Amazon s3, see
https://docs.wso2.com/display/ESBCONNECTORS/Amazon+S3+Connector
I was thinking of using my own custom api gateway running on a separate box using nginx.
Is there any way in which the WSO2 API Manager can integrate to my api gateway?
In case there isn't, wanted to know if there's the possibility to run WSO2 API Manager without (or disabling) the API Gateway and if you could tell me which WSO2 API Manager's features would be unavailable.
Currently there's no way of replacing the gateway since we do the authentication, throttling, etc using synapse handlers. Here I am not sure about your use case of using nginx but what you can do is you can use nginx endpoint when you create the API or on the other way around you can route nginx traffic to API Gateway (you need to fix the API endpoints appearing in the API manager store view to point to nginx). Basically API layer need to be on top of service layer.
I 'm looking for a tool to host and publish APIs documentation so
that users of the api can browse it and test it right from the
documentation web page
If i got it correctly, you need a API store only to host your APIs.You can try enterprise store The documentation can be found here
I have created a data service in WSo2 for exposing a table. I have also created an API for this, Now I wanted to match the API with this data service.
Please help how to do this.
Have you created the API in the ESB? You can create the API in the DSS itself[1] while creating the data service[1][2]. If you want to expose the datasservice via an ESB then the service endpoint of the created dataservice is available in the dataservice dashboard page which can be directly accessed by the ESB.
[1]https://docs.wso2.com/display/DSS321/Defining+Service+Operations
[2]https://docs.wso2.com/display/DSS321/Exposing+Data+as+REST+Resources