Cloud Services GateWay - User Guide

Introduction

This is the user guide for Cloud Services GateWay. If you read this document that means you have successfully installed the CSG Agent component. Cloud Services GateWay(CSG) is consist of two parts.

  1. CSG Agent - This feature let you to add/edit CSG servers and publish/unpublished services to a remote CSG server. This feature should be installed in WSO2 Application server.
  2. CSG - This is the feature which runs on WSO2 ESB. This feature requires Qpid component to be run on the system. Once installed successfully you can see the following log line on the WSO2 ESB log.
  3. [2011-04-28 12:51:49,831] INFO - CSGComponent Activated the CSG Component

    If the component starting is failing you'll get a detail message why it happens(most of the time due to missing Qpid broker component).

Table of Content

What does Cloud Services Gateway(CSG) do?

Most of the cooperate networks in today's world are secured with cooperate firewalls. There are services deployed in the private network that can only access within the organization. If you want to access one of these services from your home, you'll not be able to do that because of the firewall. In such time CSG can come to rescue you.

When you install the CSG component within ESB you can deploy a proxy service which will act as a front end for the private services. This minimal proxy has a very specific feature. The proxy will have a JMS endpoint and in turns the private service (when published) will start listen to this JMS queue. This queue will use the as the communication medium for the front end proxy and the back end private service.

The technique that we have used to publish a private to public is very simple. When you are within the firewall you can access the outside but not from outside to inside. When you publish a private service that service will act as the client and will always make the connection to internet from the cooperate firewall. Since the firewall allows connection from inside to outside we'll not face any problem publishing services and using them outside. Once published a proxy service will be deployed on ESB which you can use.

The deploying proxy has the following name.

private service nameProxy. For example a back end echo service with the service name Echo will have proxy name EchoProxy

Deployment of CSG

When installing CSG will be installed on WSO2 ESB and CSG agent will be available in all service hosting products.

When deploying CSG the private services which will be hosted on one of the service hosting products (such as AS, BPS, BRS, MS etc..) and will be deployed behind the cooperate firewall. The ESB which contains the CSG component will be deployed in a place where publicly accessible.

Figure 0: The deployment diagram for CSG deployment.

Use case of CSG

CSG can be used to expose a private service to public through a cooperate firewall.

Adding a new CSG server

To add a new CSG server just login WSO2 Application server you can add a new CSG server by using the CSG Agent link from the left menu of the console under Configure section. This will forward you to the new CSG server addition wizard. Since CSG server is actually running on a remote WSO2 ESB instance the required information is actually the information of WSO2 ESB.

Each of the field has the following meaning. Note that all these fields are mandatory.

  1. CSG Server Name - A unique name for the server so that later you can slect the server to publish the service.
  2. CSG Host Name - The host name of the remote WSO2 ESB server, ex-localhost.
  3. CSG Host Port - The port of the remote WSO2 ESB server, ex-9443.
  4. Domain Name - The domain to which this private service will be exposed, ex-test.org
  5. User Name - The user name of the remote WSO2 ESB user, ex - test(tenant login will look like test@test.org)
  6. Password - The password of the remote WSO2 ESB user, ex - test123

Once this server is added it'll list under the CSG server listing page. This wizard can be use to edit the already added servers or to remove any servers.

Publishing a service

Once a server is added you can publish the already deployed services to those servers. Go to service listing page and select the service that you want to publish. Note that once you installed CSG Agent component all the axis2 services will be marked as csg services.

From the Specific configuration section you can select the server that you want to publish this service. The drop down menu will list added CSG serves set.

Un publishing a service

You can un-publish a published service. Go to service listing page and click on the Un publish From CSG to un publish the service from CSG. An unpublished service can be published again if required.

Configure CSG properties

You can configure several properties of CSG(server and agent components) using a property file called csg.properties which should be placed either in CARBON classpath or inside $CARBON_HOME/repository/conf. Following properties can be used.

  1. csg.agent.connection.read_timeout - When CSG agent component downloading the WSDL the read time out, default is 100000 milliseconds.
  2. csg.agent.connection.connect_timeout - When CSG agent component downloading the WSDL the connect time out, default is 200000 milliseconds.
  3. csg.jms.wait_reply - How long CSG server component proxy should wait for a reply listing on the JMS queue, default is 30000 milliseconds.