Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Getting Started


The Concept

GSS is a general server application for providing several types of services with several types of interfaces.

Gliffy Diagram
sizeL
namegss overview

Service:

Interface:

You can authorize the interface with a service. You can authorize a service with another service.

Installing GSS Server

  1. Download and extract GSS Server archive file.
  2. Enter bin directory and execute the appropriate file to start running
  • gss-server.bat ..\conf\gss-server.xml 
  • gss-server ../conf/gss-server.xml

Configuration


GSS Server requires an XML file for configuration. The default configuration file is: <GSS_SERVER_HOME>/conf/gss-server.xml.

You can get the complete XML schema at: http://ilerian.com/documentation/gss_configuration/gss.html

Define Services

Executable Service:

Note

For example, we have a perl script for creating an email address under a domain for our hosting company. Our script works as below:
hosting_operations.pl <operation_ID> <operation_param1> <operation_param2> ....
For creating email address: 
hosting_operations.pl create_email -domain=<domain_name> -email=<email_address> -quota=<quota> -password=<password>

Let's introduce a service for this facility.

Code Block
languagehtml/xml
linenumberstrue
<executableService name="createEmailAddress" executable="hosting_operations.pl" parameterSeparator=" ">
    <parameter name="domainName" prefix="create_email -domain=" required="yes"/>
    <parameter name="email" prefix="-email=" required="yes"/>
    <parameter name="quota" prefix="-quota=" required="false"/>    
    <parameter name="password" prefix="-password=" required="yes"/>
</executableService>

Define Interface

Let's define an HTTP interface for our GSS Server.

Code Block
languagehtml/xml
linenumberstrue
<communication>
    <httpInterface authorizationName="authHttpUserPass" hostname="localhost" port="1655" />
</communication>

It binds on host localhost and 1655 port. The authorization of this interface is performed through authHttpUserPass authorization policy. This will be explained on the next section.

You can setup more than one interface type.

Mastering The Basics


Authorization

All authorization policies are defined in <security> element of the configuration file.

Code Block
languagehtml/xml
..
<security>
    <executableAuthorization name="checkHttpUserPass" serviceName="concatUserPass" >               
	<parameterMapping >
        	<mapRow authParam="username" serviceParam="username"/>
		<mapRow authParam="password" serviceParam="password"/>
	</parameterMapping>
	<expectedResult><text>kurtulus123456</text></expectedResult>
    </executableAuthorization>       
    <executableAuthorization name="repeatAuthorization" serviceName="repeatMe" >
	<parameterMapping >
	    <mapRow authParam="username" serviceParam="whatToRepeat"/>
        </parameterMapping>
        <expectedResult><text>kurtulus</text></expectedResult>
    </executableAuthorization>
</security>
..

An authorization policy is a connector that gets the parameters from the request and maps to a specified service for authorization. In other words, it executes an already defined service for authorization and use some of the request parameters for input.

An interface or a service can use a defined authorization policy for usage restriction. It is optional to use authorization policies for interfaces and services.

Interface Authorization

Interface authorization is used for preventing unwanted access on GSS server. GSS provides authorization for your each interface separately.

Code Block
languagehtml/xml
linenumberstrue
<communication><httpInterface authorizationName="authHttpUserPass" hostname="localhost" port="1655" /></communication>

You can control authorization of an interface by referencing the name of an already defined authorization policy on interface definition.

The username and password attributes of the client request are used for Interface authorization.

Service Authorization

GSS provides authorization for your each service separately.
<executableService name="createEmailAddress" authorizationName="authDomainOwnerCheck"
executable="hosting_operations.pl" parameterSeparator=" ">
You can control authorization of a service by referencing the name of an already defined authorization policy on service definition.
The request parameters received for the service are also used for authorization process. 

Sending Request


Include Page
_GSS_101_Sample_Configuration
_GSS_101_Sample_Configuration

Anchor
request_for _exe
request_for _exe

Request for Executable Service

The complete xml schema for request XML is at : http://ilerian.com/documentation/request/request.html

Code Block
languagehtml/xml
linenumberstrue
<request username="kurtulus" password="123456">
        <job serviceName="createEmailAddress">
                <parameter name="domainName" value="mydomain.com" />
                <parameter name="email" value="[email protected]" />   
                <parameter name="quota" value="990" />
                <parameter name="password" value="hyt939" />
        </job> 
</request>

This request runs hosting_operations.pl on the server machine with the following parameters:

Code Block
hosting_operations.pl create_email -domain=mydomain.com [email protected] -quota=990  -password=hyt939

The response will include the output of the executable:

Code Block
languagehtml/xml
linenumberstrue
<response>
    <serviceResponse name="createEmailAddress">OK</serviceResponse>e
</response>

The username and password attributes on the request are for interface authorization only.

For  the configuration above,

  1. GSS Server checks the interface authorization by sending the username and password values to checkHttpUserPassService 
  2. For createEmailAddress job, GSS server checks the service authorization by sending the domainName and emailAddress values to emailOwnerAuthorization
  3. GSS Server sends the job parameters (emailAddress....) to createEmailAddress service.
  4. As createEmailAddress is an executable service, GSS Server runs "/var/server.pl create_email reseller_id realdomain.com [email protected] 7887" and returns the output to the client.
Gliffy Diagram
sizeL
nameGss Server Request Processing

Client Usage

Java Client:

Include Page
_GSS_101_Java_Client
_GSS_101_Java_Client

PHP Client 

Include Page
_GSS_101_Php_Client
_GSS_101_Php_Client