13.07.2015 Views

What is GateKeeper? - Borland Technical Publications

What is GateKeeper? - Borland Technical Publications

What is GateKeeper? - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Borland</strong>V<strong>is</strong>iBroker 8.0<strong>GateKeeper</strong> Guide<strong>Borland</strong> Software Corporation20450 Stevens Creek Blvd., Suite 800Cupertino, CA 95014 USAwww.borland.comRefer to the file deploy.html for a complete l<strong>is</strong>t of files that you can d<strong>is</strong>tribute in accordance with theLicense Statement and Limited Warranty.<strong>Borland</strong> Software Corporation may have patents and/or pending patent applications covering subjectmatter in th<strong>is</strong> document. Please refer to the product CD or the About dialog box for the l<strong>is</strong>t of applicablepatents. The furn<strong>is</strong>hing of th<strong>is</strong> document does not give you any license to these patents.Copyright 1992–2006 <strong>Borland</strong> Software Corporation. All rights reserved. All <strong>Borland</strong> brand and productnames are trademarks or reg<strong>is</strong>tered trademarks of <strong>Borland</strong> Software Corporation in the United Statesand other countries. All other marks are the property of their respective owners.Microsoft, the .NET logo, and V<strong>is</strong>ual Studio are either reg<strong>is</strong>tered trademarks or trademarks of MicrosoftCorporation in the United States and/or other countries.For third-party conditions and d<strong>is</strong>claimers, see the Release Notes on your product CD.VB 80 <strong>GateKeeper</strong> GuideApril 2007


ContentsChapter 1Introduction to <strong>GateKeeper</strong> 1<strong>What</strong> <strong>is</strong> <strong>GateKeeper</strong>? . . . . . . . . . . . . . . . . . 1<strong>GateKeeper</strong> as a Gateway or Proxy . . . . . . . . . 1Additional capabilities of <strong>GateKeeper</strong>. . . . . . . . . 2Primary Use of <strong>GateKeeper</strong> . . . . . . . . . . . . 2Installing <strong>GateKeeper</strong> . . . . . . . . . . . . . . . . . 2Starting <strong>GateKeeper</strong> . . . . . . . . . . . . . . . . . 2Starting <strong>GateKeeper</strong> from the command line . . . 3Command line options . . . . . . . . . . . . . 3Running <strong>GateKeeper</strong> as an NT service . . . . . . 3Removing <strong>GateKeeper</strong> as an NT service. . . . 4Running <strong>GateKeeper</strong> as a servlet in a Web Server 4Managing <strong>GateKeeper</strong> . . . . . . . . . . . . . . . . 4Chapter 2Configuring <strong>GateKeeper</strong> andinternetworking devices 5Where to deploy <strong>GateKeeper</strong> . . . . . . . . . . . . . 5Client and server on the same network . . . . . . 5Client and server on adjacent networks . . . . . . 6Multiple networks between client and server . . . 8Configuring a multi-homed host. . . . . . . . . . . . 12Enable IP-forwarding. . . . . . . . . . . . . . . . 13Routing table. . . . . . . . . . . . . . . . . . . . 13Configuring the firewall . . . . . . . . . . . . . . . . 14Using Network Address Translation (NAT) . . . . . . 15Configuring <strong>GateKeeper</strong> . . . . . . . . . . . . . . . 15L<strong>is</strong>tener ports . . . . . . . . . . . . . . . . . . . 15Admin<strong>is</strong>trative service . . . . . . . . . . . . . . . 16Enabling callbacks (V<strong>is</strong>iBroker 3.x style) . . . . . 16Enabling pass-through connections . . . . . . . . 16Enabling the location service . . . . . . . . . . . 17Specifying the Smart Agent (osagent) . . . . . . . 17Specifying the Object Activation Demon (OAD) . . 17Configuring <strong>GateKeeper</strong> server engines. . . . . . 17Security services. . . . . . . . . . . . . . . . . . 18SSL Transport Identity and Trustpoint . . . . . 18Installing SSL Identity using Wallet properties . 18Installing SSL Identity on <strong>GateKeeper</strong> usingCertificate Login. . . . . . . . . . . . . . . . 18Setting peerAuthenticationMode . . . . . . . . 19Applet and Java Webstart . . . . . . . . . . . . . 19V<strong>is</strong>iBroker settings on a typical applet client . . 19V<strong>is</strong>iBroker Application Deployed as a JavaWebstart . . . . . . . . . . . . . . . . . . . 20Chapter 3Configuring user programs 21Using objects behind firewalls . . . . . . . . . . . . 21Programming a single POA . . . . . . . . . . . . 21Configuring the firewall policy for all POAsassociated with a server . . . . . . . . . . . . . 22Loading a firewall package at runtime . . . . . . . 22Configuring client properties . . . . . . . . . . . . . 23Specify always proxy on a client . . . . . . . . . . 23Specify HTTP tunneling on a client. . . . . . . . 23Specify secure connections on a client. . . . . . 24Specify pass-through connections on a client . . 24Enabling pass-through connections . . . . . . . 25Specifying the client bid order . . . . . . . . . . 25Specifying a client callback l<strong>is</strong>tener port (forV<strong>is</strong>iBroker 3.x style). . . . . . . . . . . . . . . 25Configuring server properties . . . . . . . . . . . . 25Specifying the l<strong>is</strong>tener port of the server . . . . . 25Random l<strong>is</strong>tener port . . . . . . . . . . . . . 25Specific l<strong>is</strong>tener port. . . . . . . . . . . . . . 26Port translation (NAT) . . . . . . . . . . . . . 26D<strong>is</strong>abling the IIOP port . . . . . . . . . . . . 26Specifying communication paths to the server . . 26Specify the component of a proxy server . . . 27Specify the component of a TCP firewall with NAT27Chapter 4Advanced features 29Chaining of <strong>GateKeeper</strong>s . . . . . . . . . . . . . . 29Static chaining of <strong>GateKeeper</strong>s. . . . . . . . . . 29Dynamic chaining of <strong>GateKeeper</strong>s . . . . . . . . 30Callbacks . . . . . . . . . . . . . . . . . . . . . . 30Callbacks without <strong>GateKeeper</strong> . . . . . . . . . . 30Callbacks without <strong>GateKeeper</strong> using bidirectionalGIOP . . . . . . . . . . . . . . . . . . . . . . 31Callback with <strong>GateKeeper</strong>'s bidirectional support 32Bidirectional connection example . . . . . . . 32Security considerations . . . . . . . . . . . . 33Access control . . . . . . . . . . . . . . . . . . . . 34Custom-designed access control in <strong>GateKeeper</strong>. 34Load balancing and fault tolerance . . . . . . . . . 36Load balancing . . . . . . . . . . . . . . . . . . 36Custom-designed load balancing in <strong>GateKeeper</strong>. 36Fault tolerance . . . . . . . . . . . . . . . . . . 37Scalability and performance guidelines . . . . . . . 37<strong>GateKeeper</strong> performance tuning . . . . . . . . . 37Bidding mechan<strong>is</strong>m . . . . . . . . . . . . . . 38Cache management. . . . . . . . . . . . . . 38Message marshalling . . . . . . . . . . . . . 38Thread management . . . . . . . . . . . . . 38Connection management . . . . . . . . . . . 39Impact of asynchronized invocation of <strong>GateKeeper</strong> .39<strong>GateKeeper</strong> performance properties . . . . . . . . 39Connection settings . . . . . . . . . . . . . . . 39Thread related settings . . . . . . . . . . . . . . 40<strong>GateKeeper</strong> modes . . . . . . . . . . . . . . . . 40Call types . . . . . . . . . . . . . . . . . . . . . 40<strong>GateKeeper</strong> and SSL . . . . . . . . . . . . . . . . 40SSL connections to <strong>GateKeeper</strong> . . . . . . . . . 41SSL for forward and bidirectional calls . . . . . . 41Enabling the Security Service in <strong>GateKeeper</strong> . . . . 41Enabling access to the Naming Service through<strong>GateKeeper</strong> . . . . . . . . . . . . . . . . . . . . 44i


Chapter 5Troubleshooting <strong>GateKeeper</strong> 47Preparation for troubleshooting. . . . . . . . . . . . 47Getting debugging information . . . . . . . . . . 47Starting <strong>GateKeeper</strong> in debugging mode . . . . . 49Environment settings . . . . . . . . . . . . . . . 49Tools for troubleshooting . . . . . . . . . . . . . 50Getting information about the computer network . 51Essential checks . . . . . . . . . . . . . . . . . . . 52Check the Smart Agent . . . . . . . . . . . . . . 52Check the property files . . . . . . . . . . . . . . 52Check the routing table . . . . . . . . . . . . . . 52Check pass-through connections . . . . . . . . . 53Check the Java policy . . . . . . . . . . . . . . . 53Check SSL . . . . . . . . . . . . . . . . . . . . 53Check the IOR files . . . . . . . . . . . . . . . . 53Check firewall settings. . . . . . . . . . . . . . . 53Common errors and FAQs . . . . . . . . . . . . . . 54Proxy servers and <strong>GateKeeper</strong>. . . . . . . . . . . . 54Appendix A<strong>GateKeeper</strong> properties 57General properties . . . . . . . . . . . . . . . . . . 57Exterior server engine . . . . . . . . . . . . . . . . 58ex-hiop server connection manager (SCM) . . . . . 58ex-iiop server connection manager (SCM) . . . . . . 60ex-hiops server connection manager (SCM) . . . . . 61ex-ssl server connection manager (SCM) . . . . . . 62Interior server engine . . . . . . . . . . . . . . . . . 63in-iiop server connection manager (SCM) . . . . . . 64in-ssl server connection manager (SCM). . . . . . . 64Admin<strong>is</strong>tration . . . . . . . . . . . . . . . . . . . . 65Access control . . . . . . . . . . . . . . . . . . . . 66V<strong>is</strong>iBroker 3.x style callback . . . . . . . . . . . . . 67Performance and load balancing . . . . . . . . . . . 68Support for bidirectional communications . . . . . . 70Support for pass-through connections . . . . . . . . 70Security services (SSL). . . . . . . . . . . . . . . . 71Location services (Smart Agent) . . . . . . . . . . . 72Backward compatibility with V<strong>is</strong>iBroker 4.x and below 73Server's properties for firewall specifications . . . . . 73M<strong>is</strong>cellaneous ORB properties . . . . . . . . . . . . 74Appendix B<strong>GateKeeper</strong> deployment scenarios 77TCP firewall (without <strong>GateKeeper</strong>) . . . . . . . . . . 77<strong>GateKeeper</strong> deployment . . . . . . . . . . . . . . . 85<strong>GateKeeper</strong> with server-side firewall . . . . . . . . . 90Firewall in front of <strong>GateKeeper</strong> . . . . . . . . . . 90Firewall in front and behind of <strong>GateKeeper</strong> . . . . 93<strong>GateKeeper</strong> with client-side firewall . . . . . . . . . 97<strong>GateKeeper</strong> load balancing and fault-tolerance . . . 98<strong>GateKeeper</strong> chaining . . . . . . . . . . . . . . . . 101Using V<strong>is</strong>iBroker in a multiple firewall/subnetenvironment . . . . . . . . . . . . . . . . . . . . 104Firewall and Smart Agent scenario . . . . . . . . . 105Using the Smart Agent in a firewall scenario . . . . 106Behavior during the Smart Agent failure in a firewallscenario . . . . . . . . . . . . . . . . . . . . . . 107Client behavior for using the Smart Agent . . . . . 107Using <strong>GateKeeper</strong> with other CORBA services . . . 107Configuring <strong>GateKeeper</strong> with an HTTP proxy server 108Additional server engines in <strong>GateKeeper</strong> . . . . . . 108Additional l<strong>is</strong>teners or server connection managers in<strong>GateKeeper</strong> . . . . . . . . . . . . . . . . . . . . 109<strong>GateKeeper</strong> stress/load metrics . . . . . . . . . . . 109Deploying <strong>GateKeeper</strong> as a servlet . . . . . . . . . 109Building the example . . . . . . . . . . . . . . . 109Running th<strong>is</strong> example . . . . . . . . . . . . . . 110web.xml . . . . . . . . . . . . . . . . . . . . . 111Client.properties . . . . . . . . . . . . . . . . . 113Index 115ii


Introduction to <strong>GateKeeper</strong><strong>What</strong> <strong>is</strong> <strong>GateKeeper</strong>?Th<strong>is</strong> section provides an overview of <strong>GateKeeper</strong> and describes different ways to start<strong>GateKeeper</strong>.<strong>GateKeeper</strong> <strong>is</strong> an OMG–CORBA compliant General Inter-ORB Protocol (GIOP) ProxyServer developed by <strong>Borland</strong> Software Corporation which enables CORBA clients andservers to communicate across networks while conforming to security restrictionsimposed by Internet browsers, firewalls, and Java sandbox security. In effect,<strong>GateKeeper</strong> serves as a gateway or proxy for clients and servers when securityrestrictions prevent clients from communicating with the servers directly.<strong>GateKeeper</strong> <strong>is</strong> often used when you do not want to expose the server directly to clientsor when a client's access to the server <strong>is</strong> restricted. In the latter case, either the client <strong>is</strong>an unsigned applet or there <strong>is</strong> an intervening firewall.<strong>GateKeeper</strong> as a Gateway or ProxyWhen a d<strong>is</strong>tributed system based on the V<strong>is</strong>iBroker ORB <strong>is</strong> deployed over the Internetor Intranet, there are many security restrictions that can apply to the system, including:– server-side firewalls preventing clients from accessing certain server hosts.– client-side firewalls preventing outgoing connections.– client-side firewalls prohibiting protocols other than HTTP.<strong>GateKeeper</strong>, along with the V<strong>is</strong>iBroker ORB, provides mechan<strong>is</strong>ms to work with theserestrictions based on the OMG CORBA Firewall specification by acting as a gateway orproxy between the client and the server. When certain restrictions prevent the clientfrom connecting directly to the server, the client can choose to connect to <strong>GateKeeper</strong>.The client can send messages to <strong>GateKeeper</strong> which will forward the messages to theserver.When certain restrictions prevent the server from connecting back to the client to docallbacks, the server can choose to connect to <strong>GateKeeper</strong>. The server can sendcallback messages to <strong>GateKeeper</strong> which will forward the messages to the client.In short, <strong>GateKeeper</strong> provides the following features:– Proxy to overcome firewalls1: Introduction to <strong>GateKeeper</strong> 1


Additional capabilities of <strong>GateKeeper</strong>– Callback enabling– Location transparency– Java: HTTP tunnelingAdditional capabilities of <strong>GateKeeper</strong>In brief, the additional capabilities of <strong>GateKeeper</strong> are:– Java: Acts as a simple Web Server to load java classes. Java sandbox securityprevents unsigned Java applets from communicating with servers other than theones running on the host machine from which the applets were downloaded.<strong>GateKeeper</strong> can be configured to overcome th<strong>is</strong> problem.– Java: BootStrapping. <strong>GateKeeper</strong> can run as a servlet inside any Web Server thatsupports servlets. Th<strong>is</strong> configuration enables IIOP over HTTP (HIOP) and <strong>is</strong> usefulfor Java clients.– Load Balancing and Fault Tolerance. A master <strong>GateKeeper</strong> and one or more slave<strong>GateKeeper</strong>s can be clustered together and viewed as a single <strong>GateKeeper</strong> by theclients. Th<strong>is</strong> configuration provides the flexibility to balance the load and allows somedegree of fault tolerance.– Customizable IP-based access control. <strong>GateKeeper</strong> can be configured to deny orgrant accessibility based on criteria such as operations, signed by, and so forth.NoteInstalling <strong>GateKeeper</strong>For more details on <strong>GateKeeper</strong> configurations, see “Advanced features.”Primary Use of <strong>GateKeeper</strong><strong>GateKeeper</strong> <strong>is</strong> primarily used as a proxy to overcome firewall and transport restrictions.In addition, <strong>GateKeeper</strong> acts as a Web Server and also incorporates load balancingand access control. <strong>GateKeeper</strong>, however, should never be used like a full-fledgedWeb Server, a full-fledged load balancing system, nor a full-fledged access controlsystem. <strong>GateKeeper</strong> should instead complement its full-fledged counterparts.<strong>GateKeeper</strong> <strong>is</strong> shipped as a component of V<strong>is</strong>iBroker. <strong>GateKeeper</strong> requires thefollowing components:– V<strong>is</strong>iBroker Smart Agent– V<strong>is</strong>iBroker ORB Libraries– V<strong>is</strong>iBroker <strong>GateKeeper</strong> properties file– V<strong>is</strong>iBroker ConsoleNoteStarting <strong>GateKeeper</strong><strong>GateKeeper</strong> <strong>is</strong> a stand-alone process. It does not require any of the CORBA IDLcompilers.The choice of the directory in which to start <strong>GateKeeper</strong> <strong>is</strong> determined by how it <strong>is</strong>being used.– As an IIOP proxy server for a firewall2 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Starting <strong>GateKeeper</strong>– As a Web Server to support HIOP– In combination with a separate Web Server to support HIOP for V<strong>is</strong>iBroker for JavaIf you use <strong>GateKeeper</strong> as an IIOP proxy, consult your firewall admin<strong>is</strong>trator becausethe firewall admin<strong>is</strong>trator typically <strong>is</strong> in charge of proxies.If you use <strong>GateKeeper</strong> as a complementary Web Server, <strong>Borland</strong> recommends thatyou start <strong>GateKeeper</strong> in the same directory as the Java applets' code base. You caneither start <strong>GateKeeper</strong> at the command line or as a Windows/NT service with the firsttwo features l<strong>is</strong>ted above.If you use <strong>GateKeeper</strong> in combination with a separate Web Server, you can start<strong>GateKeeper</strong> as a servlet in the Web Server.Starting <strong>GateKeeper</strong> from the command lineUse the following command to start <strong>GateKeeper</strong>:prompt> gatekeeperNoteBefore you can start <strong>GateKeeper</strong> from the command line, you must first ensure thatyour CLASSPATH setting includes servlet.jar in its path.You can locate servlet.jar under the Tomcat installation included with V<strong>is</strong>iBroker, forexample:/lib/tomcat/commonwhere represents the root directory location in which V<strong>is</strong>iBroker <strong>is</strong>installed, such as: C:\v<strong>is</strong>ibroker on Windows.On Windows, for example, specify CLASSPATH as an environment variable and includeservlet.jar in the search path.When you start <strong>GateKeeper</strong>, you will see a start up message followed by a series ofmessages indicating which services are being started. An example of th<strong>is</strong> series ofmessages follows.Sun Feb 16 23:43:28 2003: Starting <strong>GateKeeper</strong> for V<strong>is</strong>iBroker ...Sun Feb 16 23:43:31 2003: Request Forwarding Service <strong>is</strong> started.Sun Feb 16 23:43:31 2003: Admin<strong>is</strong>trative Service <strong>is</strong> started.Sun Feb 16 23:43:31 2003: IOR <strong>is</strong> stored in <strong>GateKeeper</strong>.ior.Sun Feb 16 23:43:31 2003: <strong>GateKeeper</strong> for V<strong>is</strong>iBroker <strong>is</strong> started.Command line optionsWhen using the gatekeeper command, the following command line options areallowed::Option-props file_name-J-D=-h, -help, -usage, -?-quietDescriptionIndicates the name of the <strong>GateKeeper</strong>'s properties file. You caninclude the entire path when you specify the file name. Thedefault location for th<strong>is</strong> file <strong>is</strong> the directory where you installed<strong>GateKeeper</strong>. The default name for th<strong>is</strong> file <strong>is</strong><strong>GateKeeper</strong>.properties.Specifies a property of <strong>GateKeeper</strong> at startup.D<strong>is</strong>plays usage information.Specifies for <strong>GateKeeper</strong> to not generate output.Running <strong>GateKeeper</strong> as an NT serviceYou can install <strong>GateKeeper</strong> as an NT service. Before you do so, make sure that youcan run <strong>GateKeeper</strong> from a DOS prompt on your target NT platform.To install <strong>GateKeeper</strong> as an NT service, type the following command at a commandline, where servicename <strong>is</strong> the name of the <strong>GateKeeper</strong> you are installing.1: Introduction to <strong>GateKeeper</strong> 3


Managing <strong>GateKeeper</strong>gatekeeper -install "servicename"If you use the -props option to specify a properties file, make sure you include the fullpath name of the properties file you specify.After you've installed <strong>GateKeeper</strong> as an NT service, you can start it using the standardServices control panel.Removing <strong>GateKeeper</strong> as an NT serviceTo remove a <strong>GateKeeper</strong> NT service, use the following syntax at a command prompt:gatekeeper -remove "servicename"Running <strong>GateKeeper</strong> as a servlet in a Web Server<strong>GateKeeper</strong> can run as a servlet inside any Web server that supports servlets.<strong>GateKeeper</strong> <strong>is</strong> started with a special HIOP l<strong>is</strong>tener whose purpose <strong>is</strong> to generate theright HIOP component in the <strong>GateKeeper</strong>'s IOR. The HIOP component should containthe Web server's host, port and the path to the <strong>GateKeeper</strong> servlet. The client will sendHIOP requests to the <strong>GateKeeper</strong> as specified in the HIOP component. The benefit ofth<strong>is</strong> feature <strong>is</strong> in deployment and packaging to allow tighter integration with othercomponents of the system such as a Web server and <strong>Borland</strong> Partitions.Generally, there <strong>is</strong> no significant performance benefit in running <strong>GateKeeper</strong> as aservlet under the Web Server because all tunnelled requests still go through<strong>GateKeeper</strong> in the same way they do when <strong>GateKeeper</strong> <strong>is</strong> run as a stand-aloneprocess.NoteManaging <strong>GateKeeper</strong>If you run <strong>GateKeeper</strong> as a servlet instead of from the command line, you will losesome admin<strong>is</strong>trative capabilities as well as <strong>GateKeeper</strong> output capabilities.The V<strong>is</strong>iBroker Console enables you to set <strong>GateKeeper</strong>'s properties to meet therequirements of your networked system. <strong>GateKeeper</strong>'s properties are kept in aproperties file that <strong>GateKeeper</strong> references at startup.4 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring <strong>GateKeeper</strong> andinternetworking devicesWhere to deploy <strong>GateKeeper</strong>Th<strong>is</strong> section describes how to configure <strong>GateKeeper</strong> and internetworking devices toallow communications between client objects and server objects across networks,starting with a explanation of where <strong>GateKeeper</strong> can be deployed.Th<strong>is</strong> section describes some basic principles used to identify the correct location ofwhere to deploy <strong>GateKeeper</strong>.Gather the following information:– client location– server location and the server's l<strong>is</strong>tener port– networks connecting the client and server– firewall, router, and gateway configurations in the connecting networksFind a connecting path between the client and server; the path may cross multiplenetworks. To enable the client to contact the server, there must be a connecting path.Otherw<strong>is</strong>e, the client cannot communicate with the server.Client and server on the same networkWhen the client and server are located on the same network, the client can alwayscontact the server directly. <strong>GateKeeper</strong>, however, may still be required in somecircumstances; as in the two cases shown in the following examples. If <strong>GateKeeper</strong> <strong>is</strong>required, deploy <strong>GateKeeper</strong> on any host in the same network.Case 1: Restricted client transport typeTransport types that a client can use to connect to a server can be restricted using theclient side properties. <strong>GateKeeper</strong> <strong>is</strong> required when:– a client always connects through a proxy (vbroker.orb.alwaysProxy)– a client always use HTTP-tunneling mode (vbroker.orb.alwaysTunnel)2: Configuring <strong>GateKeeper</strong> and internetworking devices 5


Where to deploy <strong>GateKeeper</strong>See “Configuring client properties” for details.Case 2: Java sandbox securityJava sandbox security prevents unsigned Java applets from communicating withserver objects located on servers other than the ones running on the host from whichthe applets were downloaded. In th<strong>is</strong> case, <strong>GateKeeper</strong> <strong>is</strong> required as a gatewaybetween the client and server to overcome the restriction of Java sandbox security.Client and server on adjacent networksWhen the client and server networks are adjacent to each other, the two networks areconnected using an internetworking device such as a gateway or router. In somecases, a firewall may ex<strong>is</strong>t in either network or both networks. To simplify thedescription, we will consider the firewall as part of the internetworking device. Theinternetworking device <strong>is</strong> responsible for forwarding and routing the messagesbetween the two networks. It can also block certain messages from crossing thenetworks; th<strong>is</strong> <strong>is</strong> the role of a firewall. The transport types that a client uses to connectto a server can be restricted using the client's property.<strong>GateKeeper</strong> <strong>is</strong> required when– a client always connects through a proxy– a client always uses HTTP-tunneling modeSee “Configuring client properties” for details.Case 1: Java sandbox securityJava sandbox security prevents unsigned Java applets from communicating withserver objects located on servers other than the ones running on the host from whichthe applets were downloaded. In th<strong>is</strong> case, <strong>GateKeeper</strong> <strong>is</strong> required as a gatewaybetween the client and server to overcome the restriction of Java sandbox security.The following figure shows the client and server on adjacent networks.Figure 2.1 Client and server on adjacent networksCase 1: Restricted client transport typeFor a client's message to reach the server, the internetworking device must forward themessage from the client network to the server network. To find an appropriate locationto deploy <strong>GateKeeper</strong>, determine the type of messages that the internetworking devicecan forward from the client network to the server network.6 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Where to deploy <strong>GateKeeper</strong>The following cases illustrate all the possible locations to deploy <strong>GateKeeper</strong> foradjacent client and server networks.Case 1: No <strong>GateKeeper</strong> required<strong>GateKeeper</strong> <strong>is</strong> not required when the gateway can forward all client messages from theclient network to the server network.The following diagram shows a client which sends a message of type A to the server,which l<strong>is</strong>tens to type A messages. The gateway forwards the message (type A) to theserver network. The server then receives the message (type A). Common examples oftype A messages are IIOP and IIOP/SSL.Case 2: <strong>GateKeeper</strong> in a server networkThe following diagram shows a server that l<strong>is</strong>tens to messages of type S. The gatewayblocks messages of type S but can forward messages of type A from the client networkto the server network. If the client sends a message of type S to the server, it will beblocked by the gateway. Instead, the client has to send messages of type A so that thegateway can forward the message to the server network. GateKeepePr <strong>is</strong> required inthe server network to act as a proxy. The client communicates with <strong>GateKeeper</strong> usingtype A message and <strong>GateKeeper</strong> in turn communicates with the server using type Smessage. An example of type A and S <strong>is</strong> HTTP and IIOP, respectively. An example forth<strong>is</strong> scenario <strong>is</strong> HTTP Tunneling mode, where IIOP packets are not allowed, but HTTPpackets are allowed by the Gateway/Firewall.2: Configuring <strong>GateKeeper</strong> and internetworking devices 7


Where to deploy <strong>GateKeeper</strong>Case 3: <strong>GateKeeper</strong> in a client networkServer l<strong>is</strong>tens to messages of type A but client can only use transport type C tocommunicate with the server. The gateway blocks messages of type C but forwardsmessages of type A. A <strong>GateKeeper</strong> <strong>is</strong> needed in the client network. Clientcommunicates with <strong>GateKeeper</strong> using transport type C and <strong>GateKeeper</strong>communicates with the server using transport type A. The gateway forwards the type Amessage from the <strong>GateKeeper</strong> to the server network. An example of transport type Cand transport type A <strong>is</strong> HTTP and IIOP, respectively.Case 4: <strong>GateKeeper</strong> in both networksThe gateway blocks both the messages (type C) sent by clients and the messages(type S) that the server can l<strong>is</strong>ten to. The gateway can forward another type ofmessage (type A). Therefore, <strong>GateKeeper</strong> <strong>is</strong> required in both client and servernetworks. The client communicates with GK1 using message type C . GK1communicates with GK2 using message type A, which can be forwarded by the GK2which in turn communicates with the server using message type S. An example ofmessage type C <strong>is</strong> HTTP, message type A <strong>is</strong> SSL and message type S <strong>is</strong> IIOP.Case 5: <strong>GateKeeper</strong> in internetworking device (dual-homed)Installing <strong>GateKeeper</strong> on a dual-homed host works similar to deploying <strong>GateKeeper</strong> onthe server network (case 2). The difference <strong>is</strong> that <strong>GateKeeper</strong> always l<strong>is</strong>tens to theexterior network for client messages. If a client located in the interior network needs tobind to a server using the same <strong>GateKeeper</strong>, the message must first be forwarded tothe exterior network before it can reach the <strong>GateKeeper</strong> l<strong>is</strong>tener. An example of type Aand type S messages are HTTP and IIOP, respectively.8 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Where to deploy <strong>GateKeeper</strong>Multiple networks between client and serverIn a more complex environment, multiple networks ex<strong>is</strong>t between the client and theserver networks. Each pair of adjacent networks <strong>is</strong> connected using an internetworkingdevice.Figure 2.2 Multiple networks between client and server.For illustration purposes, the client network will be numbered as N 0 . The networkadjacent to the client network will be numbered as N 1 , the next adjacent network as N 2and so on until the server network. The server network will be numbered as N n in thefollowing d<strong>is</strong>cussions. Replace n with the actual number depending to the networkconfiguration. Also, the internetworking device between network N n–1 and N n <strong>is</strong>numbered as GW n .2: Configuring <strong>GateKeeper</strong> and internetworking devices 9


Where to deploy <strong>GateKeeper</strong>Clients can use different transport types to communicate with servers. Examples oftransport types are IIOP, IIOP/SSL, HTTP and HTTPS. For each valid transport type,locate the furthest network that the client message can reach. The client located innetwork N 0 sends a message to network N 0 . GW 1 may or may not forward themessage to network N 1 . The message can reach network N 1 if GW 1 can forward themessage from N 0 to N 1 . Subsequently, GW 2 may or may not forward the message tonetwork N 2 . Traverse the networks starting from the client network, then movingtowards the server network. Mark the last network that the message can reach as N c .In other words, GW c+1 cannot forward the message to the network N c+1 .A server has one or more l<strong>is</strong>tener ports. Each port l<strong>is</strong>tens to one type of messages fromclients. As an example, a server with an IIOP l<strong>is</strong>tener port and an SSL l<strong>is</strong>tener port willuse the IIOP port to l<strong>is</strong>ten to IIOP messages and the SSL port to l<strong>is</strong>ten to IIOP overSSL messages. For each l<strong>is</strong>tener port, find the furthest network from the server towhich a client message can reach the server. Mark the furthest network as N s . In otherwords, a client located in network N s <strong>is</strong> able to send a message to the server.NoteIf callback for V<strong>is</strong>iBroker 3.x style <strong>is</strong> required, an additional condition <strong>is</strong> required for N cand N s . The callback message from the server (from network N n ) must be able to reachthe network N s . When <strong>GateKeeper</strong> <strong>is</strong> used, the client must be able to set up a callbackcommunication channel to network N c .Case 1: Server can receive messages from the client network, s=0Assume the server l<strong>is</strong>tens to transport type L. Messages of transport type L from theclient network can reach the server network and subsequently the server.If the client can send messages using transport type L, then <strong>GateKeeper</strong> <strong>is</strong> notrequired because client messages of type L can be forwarded to the server network.For example, the server l<strong>is</strong>tens to IIOP and the client can send IIOP messages. Theclient's IIOP messages can be forwarded to the server without being blocked by anyfirewalls, gateways or routers.If the client cannot send messages using transport type L, deploy <strong>GateKeeper</strong> on anetwork within N 0 and N c to proxy client messages of other transport types (M) totransport type L. For example, the server l<strong>is</strong>tens to IIOP and the client can onlycommunicate using IIOP over HTTP.Case 2: Client messages can reach the server network, c = nClient messages of a particular transport type (M) can reach the server network.<strong>GateKeeper</strong> <strong>is</strong> not required if the client transport type <strong>is</strong> one of the server l<strong>is</strong>tening10 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Where to deploy <strong>GateKeeper</strong>transport types. For example, the client sends IIOP messages and the server alsol<strong>is</strong>tens to IIOP.If the server does not l<strong>is</strong>ten to the client's message transport type, <strong>GateKeeper</strong> <strong>is</strong>required in any network within N s and N n . <strong>GateKeeper</strong> acts as a proxy to relay clientmessages of type M to one of the server l<strong>is</strong>tener types (L). For example, M (clientmessage transport type) <strong>is</strong> IIOP over HTTP and L (server l<strong>is</strong>tener type) <strong>is</strong> IIOP.Case 3: Overlapping of reachable networks by client and to server, c >= sWhen c >= s, the client transport type (M) and the server l<strong>is</strong>tener type (L) must bedifferent. Deploy <strong>GateKeeper</strong> in any network between N s and N c inclusively. In th<strong>is</strong>case, <strong>GateKeeper</strong> acts as a proxy to relay client messages of type M to the serverl<strong>is</strong>tener port of type L. As an example, the client's IIOP over HTTP messages can reachthe networks up to N c . IIOP messages sent from any network between N s and N n canreach the server. Deploying <strong>GateKeeper</strong> in between N s and N c will help bind theclient's IIOP over HTTP messages to the server's IIOP l<strong>is</strong>tener port.Case 4: No overlapping of reachable networks by client and to server, c < sCheck if <strong>GateKeeper</strong> chaining <strong>is</strong> possible or not. See “Chaining of <strong>GateKeeper</strong>s” fordetails of <strong>GateKeeper</strong> chaining. <strong>GateKeeper</strong> chaining <strong>is</strong> possible only when there <strong>is</strong>another transport type (K) available for the two <strong>GateKeeper</strong>s to communicatesuccessfully from N c to N s . Deploy one <strong>GateKeeper</strong> on network (N c) and another<strong>GateKeeper</strong> on network N s . After which, chain them together. For example, clientsends IIOP over HTTP messages, the server l<strong>is</strong>tens to IIOP messages and both<strong>GateKeeper</strong> instances can use SSL to communicate with each other. The client2: Configuring <strong>GateKeeper</strong> and internetworking devices 11


Configuring a multi-homed hostconnects to <strong>GateKeeper</strong> 1 using HTTP, <strong>GateKeeper</strong> 1 communicates with <strong>GateKeeper</strong>2 using SSL, and <strong>GateKeeper</strong> 2 communicates with the server using IIOP.If chaining <strong>is</strong> not possible, there <strong>is</strong> no suitable network to deploy <strong>GateKeeper</strong>. Theinternetworking devices connecting networks N c and N s must be reconfigured so thatthe appropriate type of messages can be forwarded from N c to N s . After which, locatethe new N c and N s , and refer to the previous cases accordingly.Configuring a multi-homed hostA multi-homed host or router connects two or more physical networks. It has multiplenetwork interfaces; also known as Network Interface Cards (NIC). Each NIC connectsto one network. The multi-homed host allows communication between the connectednetworks. The following diagram shows a network configuration with two multi-homedhosts (Gateway A and Gateway B).12 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring a multi-homed hostFigure 2.3Multi-home machine network configuration.To enable a multi-homed host to route data packets from one network to anothercorrectly, IP-forwarding must be enabled and its routing table must be configuredcorrectly. Similarly, the routing tables on the hosts must be configured correctly.Assuming a client located on Host 1 <strong>is</strong> trying to communicate with a server located onHost 3, the client on Host 1 will first send the message to Host 3 on Network 2.Gateway A will accept the message on NIC 2 and route it to Network 3 using NIC 3.Gateway B will then accept the message on NIC 4 and route it to Network 4 using NIC5. The message will then reach the server object on Host 3. Th<strong>is</strong> communication canhappen only if IP-forwarding <strong>is</strong> enabled and all the routing tables are configuredcorrectly.Enable IP-forwardingThe multi-homed host must enable IP-forwarding to forward data packets from onenetwork to another. If IP-forwarding <strong>is</strong> d<strong>is</strong>abled, the multi-homed host cannot forward orroute data packets from one network to another.Routing tableOne entry of the routing table <strong>is</strong> used for one destination host or network. Every entrymust contain: information about the:– destination host or network– gateway it should contact.– interface where the data packets should be sent out.The following tables show examples of routing tables for the sample networkconfiguration.Destination Gateway InterfaceNetwork 1 Gateway A NIC 1Network 2 Gateway A NIC 2Network 3 Gateway A NIC 3Network 4 Gateway B NIC 3Destination Gateway InterfaceNetwork 1 Gateway A Host 1Network 2 Host 1 Host 12: Configuring <strong>GateKeeper</strong> and internetworking devices 13


Configuring the firewallDestination Gateway InterfaceNetwork 3 Gateway A Host 1Network 4 Gateway A Host 1Destination Gateway InterfaceNetwork 1 Gateway A Host 2Network 2 Gateway A Host 2Network 3 Host 2 Host 2Network 4 Gateway B Host 2A routing table in the multi-homed host stores the routing information about which NICto forward data packets to. The gateway information <strong>is</strong> used to contact the nextgateway in the route. (Refer to the routing table for Gateway A in the exampledescribed above.) Using NIC 3, Gateway A has to contact Gateway B to route packetsto Network 4.Hosts also have their own routing table. The gateway information <strong>is</strong> essential for thehost to contact the correct gateway which can route the packet correctly. (Refer to therouting table for Host 2). Host 2 needs to contact Gateway A to reach Network 1 andNetwork 2. But, Network 2 has to contact Gateway B in order to reach Network 4.Use the following methods to verify if the routing table <strong>is</strong> configured correctly:– Print the routing table.– Ping the relevant host.– Perform a trace route to the relevant host.Configuring the firewallA firewall <strong>is</strong> a network device that performs filtering of data packets. A firewall inspectsevery data packet it receives and then either forwards the packet or drops it dependingon the firewall's security policy.Case 1: Restricted client transport typeThe following figure shows an example of firewall packet filtering.The firewall's security policy usually inspects the message type, message source, andmessage destination to perform filtering. Firewalls are capable of applying packet-filterrules based on the type of service (example: stream-oriented or datagram-packets)and the underlying protocol type (example: IP, ICMP, TCP, UDP). Suppose that thefirewall identifies the communication path as a TCP packet stream, then the firewall14 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Using Network Address Translation (NAT)can apply the packet-filtering rule defined in the security policy to decide if the packetshould be allowed or dropped. The TCP packet streams can carry different kinds ofdata or payloads (example: HTTP, IIOP, FTP, SSL, etc). In general, each stream <strong>is</strong>assigned a unique port number, and it carries only one class or type of message. Forexample, IIOP messages can be carried on TCP Port 683 packet stream. Similarly,HTTP messages can be carried on TCP Port 80. The firewall may allow TCP Port 80,but may not allow TCP Port 683 depending on the packet-filtering rules. Using specialtechniques, a TCP packet stream can carry more than one type of messages.<strong>GateKeeper</strong> uses a special technique, called HTTP Tunnelling, to embed IIOPmessages within HTTP messages to be carried over TCP packet streams.When a firewall ex<strong>is</strong>ts in the communication path between the client and server, thefirewall may either forward or drop the data packets sent from the client to the server.For a successful communication between the client and server, the firewall mustforward the client's messages to the server. The server can be a user application,<strong>GateKeeper</strong>, or other V<strong>is</strong>iBroker service providers such as the Smart Agent and theNaming Service. Configure the firewall to forward client's messages sent to the server'sl<strong>is</strong>tener port.Using Network Address Translation (NAT)Configuring <strong>GateKeeper</strong>A multi-home host, router, and firewall can also perform NAT in addition to theirspecialized functions. NAT can translate the source host address, source port number,destination host address, and destination port number found in every network packet.On the client side, the firewall usually translates the source host address. Th<strong>is</strong> method<strong>is</strong> commonly used to share a limited number of internet IP address.On the server side, the firewall may translate the destination host address and/or thedestination port number. Th<strong>is</strong> hides the real destination host address from externalparties. It provides the flexibility to change the destination host address withoutnotifying all external parties that must access the server. Th<strong>is</strong> flexibility holds true forthe port number as well.<strong>GateKeeper</strong> supports only static NAT, it does not support dynamic NAT. In static NAT,the translation <strong>is</strong> based on a predefined mapping table in which every address and port<strong>is</strong> always translated to a fixed value. In dynamic NAT, some rules can be set totranslate addresses and ports to a range of values where the exact translated addressof the network packet cannot be pre-determined because it can be any address withina given range.See “Configuring user programs” for details on how to configure server objects to useTCP firewall with NAT. Be sure that the NAT translation mappings are added into theNAT device for successful communication between client and server objects.With NAT, the routing tables for all the gateways involved must be configured toaccount for any fake network addresses in use. If not, the data packets having fakedestination addresses will not be routed correctly. In addition, firewalls must beconfigured to forward messages to any fake destination host addresses and fake portsused in NAT. If firewalls block the fake address or fake port, a packet will not reach itsdestination.The following sections describe how to configure <strong>GateKeeper</strong> ports and services.L<strong>is</strong>tener ports are the most common parameters that must be configured. Differentfirewalls usually do not open the same range of ports for communications. <strong>GateKeeper</strong>has many services and some of them must be enabled before they can be used.L<strong>is</strong>tener portsThe following properties specify <strong>GateKeeper</strong>'s exterior IIOP and HTTP l<strong>is</strong>tener portnumbers. These are the ports on which <strong>GateKeeper</strong> l<strong>is</strong>tens to client requests.vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=80882: Configuring <strong>GateKeeper</strong> and internetworking devices 15


Configuring <strong>GateKeeper</strong>If <strong>GateKeeper</strong> <strong>is</strong> deployed behind a firewall, external clients can only contact<strong>GateKeeper</strong> if the firewall allows forwarding of IIOP or IIOP over HTTP messagesthrough ports 683 and 8088, respectively. If the firewall can only allow other portnumbers because of security restrictions, the <strong>GateKeeper</strong> l<strong>is</strong>tener ports must beconfigured to use the authorized ports on the firewall.Admin<strong>is</strong>trative service<strong>GateKeeper</strong>'s admin<strong>is</strong>trative service provides the ability for you to use the V<strong>is</strong>iBrokerConsole to manage and configure <strong>GateKeeper</strong>. The admin<strong>is</strong>trative service allowsdynamic configurations of <strong>GateKeeper</strong> while <strong>GateKeeper</strong> <strong>is</strong> active. The followingproperties specify the admin<strong>is</strong>trative service port numbers; 0 and 9091 are the defaultvalues for IIOP port and HTTP port, respectively. The value 0 tells <strong>GateKeeper</strong> to picka port at random when it starts.vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=0vbroker.se.iiop_tp.scm.hiop_ts.l<strong>is</strong>tener.port=9091Enabling callbacks (V<strong>is</strong>iBroker 3.x style)The callback feature (V<strong>is</strong>iBroker 3.x style) has been replaced with bidirectional supportin V<strong>is</strong>iBroker versions 4.x and later. For <strong>GateKeeper</strong> to support clients that still useV<strong>is</strong>iBroker 3.x callbacks, the following properties settings are required:vbroker.gatekeeper.callbackEnabled=truevbroker.gatekeeper.backcompat.callback=trueAfter setting the above properties, <strong>GateKeeper</strong> activates its interior server engine toreceive callback messages from the server. The l<strong>is</strong>tener can be configured using thein-iiop and in-ssl SCMs. In addition, a callback l<strong>is</strong>tener <strong>is</strong> activated for a client toestabl<strong>is</strong>h an additional communication channel for callback messages. See “V<strong>is</strong>iBroker3.x style callback” for details on specifying the l<strong>is</strong>tener port and additional relatedinformation. Be sure the selected ports are reachable from the client and the server byensuring that these ports are not blocked by any firewalls.Enabling pass-through connectionsThe following property enables pass-through connections in <strong>GateKeeper</strong>.vbroker.gatekeeper.enablePassthru=trueIf the client requests a pass-through connection, <strong>GateKeeper</strong> will not examine anymessages that pass between the server and client. When the above property <strong>is</strong> set tofalse, <strong>GateKeeper</strong> binds the client to the server using normal (non-pass-through)connections even when the client requests a pass-through connection. In th<strong>is</strong> case,<strong>GateKeeper</strong> examines the exchanged messages for routing and binding purposes.The following properties are provided to help configure pass-through connections in<strong>GateKeeper</strong>:vbroker.gatekeeper.passthru.blockSize=16384vbroker.gatekeeper.passthru.connectionTimeout=0vbroker.gatekeeper.passthru.logLevel=0vbroker.gatekeeper.passthru.streamTimeout=2000vbroker.gatekeeper.passthru.inPortMin=1024vbroker.gatekeeper.passthru.inPortMax=165535vbroker.gatekeeper.passthru.outPortMin=0vbroker.gatekeeper.passthru.outPortMax=65535See “Support for pass-through connections” for more information about the aboveproperties.16 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring <strong>GateKeeper</strong>CautionThe pass-through feature heavily taxes the resources of <strong>GateKeeper</strong>. If you choose touse th<strong>is</strong> feature, be sure to configure <strong>GateKeeper</strong> with sufficient memory andincreased sockets.Enabling the location service<strong>GateKeeper</strong> provides a location service for clients, such as applets, that are unable tocommunicate directly with the Smart Agent (osagent) because of Java sandboxsecurity or ex<strong>is</strong>ting firewalls. The location service lets the clients “bind” to the serverthrough <strong>GateKeeper</strong>.vbroker.gatekeeper.locationService=trueSpecifying the Smart Agent (osagent)<strong>GateKeeper</strong> uses the Smart Agent to locate server objects. <strong>GateKeeper</strong> canautomatically locate the Smart Agent if one <strong>is</strong> located on the same network. Whenthere <strong>is</strong> no Smart Agent running on the same network where <strong>GateKeeper</strong> <strong>is</strong> running,the location of the Smart Agent must be specified explicitly. You can also specifyadditional Smart Agents running on other networks.vbroker.agent.addr=vbroker.agent.addrfile=vbroker.agent.port=The first property specifies the host IP address of the Smart Agent. The secondproperty specifies the file that defines a l<strong>is</strong>t of hosts running Smart Agents. The thirdproperty specifies the OSAGENT_PORT. The default value for the first two properties <strong>is</strong> null,which tells <strong>GateKeeper</strong> to contact the Smart Agent running on the same network.See “Using the Smart Agent” in the V<strong>is</strong>iBroker for C++ Developer's Guide or theV<strong>is</strong>iBroker for Java Developer's Guide for more details about Smart Agent settings andother methods of setting Smart Agent parameters.Specifying the Object Activation Demon (OAD)The OAD service enables <strong>GateKeeper</strong> to automatically start servers to which it needsto bind. In such cases, the server <strong>is</strong> reg<strong>is</strong>tered with the OAD service, but <strong>is</strong> accessibleonly through <strong>GateKeeper</strong> (when an Applet invokes a server, for example). To use theOAD service, <strong>GateKeeper</strong> must load the OAD IOR. The following property tells<strong>GateKeeper</strong> where to locate the OAD IOR.vbroker.oad.iorFile=See “Using the Object Activation Daemon” in the V<strong>is</strong>iBroker for C++ Developer's Guideor the V<strong>is</strong>iBroker for Java Developer's Guide for more information about OAD.Configuring <strong>GateKeeper</strong> server engines<strong>GateKeeper</strong> contains a few default server engines. Each server engine contains atleast one server connection manager (SCM).– The exterior server engine enables <strong>GateKeeper</strong> to bind client objects to serverobjects. It contains two default SCMs which are named ex-hiop and ex-iiop.– The interior server engine provides callback services and <strong>is</strong> only available whencallback <strong>is</strong> enabled. It contains two default SCMs which are named in-iiop and inssl.– The iiop_tp server engine provides the admin<strong>is</strong>trative service. It contains two defaultSCMs, which are named hiop_ts and iiop_tp.See “Exterior server engine” , “Interior server engine” and “Admin<strong>is</strong>tration” for the fulll<strong>is</strong>t of properties for the above SCMs.2: Configuring <strong>GateKeeper</strong> and internetworking devices 17


Configuring <strong>GateKeeper</strong>Security servicesStart <strong>GateKeeper</strong> with the following properties to enable IIOP/SSL and IIOP overHTTPS:vbroker.security.d<strong>is</strong>able=falsevbroker.orb.dynamicLibs=com.borland.security.hiops.Initvbroker.se.exterior.scms=ex-iiop,ex-hiop,ex-ssl,ex-hiops– The vbroker.security.d<strong>is</strong>able=false property enables the required security packagesinto the V<strong>is</strong>iBroker ORB of the <strong>GateKeeper</strong>.– The vbroker.orb.dynamicLibs=com.borland.security.hiops.Init property loads theadditional HIOPS package, which allows IIOP messages over HTTPS; it <strong>is</strong> loadedseparately.– The vbroker.se.exterior.scms=ex-iiop,ex-hiop,ex-ssl,ex-hiops property adds theSCM ex-ssl and ex-hiops into the exterior server engine.The unused SCM can be removed from the SCM l<strong>is</strong>t so that only required SCMs arestarted. However, scm ex-iiop and in-iiop can not be removed from the l<strong>is</strong>t when theyinitially ex<strong>is</strong>t.To make sure all communication <strong>is</strong> encrypted, you can d<strong>is</strong>able the nonsecure l<strong>is</strong>tenerports such as IIOP and HTTP as follows:vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPvbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPThe IIOP/SSL and HTTPS l<strong>is</strong>teners can be configured using the SCM propertiesprefixed with vbroker.se.exterior.scm.ex-hiops and vbroker.se.exterior.scm.ex-ssl.For a comprehensive l<strong>is</strong>t of these SCM properties, refer to the “<strong>GateKeeper</strong>properties.”SSL Transport Identity and TrustpointFor SSL, transport identity <strong>is</strong> optional as SSL negotiation still can make use of a DiffieHelman key agreement algorithm without someone's public key.However, without transport identity clients configured with peerAuthenticationModerequire and require_and_trust will not connect. Additionally, as an SSL server, if<strong>GateKeeper</strong> itself does not have a client transport identity, it may not require clienttransport identities.Installing SSL Identity using Wallet propertiesThe simplest way of installing certificates in <strong>GateKeeper</strong> <strong>is</strong> by using the following walletproperties:vbroker.security.wallet.type=Directory:vbroker.security.wallet.identity=vbroker.security.wallet.password=vbroker.security.trustpointsRepository=Directory:Installing SSL Identity on <strong>GateKeeper</strong> using Certificate LoginApart from using simple wallet and trustpoints property sets, SSL Identity can beinstalled on the <strong>GateKeeper</strong> during startup by means of credential acqu<strong>is</strong>itions (login).In the acqu<strong>is</strong>ition, the user must answer questions about files and directories, wherethe certificates, private key and trusted root certificates are stored. The password todecrypt the private key will definitely be asked.The files and directories asked in the login conversation vary based on the type ofcertificate storage. The default storage <strong>is</strong> determined by JDK security settings in thefollowing file:${JAVA_HOME}/jre/lib/security/java.securityOut of the JDK box, jks <strong>is</strong> set as java keystore (jks):18 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring <strong>GateKeeper</strong>## Default keystore type.#keystore.type=jksFor PKCS#12 storage, the above can be changed to string pkcs12. Th<strong>is</strong> storage format<strong>is</strong> only a single file, which contains certificates, trusted certificates and a private key.Please consult the JDK keytool manual.For certificate login, the followings needs to be explicitly set on <strong>GateKeeper</strong>:vbroker.security.login=truevbroker.security.login.realms=In the realm l<strong>is</strong>t, among other realms, there needs to be Certificate#CLIENT and/orCertificate#SERVER and/or Certificate#ALL.– Certificate#CLIENT <strong>is</strong> an SSL identity that <strong>is</strong> used for outgoing SSL connections,– Certificate#SERVER <strong>is</strong> for incoming SSL connections,– and Certificate#ALL can be used for both.One extreme example <strong>is</strong> when in the there appears all three realms. In th<strong>is</strong>case, three different sets of SSL identities will be acquired from the user during<strong>GateKeeper</strong> startup.When opening an outgoing SSL connection:1 first Certificate#CLIENT will be used.2 If none <strong>is</strong> set in Certificate#CLIENT, then Certificate#ALL will be used.3 If there <strong>is</strong> also none set in Certificate#ALL, the outgoing SSL connection will haveno identity.NoteSimilar priority also applies to incoming (server) SSL connection.The identity that <strong>is</strong> set using a simple wallet property set will always go intoCertificate#ALL.Setting peerAuthenticationModeUse the peerAuthenticationMode policy as usual. Set the property as follows:vbroker.security.peerAuthenticationMode=noneApplet and Java WebstartThe Java programming language <strong>is</strong> a powerful tool for the development of programsthat are deployed and run on the fly from one central location. Th<strong>is</strong> becomes a verypowerful feature when combined with CORBA, more specifically with V<strong>is</strong>iBroker forJava.Clients code can be downloaded on the fly and installed from a website as either aJava applet or a Java webstart application utilizing Java Network Launching Protocol(JNLP).V<strong>is</strong>iBroker settings on a typical applet clientIf the client <strong>is</strong> an applet, the following additional property settings are required:2: Configuring <strong>GateKeeper</strong> and internetworking devices 19


Configuring <strong>GateKeeper</strong>...Note1 All V<strong>is</strong>iBroker jars do not need to be in the <strong>GateKeeper</strong> http root directory (thecurrent directory where you launch <strong>GateKeeper</strong>).2 Licensing jars: lm.jar,sanct4.jar,sanctuary.jar are needed only when the appletcode creates pers<strong>is</strong>tent POAs.3 When V<strong>is</strong>iSecure functionality <strong>is</strong> involved, vbsec.jar <strong>is</strong> needed in the applet'sarchive l<strong>is</strong>t. The applet parameter that enables it <strong>is</strong> also needed. Optionally, whenHIOPS functionality <strong>is</strong> involved, it needs to be loaded separately using dynamicLibsas above.V<strong>is</strong>iBroker Application Deployed as a Java WebstartA Java webstart application can run without a web browser because it has its ownlauncher, which can be launched directly from a command shell on UNIX or by doubleclickingon Windows. Th<strong>is</strong> launcher <strong>is</strong> the default mime handler for application/x-javajnlp-filewhich <strong>is</strong> associated automatically when installing JDK/JRE on Windows and byany other means on UNIX. Therefore, clicking a link on a web page that results in anyhttp response with that mime will launch the installed Java webstart launcher forprocessing the content of that reply. The content <strong>is</strong> actually an XML containinginformation about where to locate the required jars and other information pertaining torunning the application. For example, the required java security perm<strong>is</strong>sions.For a typical V<strong>is</strong>iBroker application deployed as a java webstart, please see thegatekeeper bank_jws example.20 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring user programsTh<strong>is</strong> chapter shows how to configure the user programs (clients and servers) to usefirewalls and <strong>GateKeeper</strong>. The settings are configured through the client and serverproperties. See Appendix A for information on how to set the properties.Using objects behind firewallsYou may need to configure both programming and runtime environments so thatobjects can work behind firewalls. Configuring firewall policies for a specific PortableObject Adapter (POA) must be done programmatically. Setting the same firewallpolicies globally for all POAs, however, can be accompl<strong>is</strong>hed using a single propertysetting and does not require source code modifications.Programming a single POAJavaTo allow a server to traverse a firewall when you want to configure firewall policies for aspecific POA, you must specify a firewall policy on the POA where the server <strong>is</strong>activated. In particular, the following code must be added to the server. (The followingexamples use the Bank example as a bas<strong>is</strong>.)To configure a single POA programmatically:1 Create the firewall policy:org.omg.CORBA.Any fw_policy_value = orb.create_any();com.inpr<strong>is</strong>e.vbroker.firewall.FirewallPolicyValueHelper.insert(fw_policy_value, com.inpr<strong>is</strong>e.vbroker.firewall.EXPORT.value);org.omg.CORBA.Policy firewall_policy = orb.create_policy(com.inpr<strong>is</strong>e.vbroker.firewall.FIREWALL_POLICY_TYPE.value, fw_policy_value);org.omg.CORBA.Policy[] policies = {firewall_policy,rootPOA.create_lifespan_policy(LifespanPolicyValue.PERSISTENT)};3: Configuring user programs 21


Using objects behind firewallsC++CORBA::PolicyL<strong>is</strong>t policies;policies.length(2);policies[(CORBA::ULong)0] = rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);CORBA::Any policy_value;policy_value create_POA("bank_agent_poa",poa_manager, policies);Only the root POA takes the default policy, so it can be used to activate any server thatmust be accessed behind a firewall. You must also create another POA to activate theAccount server. Since the Account server should not be bound by clients directly, youshould create the POA as a transient POA:Java policies = new org.omg.CORBA.Policy[] {firewall_policy,rootPOA.create_lifespan_policy(LifespanPolicyValue.TRANSIENT)};C++POA accountPOA = rootPOA.create_POA("account_agent_poa", rootPOA.the_POAManager(), policies);policies.length(2);policies[(CORBA::ULong)0] = rootPOA->create_lifespan_policy(PortableServer::TRANSIENT);policies[(CORBA::ULong)1] = fpolicy;PortableServer::POA_var accountPOA = rootPOA->create_POA("account_agent_poa",poa_manager, policies);Configuring the firewall policy for all POAs associated witha serverThe following property lets you set the firewall policy for all POAs associated with aserver:-Dvbroker.orb.exportFirewallPath=trueIf you specify the exportFirewallPath property, you do not need to add a firewall policywhen creating a POA and therefore, you do not have to modify the source code.Loading a firewall package at runtimeJavaC++JavaC++The clients and servers working with <strong>GateKeeper</strong> must load the firewall package andits properties at runtime when it first initializes the ORB which <strong>is</strong> when the followingmethod <strong>is</strong> invoked.org.omg.CORBA.ORB.init(String[] args,java.util.Properties property);CORBA::ORB_ptr CORBA::ORB_init(int& argc, char *const *argv);The following property causes the firewall package to be loaded into the V<strong>is</strong>iBroker forJava ORB. Gatekeeper does not need to load firewall.Init package as it has definedthe firewall components.vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.InitSupport for <strong>GateKeeper</strong> and firewall has been incorporated into the V<strong>is</strong>iBroker for C++ORB and no additional libraries are needed to enable it.22 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring client propertiesConfiguring client propertiesJava:Java:The method in which a client communicates with a server can be restricted. Inparticular, using policies and properties, you can specify whether:– Clients use a <strong>GateKeeper</strong> as a proxy for the real server– Clients communicate to servers in the HTTP-tunneled channel– Clients communicate to servers through IIOP/SSL– Clients communicate to servers through HTTPS-tunneled channel– Messages pass between client and server connections through a <strong>GateKeeper</strong>entirely unexamined by the <strong>GateKeeper</strong> (called pass-through mode)– Clients choose the preferred transport from those availableNote about HTTP-tunneled channel:V<strong>is</strong>iBroker for Java extension for IIOP that <strong>is</strong> tunneled through http protocol <strong>is</strong> calledHIOP. In th<strong>is</strong> mode, the ORB <strong>is</strong> able to tunnel only one request at a time. So if there areconcurrent threads in the client making simultaneous requests, the ORB serializesthose requests. And thus, the requests coming into the server are also serialized. Thenumber of simultaneous requests seen in the server will match the number of Orbs onthe client, when client(s) use HTTP tunneling. Th<strong>is</strong> <strong>is</strong> a limitation of using HTTPtunneling on the client.The following sections show the various policies and their property settings for theclients. You can also use different combinations of these policies to determine how youwant your client to communicate to the servers.Specify always proxy on a clientThe following property setting forces clients to use <strong>GateKeeper</strong> to proxy requests toservers.Client's Properties:vbroker.orb.alwaysProxy=trueThe above property <strong>is</strong> optional. If you do not set it, the client uses the server's IOR todetermine whether or not the object <strong>is</strong> hidden behind a server-side firewall andtraverses the firewall accordingly. It <strong>is</strong> sometimes better to not set the above property,for example, when a client invokes both local objects inside the trusted network andremote objects hidden behind the firewall. Not setting the property enables the client tobe more efficient by invoking the local objects directly without going through<strong>GateKeeper</strong>.Client's Properties:vbroker.orb.gatekeeper.ior=Clients can also specify the <strong>GateKeeper</strong> IOR using the above property. Th<strong>is</strong> method <strong>is</strong>helpful when a client <strong>is</strong> not able to locate <strong>GateKeeper</strong> through a Smart Agent.Specify HTTP tunneling on a clientThe following property setting directs clients to communicate to servers in the HTTPtunneledchannel.Client's Properties:vbroker.orb.alwaysTunnel=trueLimitation of tunneling: The http protocol requests from being multiplexed on sameconnection. The ORB <strong>is</strong> able to tunnel only one request at a time. So if there areconcurrent threads in the client making simultaneous requests, the ORB serializesthose requests. And thus, the requests coming into the server are also serialized.3: Configuring user programs 23


Configuring client propertiesJavaThe number of simultaneous requests seen in the server will match the number ofORBs on the he, when client(s) use HTTP tunneling. Th<strong>is</strong> <strong>is</strong> a limitation of using HTTPtunneling on the client.The above setting causes the client applet or application to communicate to the<strong>GateKeeper</strong> through IIOP over HTTP and <strong>GateKeeper</strong> relays the request to the actualserver object through IIOP. Replies from the server object to <strong>GateKeeper</strong> arecommunicated through IIOP. <strong>GateKeeper</strong> then forwards those replies to the clientthrough IIOP over HTTP.Applets should set vbroker.orb.alwaysTunnel if the client will be performing HTTPtunneling. Applet clients must set the property vbroker.orb.gatekeeper.ior to get the<strong>GateKeeper</strong>'s IOR using URL naming or using a stringified IOR. In addition, the appletclients must not set the vbroker.locator.ior property.NoteYou cannot use callbacks with HTTP tunneling.CautionHTTP tunneling may not work cons<strong>is</strong>tently with various types of proxy servers becauseof differences that may ex<strong>is</strong>t in the implementation of HTTP proxy servers. Please referto the V<strong>is</strong>iBroker <strong>GateKeeper</strong> FAQ on <strong>Borland</strong>'s web site for more information.Specify secure connections on a clientClient's Properties:vbroker.orb.alwaysSecure=trueClients talk to servers through IIOP/SSL or IIOP over HTTPS.Client's Properties:vbroker.orb.alwaysSecure=truevbroker.orb.alwaysTunnel=trueClients only talk to servers using IIOP over HTTPS.Specify pass-through connections on a clientIn th<strong>is</strong> type of connection, <strong>GateKeeper</strong> does not terminate connections or interpretmessages. Th<strong>is</strong> type of connection <strong>is</strong> useful when <strong>GateKeeper</strong> does not have SSL orthe associated certificates to establ<strong>is</strong>h trust with the client. In such cases, the client andserver negotiate their SSL connection without going through <strong>GateKeeper</strong>. Therefore,<strong>GateKeeper</strong> does not interpret messages passed between the client and the server.Client's Properties:vbroker.orb.proxyPassthru=true<strong>GateKeeper</strong>'s Properties:vbroker.gatekeeper.enablePassthru=true– The vbroker.orb.proxyPassthru property sets the value of the ORB-levelPROXY_MODE_POLICY property. If set to true, all objects using a proxy on the client willrequest pass-through connections. You can also set the PROXY_MODE_POLICY onspecific objects so that only those particular objects request pass-throughconnections.– The vbroker.gatekeeper.enablePassthru property instructs <strong>GateKeeper</strong> to acceptpass-through connections. Th<strong>is</strong> property <strong>is</strong> global to <strong>GateKeeper</strong> and affects<strong>GateKeeper</strong>'s behavior only.The vbroker.orb.proxyPassthru property tells the client to attempt to acquire passthroughconnections from <strong>GateKeeper</strong>. <strong>GateKeeper</strong>, however, grants pass-throughconnections only if the vbroker.gatekeeper.enablePassthru property <strong>is</strong> set to true. See“Enabling pass-through connections” for other <strong>GateKeeper</strong>'s pass-through properties.24 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring server propertiesEnabling pass-through connectionsIf the vbroker.gatekeeper.enablePassthru property <strong>is</strong> set to false, <strong>GateKeeper</strong> does notallow pass-through connections to be establ<strong>is</strong>hed and clients can only obtain normal(non-pass-through) connections to the server. <strong>GateKeeper</strong> then examines themessages exchanged between the client and server for routing and binding purposes.The connection will fail if <strong>GateKeeper</strong> cannot provide an SSL authentication for an SSLmessage.Specifying the client bid orderClient's Properties:The client's bid order specifies the relative importance for the various transports usedto connect to the server. The transports that appear first will have higher precedence.The following property setting instructs the client to try the transport with the higherprecedence first, whenever it <strong>is</strong> available, in the server's IOR. When a transport fails,the client will try the next available transport.vbroker.orb.bidOrder=inprocess:liop:ssl:iiop:proxy:hiop:locatorIn the above example, if the IOR contains both LIOP and IIOP profiles, the client willfirst try LIOP. Only if LIOP fails will it try IIOP.Client's Properties:vbroker.orb.bidCritical=inprocessThe critical bid has the highest precedence no matter where it <strong>is</strong> specified in the bidorder. If there are multiple critical bids, then their relative importance <strong>is</strong> determined bythe bid order.Specifying a client callback l<strong>is</strong>tener port (for V<strong>is</strong>iBroker 3.x style)The following properties specify the l<strong>is</strong>tener port of the client for servers to establ<strong>is</strong>hV<strong>is</strong>iBroker 3.x style callback connection. The l<strong>is</strong>tener type <strong>is</strong> set to Callback-IIOP todifferentiate it from a normal IIOP l<strong>is</strong>tener.Client's Properties:vbroker.se.iiop_ts.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.se.iiop_ts.scm.iiop_tp.l<strong>is</strong>tener.type=Callback-IIOPConfiguring server propertiesUse server properties to construct the server's IOR that <strong>is</strong> used by clients to establ<strong>is</strong>hcommunication paths to the server.Specifying the l<strong>is</strong>tener port of the serverThe following sections describe the property settings used to specify a server's l<strong>is</strong>tenerports.Random l<strong>is</strong>tener portThe following property has the default value of 0 (zero) which tells the system to pick arandom port number when the server starts.Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=03: Configuring user programs 25


Configuring server propertiesSpecific l<strong>is</strong>tener portThe following server property assigns the port on which the server will l<strong>is</strong>ten to IIOPmessages from clients.Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=NoteAll clients on the same network can establ<strong>is</strong>h communication with a server using theport, as specified in the above example, directly. Messages sent by clients on differentnetworks must be forwarded by the gateway or router. If a server allows connections byclients outside the subnet, the router or firewall should be configured to allowmessages for the specified port. Conversely, if the server only allows connections fromclients on the same subnet, the router or firewall should be configured to blockmessages for the specified port to prevent unauthorized access by foreign clientobjects.Port translation (NAT)If there <strong>is</strong> a port translation using Network Address Translation (NAT) from a fake port(also called the proxy port) to the server's real IIOP l<strong>is</strong>tener port, use the followingproperty settings to publ<strong>is</strong>h the fake port in the server's IOR.Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=The above settings tell the server to l<strong>is</strong>ten to the real port while clients send messagesto the fake port. The default value of the proxyPort property <strong>is</strong> 0 (zero), which means noproxy port <strong>is</strong> used.NoteA better method of specifying NAT <strong>is</strong> to use the TCP firewall properties described infollowing section.D<strong>is</strong>abling the IIOP portSetting the following property will d<strong>is</strong>able the server's IIOP l<strong>is</strong>tener port which forcesthe server to allow client requests on a specified port, such as a secured port like IIOP/SSL. The server will not allow IIOP messages on the publ<strong>is</strong>hed IIOP port.Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPSpecifying communication paths to the serverThere may be multiple paths for a client's message to reach the server or differentpaths for messages originating from different clients to reach the same server. Allthese possible paths have to be configured in the server's properties so that thegenerated IOR has the information needed for clients to send messages to the server.The following diagram illustrates two paths of firewall configurations and shows thecommunication paths to the server. Configuration X has a chain of two <strong>GateKeeper</strong>s.Configuration Y has a single TCP firewall.26 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Configuring server propertiesFigure 3.1Communication paths to the serverTo configure the server for the configurations shown in diagram above, enter thefollowing information in the server's properties file:1 Declare all firewall paths:vbroker.se.iiop_tp.firewallPaths=x,y2 Identify the components for each path:vbroker.firewall-path.x=a,bvbroker.firewall-path.y=cThe following sections describe how to specify the firewall components.Specify the component of a proxy serverThe following example shows an IIOP proxy across a firewall.Server's Property:vbroker.firewall-path.x=a,bvbroker.firewall.a.type=PROXYvbroker.firewall.a.ior=http://www.inpr<strong>is</strong>e.com/GK/<strong>GateKeeper</strong>.iorvbroker.firewall.b.type=PROXYvbroker.firewall.b.ior=IOR:


Configuring server propertiesremaining last three properties define the fake port for the following message types:IIOP, SSL and HTTP.The TCP firewall specified as component “c” in the above example <strong>is</strong> expected toperform host and port translation (NAT). The TCP firewall must be configured totranslate the fake host to the server's real host and translate all the fake ports to theserver's real l<strong>is</strong>tener ports.Figure 3.2 TCP firewall with NAT28 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Advanced featuresChaining of <strong>GateKeeper</strong>sTh<strong>is</strong> section describes advanced features such as chaining <strong>GateKeeper</strong>s, callbacks,access control, load balancing, fault tolerance and SSL. It also describes the factorsthat can improve the performance of <strong>GateKeeper</strong>.<strong>GateKeeper</strong>s can be chained together to provide paths through the firewalls. There aretwo types of chaining– static chaining– dynamic chaining.Static chaining of <strong>GateKeeper</strong>sIn static chaining, the preceding <strong>GateKeeper</strong> <strong>is</strong> configured to forward messages to thenext <strong>GateKeeper</strong>. The communication path <strong>is</strong> fixed and <strong>is</strong> therefore static.Figure 4.1 Static chaining of <strong>GateKeeper</strong>sIn the figure above, two chained <strong>GateKeeper</strong>s are required to communicate across afirewall. The client applet sends messages to <strong>GateKeeper</strong>1 which will forward themessages across the firewall to <strong>GateKeeper</strong>2. <strong>GateKeeper</strong>1 <strong>is</strong> able to forward themessage to <strong>GateKeeper</strong>2 because it has the Interoperable Object Reference (IOR) of4: Advanced features 29


Callbacks<strong>GateKeeper</strong>2. The IOR of <strong>GateKeeper</strong>2 specifies how to send messages from<strong>GateKeeper</strong>1 to <strong>GateKeeper</strong>2 and thus crosses the firewall.Dynamic chaining of <strong>GateKeeper</strong>sIn static chaining, the communication paths are specified in the <strong>GateKeeper</strong>'s IOR. Indynamic chaining, the communication paths are specified in the server's IOR file. Theclient, if given the server's IOR file, can use the information in the server's IOR to selecta path. The client tries the first path and the next if the first path fails, and so forth.Figure 4.2 Dynamic chaining of <strong>GateKeeper</strong>sIn the figure above, there are two paths from the client to the server. Both paths requirechaining of <strong>GateKeeper</strong>s. The two paths are specified in the server's IOR that the clientreads, the first path <strong>is</strong> tried and on failure the second path <strong>is</strong> tried. The path <strong>is</strong> chosendynamically at runtime.The way to specify the paths to the server <strong>is</strong> described in “Specifying communicationpaths to the server”.CallbacksIn most implementations, requests are initiated by the clients to which the servers replyback. There are also implementations where information must arrive at a client that <strong>is</strong>not in response to a request from the client which can be implemented by creation ofcallback objects. Callback objects can be implemented in the three methods describedbelow.Callbacks without <strong>GateKeeper</strong>The implementation shown in the following figure <strong>is</strong> applicable to cases where theclient and server can communicate in both directions. In these cases, there are eitherno intervening firewalls or the intervening firewalls do not hinder the communicationsbetween the clients and servers.30 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


CallbacksFigure 4.3Using callbacks without <strong>GateKeeper</strong>In the above example, the client creates an object, starts the l<strong>is</strong>tener, generates an IORand sends a request and IOR to the server. The server calls the client's l<strong>is</strong>teners andcreates a callback connection. Subsequently, all messages to the callback objects willbe channel through the callback connection.Callbacks without <strong>GateKeeper</strong> using bidirectional GIOPWith bidirectional IIOP, servers use the client-initiated connections to transmitasynchronous information back to the clients. Servers need not initiate anyconnections to the client.Figure 4.4 Using callbacks with bidirectional GIOP support without <strong>GateKeeper</strong>In the above figure, the client <strong>is</strong> able to establ<strong>is</strong>h a connection directly to the server, butthe server <strong>is</strong> unable to establ<strong>is</strong>h a separate callback connection because of anintervening firewall. Therefore, the client and the server negotiate a bidirectional GIOPconnection and share the initial connection establ<strong>is</strong>hed by the client for IIOP traffic inboth directions.The CORBA specification also adds a new policy to portably control th<strong>is</strong> feature. Formore information about bidirectional communications exclusive of <strong>GateKeeper</strong>, see the<strong>Borland</strong> AppServer Developer's Guide.4: Advanced features 31


CallbacksCallback with <strong>GateKeeper</strong>'s bidirectional supportWith bidirectional IIOP, servers use the client-initiated connections to transmitasynchronous information back to the clients. Servers need not initiate anyconnections to the client. The CORBA specification also adds a new policy to portablycontrol th<strong>is</strong> feature. For information about bidirectional communications exclusive ofthe <strong>GateKeeper</strong>, see the <strong>Borland</strong> AppServer Developer's Guide for more information.Figure 4.5Callback with <strong>GateKeeper</strong>'s bidirectional supportIn the figure above, <strong>GateKeeper</strong> sits between the client and server and therefore it actsas a server for the client and as a client for the server. The Client/<strong>GateKeeper</strong> and the<strong>GateKeeper</strong>/Server communication channels can be set to unidirectional orbidirectional connections.You can also selectively set the channels to unidirectional or bidirectional. If the clientdefines vbroker.orb.enableBiDir=client and the server definesvbroker.orb.enableBiDir=server, the following table describes the type of channels forthe different values of vbroker.orb.enableBiDir for <strong>GateKeeper</strong>.vbroker.orb.enableBiDir= Client <strong>GateKeeper</strong> <strong>GateKeeper</strong> Serverclient unidirectional bidirectionalserver bidirectional unidirectionalboth bidirectional bidirectionalnone unidirectional unidirectionalBidirectional connection exampleAn example that demonstrates <strong>GateKeeper</strong>'s support for bidirectional connections <strong>is</strong>located in the examples/vbroker/bank_bidir subdirectory under the <strong>GateKeeper</strong> for Javainstallation.The Bank BiDir example <strong>is</strong> similar to the Bank Callback example, except that in theBiDir example, bidirectional connections are establ<strong>is</strong>hed between the client,<strong>GateKeeper</strong>, and server. In other words, in the bidirectional implementation, the sameconnection <strong>is</strong> used for both forward invocations as well as callbacks.Th<strong>is</strong> example demonstrates how to:– Configure the client to enable bidirectional connections via the property file.– Program the client to create callback objects that can be passed as arguments toinvocations on server objects.– Configure the server to set up firewall paths containing the server side inboundfirewall via property file. It also demonstrates how to configure the server so that itcan accept bidirectional connections.– Program the server to export the firewall path in server objects IOR.– Configure the <strong>GateKeeper</strong> so that it supports bidirectional connections.32 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


CallbacksThe clientIn th<strong>is</strong> example, the client Client.java:1 Creates a callback object on the POA named callback_poa. (Th<strong>is</strong> callback object willbe invoked by the server through the <strong>GateKeeper</strong>.)2 Binds to the AccountManager object.3 Sends the object reference of th<strong>is</strong> callback object to the server by opening a bankaccount by invoking open() and passing the callback object as an argument.4 Queries the Account object reference obtained for the balance, again passing thecallback object (th<strong>is</strong> time it <strong>is</strong> passed to the balance method).The serverIn the example, the server Server.java:1 Creates a pers<strong>is</strong>tent POA named bank_poa and a transient POA named account_poawith firewall policy value of EXPORT.2 Creates an instance of the AccountManager servant.3 Activates that servant on bank_poa.4 Starts waiting for client requests.5 Responds to the requests by invoking a method on the client-initiated callbackobject through the <strong>GateKeeper</strong>.File nameserver.propertiesclient.properties<strong>GateKeeper</strong>.propertiesDescriptionProperty file used to configure the bank server. In th<strong>is</strong> example, theserver <strong>is</strong> configured to accept l<strong>is</strong>ten points so that the connectionbetween the <strong>GateKeeper</strong> and the server will be bidirectional. To makethe connection unidirectional, either remove the propertyvbroker.orb.enableBiDir or set the value of th<strong>is</strong> property to none. Theother properties in th<strong>is</strong> file are for loading the firewall package and thensetting the firewall path so that server-side objects can be bound andcalled by the client.Property file used to configure the bank client. In th<strong>is</strong> example, theclient <strong>is</strong> configured to publ<strong>is</strong>h its l<strong>is</strong>ten points so that the connectionbetween the client and the <strong>GateKeeper</strong> will be bidirectional. To makethe connection unidirectional, either remove the vbroker.orb.enableBiDirproperty or set its value to none. As with the server, thevbroker.orb.dynamicLibs property <strong>is</strong> set to load in the necessaryfirewall library so that the client request can traverse the <strong>GateKeeper</strong>s.Property file used to configure the <strong>GateKeeper</strong>. In th<strong>is</strong> example, the<strong>GateKeeper</strong> <strong>is</strong> configured to both publ<strong>is</strong>h the l<strong>is</strong>ten points and acceptthe l<strong>is</strong>ten points. Hence, both the client-<strong>GateKeeper</strong> and <strong>GateKeeper</strong>serverconnections will be bidirectional. These connections can beconverted into unidirectional by either removing thevbroker.orb.enableBiDir property or by setting th<strong>is</strong> property to the valuenone.Security considerationsCautionUse of bidirectional IIOP may ra<strong>is</strong>e significant security <strong>is</strong>sues. In the absence of othersecurity mechan<strong>is</strong>ms, a malicious client may claim that its connection <strong>is</strong> bidirectionalfor use with any host and port it chooses. In particular, a client may specify the hostand port of security-sensitive objects not even resident on its host. In the absence ofother security mechan<strong>is</strong>ms, a server that has accepted an incoming connection has noway to d<strong>is</strong>cover the identity or verify the integrity of the client that initiated theconnection. Further, the server might gain access to other objects accessible throughthe bidirectional connection. Th<strong>is</strong> <strong>is</strong> why the use of a separate, bidirectional SCM forcallback objects <strong>is</strong> recommended. If there are any doubts as to the integrity of theclient, it <strong>is</strong> recommended that bidirectional IIOP not be used.4: Advanced features 33


Access controlAccess controlJavaFor security reasons, a server running V<strong>is</strong>iBroker for Java will not use bidirectionalIIOP unless explicitly configured to do so. The propertyvbroker.se..scm..manager.importBiDir gives you control ofbidirectionality on a per-SCM bas<strong>is</strong>. For example, you might choose to enablebidirectional IIOP only on a server engine that uses SSL to authenticate the client, andto not make other, regular IIOP connections available for bidirectional use. (See theProperties section for more information about how to do th<strong>is</strong>.) In addition, on the clientside,you might want to enable bidirectional connections only to those servers that docallbacks outside of the client firewall. To establ<strong>is</strong>h a high degree of security betweenthe client and server, you should use SSL with mutual authentication (setvbroker.security.peerAuthenticationMode to REQUIRE_AND_TRUST on both the client andserver).<strong>GateKeeper</strong> has a rules-based access controller built into it. Th<strong>is</strong> controller can deny orgrant accessibility based on:– operation– signed by– server's host/port– server's subnet– client's host/port– client's subnetAll rules are evaluated in the order in which you specify them. Action <strong>is</strong> taken based onthe first matched rule. If there <strong>is</strong> no matched rule, the default action you specify <strong>is</strong>taken. See “<strong>GateKeeper</strong> properties” for the syntax of the rules.Custom-designed access control in <strong>GateKeeper</strong><strong>GateKeeper</strong> lets you plug-in custom designed Access Control mechan<strong>is</strong>ms. TheAccess Control Manager invokes all Access Controllers specified using <strong>GateKeeper</strong>properties. The Access Control Manager uses the following interface forimplementation of an Access Controller:package com.inpr<strong>is</strong>e.vbroker.gatekeeper.security;public interface AccessController {public void init(org.omg.CORBA.ORB orb, String prefix);}Access Controllers use the TcpConnectionInfo interface to get more information aboutthe Client:package com.inpr<strong>is</strong>e.vbroker.orb;public interface TcpConnectionInfo {public String getLocalHostName();public int getLocalPortNumber();public String getHostName();public int getPortNumber();public long getTotalBytesRead();public long getTotalBytesWrote();public String name();public java.io.InputStream getInputStream();public java.io.OutputStream getOutputStream();}The Access Control Manager calls the init method to initialize the Access Controller.<strong>GateKeeper</strong> supports the following types of Access Controller interfaces:34 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Access control– ObjectAccessController: The <strong>is</strong>ObjectAccessible() method <strong>is</strong> invoked when theclient requests <strong>GateKeeper</strong> to set up a proxy channel (communication path) to theserver object. It should return true if the object <strong>is</strong> accessible:package com.inpr<strong>is</strong>e.vbroker.gatekeeper.security;import com.inpr<strong>is</strong>e.vbroker.orb.TcpConnectionInfo;import com.inpr<strong>is</strong>e.vbroker.IOP.ServiceContext;public interface ObjectAccessController extends AccessController {public boolean <strong>is</strong>ObjectAccessible(TcpConnectionInfo clientInfo,org.omg.CORBA.Object server,ServiceContext[] contexts,byte[]principal);}– OperationAccessController: The <strong>is</strong>OperationAccessible() method <strong>is</strong> invoked whenthe client sends requests through the <strong>GateKeeper</strong>. It should return true if a givenoperation <strong>is</strong> accessible:package com.inpr<strong>is</strong>e.vbroker.gatekeeper.security;import com.inpr<strong>is</strong>e.vbroker.orb.TcpConnectionInfo;import com.inpr<strong>is</strong>e.vbroker.IOP.ServiceContext;public interface OperationAccessController extends AccessController{public boolean <strong>is</strong>OperationAccessible(TcpConnectionInfo clientInfo,TcpConnectionInfo serverInfo,org.omg.CORBA.Object server,Stringoperation,ServiceContext[] services);}You can program an access controller (for example, myAC) and install it on <strong>GateKeeper</strong>using following properties:vbroker.gatekeeper.security.accessControllers=myACvbroker.gatekeeper.security.acl.myAC.type=com.inpr<strong>is</strong>e.vbroker.gatekeeper.security.myACImplvbroker.gatekeeper.security.acl.myAC.rules=vbroker.gatekeeper.security.acl.myAC.default=grantAn Access Controller can be implemented as follows:package com.inpr<strong>is</strong>e.vbroker.gatekeeper.security;import java.util.*;import java.io.*;import com.inpr<strong>is</strong>e.vbroker.orb.TcpConnectionInfo;import com.inpr<strong>is</strong>e.vbroker.orb.ORB;import com.inpr<strong>is</strong>e.vbroker.IOP.ServiceContext;public class myACImpl implementsObjectAccessController, OperationAccessController {public void init(org.omg.CORBA.ORB orb, String prefix) {}public boolean <strong>is</strong>ObjectAccessible(TcpConnectionInfo clt, org.omg.CORBA.Object svr,ServiceContext[] contexts, byte[] principal) {return true;}public boolean <strong>is</strong>OperationAccessible(TcpConnectionInfo clt, TcpConnectionInfo svr,org.omg.CORBA.Object server, String operation,ServiceContext[] services) {return true;}}4: Advanced features 35


Load balancing and fault toleranceThe access control methods or rules can be defined by the implementation.Load balancing and fault tolerance<strong>GateKeeper</strong> <strong>is</strong> most often used to provide a single point of access to the internalnetwork therefore it can become congested or become the single point of failure.These problems can be resolved by clustering <strong>GateKeeper</strong>s to provide a degree offault tolerance and scalability.Load balancingA master <strong>GateKeeper</strong> and one or more slave <strong>GateKeeper</strong>s can be clustered together.The master <strong>GateKeeper</strong> <strong>is</strong> responsible for balancing the load among the slave<strong>GateKeeper</strong>s. The server should export the master <strong>GateKeeper</strong> object reference only.Figure 4.6 Load balancing using <strong>GateKeeper</strong>The figure above shows the property setting for <strong>GateKeeper</strong>1 and the server. Themaster <strong>GateKeeper</strong> can balance the load between a slave <strong>GateKeeper</strong>s on a perobject level. On the object level, each client will be redirected to one of the slave<strong>GateKeeper</strong>s based on the load balancing policy. In general, th<strong>is</strong> will balance the loadmore evenly but potentially use more resources and slower.The default load balance policy <strong>is</strong> round-robin. Th<strong>is</strong> policy, however, can becustomized and <strong>is</strong> available as a standard package. Please contact <strong>Borland</strong> for moreinformation.Additionally, GK2 and GK3 can also have their own slave <strong>GateKeeper</strong>s. In th<strong>is</strong>configuration, a hierarchy of master and slaves can be stacked over one another.Custom-designed load balancing in <strong>GateKeeper</strong>The ORB default implementation of load d<strong>is</strong>tribution uses the round-robin algorithmin which the client request <strong>is</strong> shared among a server and <strong>GateKeeper</strong> in a sequentialorder. The following code example shows a d<strong>is</strong>tributor implementation:package com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext;import java.util.Enumeration;import org.omg.Firewall.GIOPProxy;import com.inpr<strong>is</strong>e.vbroker.orb.*;import com.inpr<strong>is</strong>e.vbroker.util.*;public class MyD<strong>is</strong>tributor implements D<strong>is</strong>tributor {private Enumeration _enum;private UnGuardedVector _servers;public void init(ORB orb, UnGuardedVector v) {_servers = v;36 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Scalability and performance guidelines}_enum = servers.elements();}public synchronized GIOPProxy next() {if (!_enum.hasMoreElements()) {_enum = _servers.elements();}return (GIOPProxy)_enum.nextElement();}The Server Manager can collect current load related information of other <strong>GateKeeper</strong>instances in a master/slave configuration. Based on the available real-time informationfrom the Server Managers, the master <strong>GateKeeper</strong> can reallocate client requests toother <strong>GateKeeper</strong>s. In another scenario, a federation of <strong>GateKeeper</strong>s can exchangeload-stat<strong>is</strong>tics to d<strong>is</strong>tribute the load.Fault toleranceA master <strong>GateKeeper</strong> and one or more backup <strong>GateKeeper</strong>s can be clustered togetherto be viewed as a single <strong>GateKeeper</strong> by the client. There are several ways to clusterthe <strong>GateKeeper</strong>s:– Cluster the <strong>GateKeeper</strong>s as different firewall paths to the server.Th<strong>is</strong> configuration <strong>is</strong> accompl<strong>is</strong>hed similarly to dynamic chaining of <strong>GateKeeper</strong>. Itrequires no changes to the <strong>GateKeeper</strong> configuration; you only need to configurethe server to include all the backup <strong>GateKeeper</strong>s as a firewall path on the serverl<strong>is</strong>tener. Th<strong>is</strong> approach, however, makes the server configuration more complex.– Fold all the backup <strong>GateKeeper</strong>'s object references (profiles) into the master<strong>GateKeeper</strong>'s object reference. When the master <strong>GateKeeper</strong> fails, the client wouldrebind to one of the other backup <strong>GateKeeper</strong>s automatically. Th<strong>is</strong> approach canmake the <strong>GateKeeper</strong>'s object reference very large. The load balancing feature of<strong>GateKeeper</strong> follows th<strong>is</strong> approach.Scalability and performance guidelinesWhen assessing <strong>GateKeeper</strong> performance, it <strong>is</strong> useful to compare a <strong>GateKeeper</strong>scenario (Client-<strong>GateKeeper</strong>-Server) to a direct scenario (Client-Server).NoteHere performance <strong>is</strong> represented as response time and scalability <strong>is</strong> represented asthroughput.The <strong>GateKeeper</strong> scenario requires two connections and thus two invocations. As aresult:– Throughput <strong>is</strong> reduced: It may be reduced by as much as 50 percent whencompared to the direct scenario.– Response Time <strong>is</strong> slowed: Response time will take longer when compared to thedirect scenario. In some cases, it may take up to 200 percent longer.<strong>GateKeeper</strong> performance tuning<strong>GateKeeper</strong> does not introduce any new performance threshold or throughputthreshold which means that <strong>GateKeeper</strong> will have the same performance andthroughput profile as the V<strong>is</strong>iBroker ORB. Because <strong>GateKeeper</strong> <strong>is</strong> a CORBAapplication, it inherits the basic features of the ORB. As such, all ORB specificperformance tuning parameters apply to <strong>GateKeeper</strong> as well. The following areasdescribed below, however, can affect the performance of <strong>GateKeeper</strong>:4: Advanced features 37


Scalability and performance guidelinesBidding mechan<strong>is</strong>mThe client-side ORB can be programmed to select specific bids based on theconstraints set by the user. The order of selection of bids can be specified to speed upthe process of connection establ<strong>is</strong>hment:– Constraint on Bid-Portfolio: The following properties are useful for settingexclusive bids in the case of static chaining of <strong>GateKeeper</strong>:vbroker.orb.alwaysProxyvbroker.orb.alwaysTunnelvbroker.orb.alwaysSecuredFor example, the vbroker.orb.alwaysProxy <strong>is</strong> useful when a specific <strong>GateKeeper</strong> <strong>is</strong>statically chained to another <strong>GateKeeper</strong>. If one <strong>is</strong> very sure that only HTTPTunnelling will be used while chaining the <strong>GateKeeper</strong>s, then setvbroker.orb.alwaysTunnel property can be set to avoid unnecessary bids. When thevbroker.orb.alwaysSecured property <strong>is</strong> set, then the <strong>GateKeeper</strong> will use securecommunication path only while chaining. Please note that these properties are seton the outer <strong>GateKeeper</strong>.– Order of Bid-Selection: The order of the bid can affect the speed of the selection ofa specific bid. For example, if you are certain that most of the connections allowed ona specific <strong>GateKeeper</strong> will be of a secure type, you can place the SSL as the firstentry in the string as follow:vbroker.orb.bidOrder=inprocess:liop:ssl:iiop:proxy:hiop:locator– Specifying high-precedence Bid: You can set the following property to the highestprecedence bid. By default, it <strong>is</strong> set to inprocess in the ORB:vbroker.orb.bids.critical=inprocessCache managementThe following property sets the cache size of <strong>GateKeeper</strong>:vbroker.gatekeeper.cache.size=100Message marshallingBy setting the chunk size of the stream, you can increase the size of messagesexchanged between <strong>GateKeeper</strong> and the client/server application. The chunk size canhave significant impact on the performance of the applications, particularly using HTTPTunnelling:vbroker.orb.streamChunkSize=4096You can try using values such as: 4096, 8192, or 16384. The performance of theapplications may vary depending on the maximum size of the packets on your network.Thread managementDepending on the response needs of <strong>GateKeeper</strong>, different techniques of threadmanagement can be applied, such as thread pooling, thread-per-session, and so forth.By default, the request forwarding IIOP service uses ThreadPool, and the HIOP serviceuses ThreadSession:vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.type=ThreadPoolvbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMax=100vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMin=0vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMaxIdle=300vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.type=ThreadPoolvbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMax=100vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMin=0vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMaxIdle=30038 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> performance propertiesvbroker.se.exterior.scm.ex-hiop.d<strong>is</strong>patcher.type=ThreadSessionConnection managementThe bidirectional GIOP has advantages of using the same communication path forforward and backward communication. Therefore, <strong>Borland</strong> recommends that you usethe vbroker.orb.enableBiDir property setting in callback scenarios. The followingproperties let you optimize connection resource usage (see Appendix A for moredetails):vbroker.se.exterior.scm.ex-iiop.manager.connectionMaxvbroker.se.exterior.scm.ex-iiop.manager.connectionMaxIdlevbroker.se.interior.scm.in-iiop.manager.connectionMaxvbroker.se.interior.scm.in-iiop.manager.connectionMaxIdlevbroker.ce.iiop.ccm.connectionMax should not be used in the context of <strong>GateKeeper</strong>,because <strong>GateKeeper</strong> should be allowed to connect to as many servers as needed as it<strong>is</strong> an intermediate service to potentially many clients. <strong>GateKeeper</strong> must not stopalready connected clients from proceeding with connections to servers just becausethe number of outgoing connections it can open <strong>is</strong> limited. Instead, <strong>GateKeeper</strong> canrestrict the number of clients it <strong>is</strong> willing to service using the following property:vbroker.se.exterior.scm.ex-iiop.manager.connectionMaxvbroker.ce.iiop.ccm.connectionMaxIdle, however, can be used to drop idle connectionsto servers. Th<strong>is</strong> <strong>is</strong> particularly useful when the number of servers the <strong>GateKeeper</strong>would potentially connect to <strong>is</strong> large, the number of connecting clients <strong>is</strong> small, and theclients mainly target only a few servers.Impact of asynchronized invocation of <strong>GateKeeper</strong>Asynchronized invocation of <strong>GateKeeper</strong> does not have a very significant impact onperformance and scalability.<strong>GateKeeper</strong> performance propertiesThere are many properties that affect <strong>GateKeeper</strong>'s performance. Those propertiesrelated to connection, thread type, mode of operation and call type are described here.For more information, see “Performance and load balancing” for additional propertiesthat can be adjusted for better performance.Connection settingsConnection related properties of <strong>GateKeeper</strong> are:vbroker.se..scm..manager.connectionMaxvbroker.se..scm..manager.connectionMaxIdlewhere and represent “exterior, ex-hiop”, “exterior, ex-iiop”, “exterior, exhiops”,“exterior, ex-ssl”, “interior, in-iiop” or “interior, in-ssl”.The first property specifies the maximum number of active connections allowed.Limiting connections conserves <strong>GateKeeper</strong> resources, but may decrease clientperformance. The default <strong>is</strong> no limit.The second property specifies how long an inactive connection <strong>is</strong> idle before it <strong>is</strong>closed. The default <strong>is</strong> 0 which means that inactive connections are never closed.4: Advanced features 39


<strong>GateKeeper</strong> and SSLThread related settingsWhen the d<strong>is</strong>patcher type <strong>is</strong> “ThreadPool”, the following properties of <strong>GateKeeper</strong> canbe tuned:vbroker.se..scm..d<strong>is</strong>patcher.threadMinvbroker.se..scm..d<strong>is</strong>patcher.threadMaxvbroker.se..scm..d<strong>is</strong>patcher.threadMaxIdlewhere and pair <strong>is</strong> “exterior, ex-iiop”, “exterior, ex-ssl”, “interior, in-iiop” or“interior, in-ssl”.The first property “threadMin” specifies how many threads are pre-created so thatrequests can be quickly serviced. The default <strong>is</strong> 0.The second property “threadMax” specifies the maximum number of threads that canbe created so that the system cannot be overloaded with too many threads. The default<strong>is</strong> 100. Any request that cannot be serviced because of too few threads will wait for thenext available thread.The third property “threadMaxIdle” specifies how long (in seconds) a thread <strong>is</strong> idlebefore it <strong>is</strong> destroyed. The default <strong>is</strong> 300 seconds.<strong>GateKeeper</strong> modes<strong>GateKeeper</strong> can run in normal and pass-through mode. The pass-through mode haslower performance because the content of the packets <strong>is</strong> not examined by <strong>GateKeeper</strong>but still consume <strong>GateKeeper</strong>'s resources. In fact, each pass-through connectionneeds exclusive ports throughout the life-span of the connections. A client process canrequest exclusive connection using policies programmatically.<strong>GateKeeper</strong> in its normal mode of operation gives the better performance.The mode <strong>is</strong> normal unless the pass-through <strong>is</strong> enabled by setting the propertyvbroker.gatekeeper.enablePassthru=true.Call types<strong>GateKeeper</strong> and SSLThere are three types of calls:– normal forward calls– bidirectional callbacks– V<strong>is</strong>iBroker 3.x style callbacksBidirectional callbacks use a single connection for both forward calls and callbacks. It <strong>is</strong>more efficient than the V<strong>is</strong>iBroker 3.x style callbacks.Bidirectional callbacks are as efficient as the normal forward calls.NoteSSL <strong>is</strong> a separate optional package; therefore for applets and server objects to run inSSL mode, you must have a SSL component included in their ORB runtime.<strong>GateKeeper</strong> with SSL provides the following security features:– relay IIOP/SSL connections between client and server– support HTTPS tunneling– enable IIOP/SSL callback (V<strong>is</strong>iBroker 3.x Style and bidirectional)– perform authentication on behalf of server– forward credentials40 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Enabling the Security Service in <strong>GateKeeper</strong>Additional properties for setting SSL can also be found in “<strong>GateKeeper</strong> properties.”Figure 4.7SSL connections to <strong>GateKeeper</strong>SSL connections to <strong>GateKeeper</strong>The server determines if the connection uses SSL or a regular IIOP connection. Theclient running in SSL mode may request the connection to be SSL. The server runningin SSL mode, however, requires the client to connect to it in SSL mode.If the client sets vbroker.orb.alwaysSecure=true in its property file, it will always connectto the Server or <strong>GateKeeper</strong> in SSL mode and will not first try other types ofconnections (which may fail if the Server or <strong>GateKeeper</strong> does not accept other types ofconnection). Th<strong>is</strong> shortens the time for connections.Similarly, setting the same property will help <strong>GateKeeper</strong> when it connects to theServer.SSL for forward and bidirectional callsYou can set the following <strong>GateKeeper</strong> properties to enable SSL for calls from the client(applet) to the server object (via the <strong>GateKeeper</strong>):vbroker.se.exterior.host = vbroker.se.exterior.scms = ex-iiop, ex-hiops, ex-sslvbroker.se.exterior.scm.ex-ssl.l<strong>is</strong>tener.port = The applet client opens an SSL connection to the <strong>GateKeeper</strong>. The client-<strong>GateKeeper</strong>communication channel <strong>is</strong> in SSL mode. However, the mode of the <strong>GateKeeper</strong>-servercommunication channel <strong>is</strong> determined by the server. If the server's scm <strong>is</strong> set to SSLmode, the <strong>GateKeeper</strong>-server communication channel will be in SSL mode.Bidirectional calls use the same forward communication paths. However, there <strong>is</strong>additional property setting for bidirectional callbacks.Enabling the Security Service in <strong>GateKeeper</strong>While security <strong>is</strong> turned on by default, th<strong>is</strong> feature applies to the licensing of theSecurity Service only. There are, however, no license checks to turn on the SecurityService.In <strong>Borland</strong> V<strong>is</strong>iBroker, the security <strong>is</strong> turned off by default as specified in the followingproperty:vbroker.security.d<strong>is</strong>able=trueBy setting the following property in V<strong>is</strong>iBroker, the application will prompt for usernameand password for authentication:vbroker.security.login=true4: Advanced features 41


Enabling the Security Service in <strong>GateKeeper</strong>You must create *.config files (examples shown below) to specify the authenticationand realm related parameters.As a generic example of a security enabled <strong>GateKeeper</strong>, the IIOP, IIOP/SSL, HIOP,and HIOPS l<strong>is</strong>teners have been enabled in the following set of properties:gatekeeper.configSystemcom.borland.security.provider.authn.HostLoginModule required REALM=myrealmPRIMARYIDENTITY=true;com.borland.security.provider.authn.ClientSideDataCollection requiredREALM=testrealm;};myrealmcom.borland.security.provider.authn.HostLoginModule required;};anotherrealm {com.borland.security.provider.authn.HostLoginModule required;};gatekeeper.propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.peerAuthenticationMode=nonevbroker.security.secureTransport=falsevbroker.security.trustpointsRepository=Directory:./trustpointsvbroker.gatekeeper.referenceStore=./gkclnt.iorvbroker.orb.enableBiDir=bothvbroker.orb.dynamicLibs=com.borland.security.hiops.Initvbroker.se.exterior.scms=ex-iiop,ex-hiop,ex-ssl,ex-hiopsvbroker.se.exterior.host=143.186.142.21vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=25000vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=25001vbroker.se.iiop_tp.scm.hiop_ts.l<strong>is</strong>tener.port=25002vbroker.se.exterior.scm.ex-ssl.l<strong>is</strong>tener.port=25003vbroker.se.exterior.scm.ex-hiops.l<strong>is</strong>tener.port=25004vbroker.se.interior.scms=in-iiop,in-hiop,in-sslvbroker.se.interior.host=143.186.139.226vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=15001vbroker.se.interior.scm.in-hiop.l<strong>is</strong>tener.port=15002vbroker.se.interior.scm.in-ssl.l<strong>is</strong>tener.port=15003# Enable callback using th<strong>is</strong> <strong>GateKeeper</strong>vbroker.gatekeeper.callbackEnabled=true# Enable VBJ3.x (old style) callback alsovbroker.gatekeeper.backcompat.callback=truevbroker.gatekeeper.backcompat.callback.host=143.186.142.21vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>teners=iiop,sslvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.port=16001vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.type=IIOPCallbackvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.port=1600242 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Enabling the Security Service in <strong>GateKeeper</strong>vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.proxyPort=0vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.type=SSLCallback# Optional: enable <strong>GateKeeper</strong> specific Access Control propertiesvbroker.gatekeeper.security.accessControllers=myACvbroker.gatekeeper.security.acl.myAC.default=grantvbroker.gatekeeper.security.acl.myAC.rules=rule1vbroker.gatekeeper.security.acl.myAC.rule1=grant [operation="*"]# Optional: Identity of <strong>GateKeeper</strong>vbroker.security.wallet.identity=vbroker.security.wallet.password=vbroker.security.wallet.type=Directory:The property settings in the following example tell the client to specifically request asecure transport using <strong>GateKeeper</strong>. The client application collects the username andpassword and sends th<strong>is</strong> conformation to the server via <strong>GateKeeper</strong>.client.configSystem {com.borland.security.provider.authn.ClientSideDataCollection requiredREALM=myrealm;};Client {com.borland.security.provider.authn.ClientSideDataCollection required;};client.propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.login=truevbroker.security.authentication.callbackHandler=com.borland.security.provider.authn.HostCallbackHandlervbroker.security.authentication.config=client.configvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.scms=iiop_tp,sslvbroker.orb.alwaysProxy=truevbroker.orb.alwaysSecure=trueThe property settings in the following example d<strong>is</strong>ables the IIOP l<strong>is</strong>tener and the server<strong>is</strong> assumed to be a secure application that uses SSL transport only:server.configSystem {com.borland.security.provider.authn.HostLoginModule required REALM=myrealmPRIMARYIDEHostITY=true;com.borland.security.provider.authn.ClientSideDataCollection requiredREALM=testrealm;};myrealm {com.borland.security.provider.authn.HostLoginModule required;};anotherrealm {com.borland.security.provider.authn.HostLoginModule required;};4: Advanced features 43


Enabling access to the Naming Service through <strong>GateKeeper</strong>server.propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.login=truevbroker.security.authentication.callbackHandler=com.borland.security.provider.authn.HostCallbackHandlervbroker.security.authentication.config=server.configvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.host=143.186.142.21vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=25000vbroker.se.iiop_tp.scm.ssl.l<strong>is</strong>tener.port=25005vbroker.se.iiop_tp.firewallPaths=intranetvbroker.firewall-path.intranet=first,secondvbroker.firewall-path.internet=firstvbroker.firewall.first.type=PROXYvbroker.firewall.first.ior=http://localhost:16085/gatekeeper.iorvbroker.firewall.second.type=TCPvbroker.firewall.second.host=192.75.11.14vbroker.firewall.second.iiop_port=32000vbroker.firewall.second.hiop_port=32001vbroker.firewall.second.ssl_port=32005Enabling access to the Naming Service through <strong>GateKeeper</strong>To start the Naming Service on a fixed IP address and port, you must set the followingproperties. In the following example, the Naming Service <strong>is</strong> running on the IP hostaddress: 143.186.142.21 and l<strong>is</strong>tener port: 32101:namingservice.propertiesvbroker.agent.addr=143.186.142.21vbroker.agent.port=25873vbroker.orb.logger.output=ns_debug.logvbroker.naming.logLevel=7vbroker.naming.iorFile=ns.iorvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.host=143.186.142.21vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=32010gatekeeper.propertiesvbroker.agent.addr=143.186.142.21vbroker.agent.port=25873vbroker.agent.enableLocator=falsevbroker.orb.initRef=NameService=corbaloc::143.186.142.21:32010/NameServicevbroker.gatekeeper.referenceStore=gkclnt.iorvbroker.se.exterior.host=143.186.142.21vbroker.se.interior.host=143.186.139.226vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=25000vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=25001vbroker.se.iiop_tp.scm.hiop_ts.l<strong>is</strong>tener.port=2500244 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Enabling access to the Naming Service through <strong>GateKeeper</strong>4: Advanced features 45


46 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Troubleshooting <strong>GateKeeper</strong>Th<strong>is</strong> section describes how to obtain debugging information from <strong>GateKeeper</strong> and itsclients and servers. It also highlights potential problems such as incorrect environmentand reg<strong>is</strong>try settings and describes some common tools useful for troubleshooting<strong>GateKeeper</strong>.Preparation for troubleshootingThe following sections describe the preparations that must be done or observed beforetroubleshooting <strong>GateKeeper</strong>.Getting debugging informationComprehensive debugging information can be obtained by setting the properties of theclient, server and <strong>GateKeeper</strong>. The following table shows the relevant settings andwhether they are applicable to the client, server, or <strong>GateKeeper</strong>. The properties mustbe set in their respective properties file.Log levels have numeric levels along with corresponding text values and either can beused to describe the situation. Levels 4 and higher are useful for debugging. Thefollowing table describes the log level values.Log level value Description0 or EMER System <strong>is</strong> unusable. A panic condition.1 or ALERT A condition that should be corrected immediately, such as a corruptedsystem database.2 or CRIT Critical conditions, such as hard device errors.3 or ERR Error conditions.4 or WARNING Warning conditions such as connection failures due to authenticationproblems, such as incorrect password and authorization failures. Th<strong>is</strong> <strong>is</strong> thedefault.5 or NOTICE Conditions that are not critical, but may require special handlingconfiguration settings.6 or INFO Informational such as all user accesses to specific methods requested to theserver.7 or DEBUG Debug information meant to be understood only by the developer. Thesemessages are not internationalized5: Troubleshooting <strong>GateKeeper</strong> 47


Preparation for troubleshootingThe following table describes the property settings useful for debugging <strong>GateKeeper</strong>.Property Description Set in Property Filevbroker.orb.logger.output=vbroker.orb.bufferDebug=truevbroker.orb.debug=truevbroker.orb.warn=vbroker.orb.logLevel=vbroker.orb.logger.appName=vbroker.events.debug=truevbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.gatekeeper.trace.Initvbroker.gatekeeper.trace.demo=truevbroker.agent.debug=truevbroker.locationservice.debug=truevbroker.URLNaming.debug=truevbroker.poa.logLevel=emergLog fileSpecifies the name of the filewhere the log <strong>is</strong> recorded.If not specified, the default <strong>is</strong>gkdebugfile.log.Log information can also besent to stdout.ORBForces the internal buffermanager to d<strong>is</strong>play the buffersused by ORB.ORBD<strong>is</strong>plays debugging from theORBORBSpecifies which warning of aparticular level to be d<strong>is</strong>playedby the ORB. The values canbe 0, 1 or 2. Level 2 willd<strong>is</strong>play warnings of all levels.ORBThe log level can take one ofthe values described above.ORBSpecifies the application nameto be d<strong>is</strong>played in the log.Event ServiceD<strong>is</strong>plays Event Servicediagnostic messages.<strong>GateKeeper</strong>D<strong>is</strong>plays trace informationfrom <strong>GateKeeper</strong>'s built-intrace facility.<strong>GateKeeper</strong> and SmartAgentD<strong>is</strong>plays debugginginformation of interactionsbetween <strong>GateKeeper</strong> and theSmart Agent.Location ServiceD<strong>is</strong>plays debugginginformation of the LocationService.URLNamingD<strong>is</strong>plays debugginginformation of the URLNamingservice loaded in the ORBruntime. Th<strong>is</strong> setting <strong>is</strong> oftenused to detect if the correctIOR <strong>is</strong> retrieved.POAD<strong>is</strong>plays debugginginformation from the POA.<strong>GateKeeper</strong> has exterior,interior and iiop_tp POA.Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Event Service<strong>GateKeeper</strong><strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server, client and<strong>GateKeeper</strong>Server and ServerSide of <strong>GateKeeper</strong>48 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Preparation for troubleshootingProperty Description Set in Property Filevbroker.gatekeeper.passthru.logLevel=vbroker.security.logLevel=Pass-throughD<strong>is</strong>plays debugginginformation of pass-throughmode in <strong>GateKeeper</strong>.Security ServiceD<strong>is</strong>plays logging information ofthe security service such asSSL on <strong>GateKeeper</strong>.<strong>GateKeeper</strong><strong>GateKeeper</strong>Starting <strong>GateKeeper</strong> in debugging modeIn addition to the properties described above, the gatekeeper and vbj command lineutilities can output additional environment and parameter setting information at startup.The -VBJdebug option produces th<strong>is</strong> additional output. The following table showsexamples of the debugging commands:ComponentNoteThe -VBJdebug option affects only the gatekeeper and vbj commands and has norelationship to the diagnostic property settings described above. The diagnosticproperties will produce the same output regardless of whether or not the -VBJdebugoption <strong>is</strong> used.Environment settings<strong>GateKeeper</strong> reads in the environmental variables at startup. On Windows, <strong>GateKeeper</strong>also reads settings in the reg<strong>is</strong>try. The precedence of the settings (UNIX and Windows)<strong>is</strong> as follows:1 command line2 properties file3 environment settingsCommand line options exampleServer vbj -VBJdebug -DORBpropStorage=server.prop Server<strong>GateKeeper</strong> gatekeeper -VBJdebug -J-Dvbroker.orb.debug=true -J-Dvbroker.orb.logLevel=7 -props gk.propClient vbj -VBJdebug -DORBpropStorage=client.prop Client4 system default (Windows only)The following table l<strong>is</strong>ts the common environment variables used by <strong>GateKeeper</strong>.Environment VariableCLASSPATHJAVA_HOMEDescriptionCLASSPATH should include the directories of the Java Development Kitand Java Servlet Development Kit. Specifically, CLASSPATH mustinclude servlet.jar. For example, in Windows NT, at the DOS promptenter:set CLASSPATH=C:\v<strong>is</strong>ibroker\lib\tomcat\common\servlet.jar;c:\bes\jdk\jdk1.4.1\libIf the classpath includes multiple versions of the JDK,compatibility <strong>is</strong>sues may ar<strong>is</strong>e.Specifies the home directory of Java. If the Java directory <strong>is</strong> notdefined in the CLASSPATH environment variable, the system will tryto locate Java libraries from th<strong>is</strong> directory.Note: On UNIX systems, th<strong>is</strong> variable must be set. On Windowssystems, it may be preset in the reg<strong>is</strong>try.5: Troubleshooting <strong>GateKeeper</strong> 49


Preparation for troubleshootingEnvironment VariableJDK_HOMEPATHVBROKERDIRBES_HOMEOSAGENT_PORTBES_LIC_DIRDescriptionSpecifies the home directory of JDK. If the JDK directory <strong>is</strong> notdefined in the CLASSPATH environment, the system will try to locateJDK libraries from th<strong>is</strong> directory.Note: On UNIX systems, th<strong>is</strong> variable must be set. On Windowssystems, it may be preset in the reg<strong>is</strong>try.The PATH environment <strong>is</strong> set automatically during V<strong>is</strong>iBrokerinstallation and should include the directory in which <strong>GateKeeper</strong>ex<strong>is</strong>ts. For example, on Windows, at the command prompt enter:set PATH = c:\bes\vbroker\binSpecifies the home directory of the <strong>GateKeeper</strong> d<strong>is</strong>tribution. Note thatVBROKERDIR points to the V<strong>is</strong>iBroker directory, but not the V<strong>is</strong>iBroker bindirectory. Ensure that the PATH environment variable includes%VBROKERDIR%\bin.Obsolete (replaced by VBROKERDIR)Specifies the port used to contact the Smart Agent. Ensure theappropriate Smart Agent l<strong>is</strong>tens to th<strong>is</strong> port and <strong>GateKeeper</strong> <strong>is</strong> able toreach th<strong>is</strong> port (and the host).Specifies the path of the directory location in which the license datafile ex<strong>is</strong>ts.Tools for troubleshootingThe following table describes some tools that are useful for troubleshooting<strong>GateKeeper</strong>.NamesosfindWindows and UNIX)printior(Windows and UNIX)ping(Windows and UNIX)tracert (Windows)traceroute (UNIX)route(Windows and UNIX)netstat(Windows and UNIX)nslookup(Windows and UNIX)vregedit (Windows)regedit (Windows)DescriptionIncluded with the V<strong>is</strong>iBroker d<strong>is</strong>tribution. It <strong>is</strong> used to locate all objectsreg<strong>is</strong>tered within a given Smart Agent domain and to d<strong>is</strong>playinformation known to the agent. Normally, Smart Agents are restrictedto a subnet only.Included with the V<strong>is</strong>iBroker d<strong>is</strong>tribution. It <strong>is</strong> used to print all theinformation encoded in an IOR into a human readable format..Part of TCP/IP networking tool set and usually included with theoperating system. It <strong>is</strong> used to test where a packet <strong>is</strong> bounced backfrom a remote host to the current host and can be useful for firewallconfiguration verification.Part of TCP/IP networking tool set and d<strong>is</strong>tributed with some operatingsystems. It prints the route or path taken by a data packet to reach thedestination host. It can help you identify a problem with firewalls as itshows where packets fail when being forwarded by routers.Part of TCP/IP networking tool set and d<strong>is</strong>tributed with some operatingsystems. It prints the routing table and can be useful with firewallconfigurations.Part of TCP/IP networking tool set and d<strong>is</strong>tributed with some operatingsystems. It d<strong>is</strong>plays protocol stat<strong>is</strong>tics and current TCP/IP networkconnections and can be useful to verify the state of connections andport availability.Part of TCP/IP networking tool set and d<strong>is</strong>tributed with some operatingsystems. It queries Internet domain name servers for hostnamemapping.Provided by <strong>Borland</strong> to edit Windows reg<strong>is</strong>try entries relatedspecifically to <strong>Borland</strong> products.Part of Microsoft Windows operating system d<strong>is</strong>tribution and lets you toedit the Windows reg<strong>is</strong>try.50 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Preparation for troubleshootingGetting information about the computer networkA good understanding of the computer network <strong>is</strong> needed to configure <strong>GateKeeper</strong>properly. You should work closely with the network admin<strong>is</strong>trators to identify problemsthat might ar<strong>is</strong>e from an improper configuration of <strong>GateKeeper</strong> and the firewall or thenetwork itself. Many times configuration problems ar<strong>is</strong>e due to an incorrectconfiguration of the router or firewalls.Firstly, you should try to understand the network diagram, firewall policies, routingtables, packet filters, and the location and configuration of basic TCP/IP stack servers.Most network admin<strong>is</strong>trators can provide you with logical network diagrams that showthe physical wiring and the components in their network. When making deploymentplans for <strong>GateKeeper</strong> , it recommended that you first start by analyzing andunderstanding these diagrams..Next, you need to understand the firewall policies in place. Understanding the firewallpolicies and the physical network diagrams will help you determine whether messagesfrom the client application are allowed to pass through various hops of the networks toreach the server and vice versa. Th<strong>is</strong> information in turn determines where the youshould deploy <strong>GateKeeper</strong> and it will save a considerable amount of time whentroubleshooting <strong>GateKeeper</strong>'s configuration.An external router routes packets to/from the Internet and perimeter networks.Additionally, the external router can be programmed so that only a restricted set ofprotocols can enter from the Internet to the perimeter network. Th<strong>is</strong> additionalinformation <strong>is</strong> only available in the firewall policy. If the routes are not configuredproperly, the packets will be forwarded to the wrong destination or will be ignored.Whenever there <strong>is</strong> any change in the routing table or firewall policies, the networkadmin<strong>is</strong>trator should notify you.A multi-homed firewall can filter and route packets from the perimeter network into theinternal network and the de-militarized zone. Additionally, it may also perform NetworkAddress Translation in which the real IP address of the internal network <strong>is</strong> replacedwith the fake IP address and vice versa.The following figure <strong>is</strong> an example of a network diagram that shows the physical wiringlayout of three subnets; the Perimeter Internet, Demilitarized zone, and internalnetwork.Figure 5.1 Typical network diagram example5: Troubleshooting <strong>GateKeeper</strong> 51


Essential checks– The External Router routes packets to/from the Internet and Perimeter Internet.Additionally, the external router can be programmed such that only a small restrictedset of protocols enter from Internet to the Perimeter Internet. Th<strong>is</strong> additionalinformation <strong>is</strong> only available in the Firewall policy; that <strong>is</strong> the routing table.– The Multi-Homed Firewall filters packets and routes packets from the PerimeterInternet into the two subnets; internal Network and Demilitarized Zone. Additionally, itmay also perform Network Address Translation in which the real IP address of theinternal network <strong>is</strong> replaced with the fake IP address and vice versa.NoteEssential checksThe example above illustrates one of many possible network configurations and,therefore, it <strong>is</strong> very important to know where such information can be obtained beforedeploying <strong>GateKeeper</strong>.<strong>GateKeeper</strong> acts like a proxy and problems can ar<strong>is</strong>e in the client, <strong>GateKeeper</strong>, or theserver. The following sections describe some essential checks you can make when<strong>GateKeeper</strong> fails to work properly. The checks described below are not meant to beexhaustive and are not arranged in order of importance or performance sequence, butare provided here to serve as a guideline for preliminary troubleshooting.Check the Smart Agent<strong>GateKeeper</strong> uses the Smart Agent to locate server objects and <strong>GateKeeper</strong> canautomatically locate the Smart Agent on the network. If the Smart Agent fails to detectthe server object or if <strong>GateKeeper</strong> <strong>is</strong> unable to locate the Smart Agent automatically,you may use one of the following solutions to troubleshoot the Smart Agent:– Check the environment variable settings described above.– Start the Smart Agent in debugging mode:osagent -v– Find all Smart Agents that are reachable from where <strong>GateKeeper</strong> <strong>is</strong> installed. Youmay use the osfind command.– Check if the IP and port addresses are set correctly in the client, <strong>GateKeeper</strong>, andthe server.Check the property filesCheck the settings in the property files of the client, server and <strong>GateKeeper</strong>. The mostcommon problem <strong>is</strong> setting the port and host addresses incorrectly.Check the routing tableA multi-homed host allows communication between the connected networks. In orderfor the multi-homed host to route data packets from one network to another correctly,you must configure the routing tables correctly in the hosts. If the routing table fails tosend data correctly, you may use the following methods to troubleshoot th<strong>is</strong> program:– Use route print and traceroute to check for routing tables. Identify where thecommunication breakdown and configure the routing tables correctly.– Use tools such as ping and tracert can to examine and verify the communicationpaths.52 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Essential checksCheck pass-through connectionsYou may use one of the following methods to check if the pass-through connection <strong>is</strong>set correctly:– If you are using <strong>GateKeeper</strong> in the pass-through mode, you must set the followingproperties in <strong>GateKeeper</strong> correctly:vbroker.gatekeeper.passthru.inPortMinvbroker.gatekeeper.passthru.inPortMaxvbroker.gatekeeper.passthru.outPortMinvbroker.gatekeeper.passthru.outPortMaxThe inPortMin and inPortMax properties specify the range of ports a client uses toconnect to <strong>GateKeeper</strong>. Therefore, you must ensure that the clients are able toovercome firewalls to connect to these ports.Similarly, the outPortMin and outPortMax properties specify the range of ports<strong>GateKeeper</strong> uses to connect to the server-side network. Therefore, you mustensure that <strong>GateKeeper</strong> <strong>is</strong> able to overcome the firewalls to connect to these portson the server.– Use tools such as ping, tracert, traceroute, and route to check if the destination <strong>is</strong>reachable.Check the Java policyJava: If the client <strong>is</strong> an applet using the java plug-in, make sure the following propertiesare added to the java.policy file. If these settings are not specified in the JRE'sjava.policy file, a security exception may occur. Note that these properties are theclient's settings and “192.73.8.25:25001” <strong>is</strong> the IP and port address of <strong>GateKeeper</strong>'shost and HIOP port.grant codeBase "http://192.73.8.25:25001/*" {perm<strong>is</strong>sion java.lang.reflect.ReflectPerm<strong>is</strong>sion"suppressAccessChecks";perm<strong>is</strong>sion java.io.SerializablePerm<strong>is</strong>sion "enableSubclassImplementation";perm<strong>is</strong>sion java.lang.RuntimePerm<strong>is</strong>sion "accessDeclaredMembers";};Check SSLIf you are using SSL, ensure the certificate <strong>is</strong> installed properly in the client (Webbrowser), the server, and <strong>GateKeeper</strong>.Check the IOR filesTo check the content of an IOR file, use the following methods:– Set the vbroker.URLNaming.debug property in the client, <strong>GateKeeper</strong>, or the server totrace which IOR files are retrieved.– Use the printior command to print the content of an IOR file.Check firewall settingsFirewall settings can be the most problematic settings.– See “Configuring <strong>GateKeeper</strong> and internetworking devices,” “Configuring thefirewall”, and “Configuring user programs.”– Work closely with the network admin<strong>is</strong>trator to understand the firewall restrictions.– Check the NAT (Network Address Translation) configuration.5: Troubleshooting <strong>GateKeeper</strong> 53


Common errors and FAQsCommon errors and FAQs1 A comprehensive l<strong>is</strong>t of Frequently Asked Questions, “V<strong>is</strong>iBroker <strong>GateKeeper</strong>FAQs” <strong>is</strong> maintained on the <strong>Borland</strong> web site. You may want to read th<strong>is</strong> l<strong>is</strong>t for moreinformation.2 Common errors made while setting properties are spelling m<strong>is</strong>takes for propertynames, such as “vroker” instead of “vbroker”. Also, on Windows, some wordprocessors automatically change the first character on a line into a capital letter.Therefore, vbroker becomes Vbroker which <strong>is</strong> not valid.3 Socket binding errors can occur when the IP and/or port addresses are invalid or arealready in use. The following table shows some typical errors:Error Message Error Type Solution"Bind Exception: Cannot assignrequested address"Wrong IP AddressCorrect the IP and/or portaddress."Bind Exception: Address in use" IP port already in use Correct the IP and/or portaddress."Invalid GIOP Proxy ior:Communication Problem""Invalid GIOP Proxy ior: ConnectException""Invalid GIOP Proxy ior: InvalidObject Ref, File Not Found Exception"Wrong IP AddressWrong Port AddressWrong IOR NameCorrect the IP and/or portaddress.Correct the IP addresses in theIOR file (property file)Correct the name of thereferenced IOR file.Proxy servers and <strong>GateKeeper</strong><strong>GateKeeper</strong> can work in conjunction with HTTP proxy servers. These proxy serversare used by the HIOP protocol for the HTTP Tunneling feature of <strong>GateKeeper</strong>.In general, the latest firewall products have a built-in capability to handle HTTP traffic.Certain firewalls have built-in HTTP proxy servers (such as Microsoft's ISA Server)while other firewalls can forward HTTP messages to an HTTP proxy server that canperform load balancing using proprietary mechan<strong>is</strong>ms. In some cases, an HTTP proxyserver uses caching techniques to increase performance. <strong>GateKeeper</strong> requests thatHTTP proxy server caching <strong>is</strong> d<strong>is</strong>abled for its messages.When an HTTP proxy server <strong>is</strong> used in conjunction with <strong>GateKeeper</strong>, the HTTP proxyserver acts like a NAT device for <strong>GateKeeper</strong> because the HTTP proxy server forwardspackets. <strong>GateKeeper</strong> <strong>is</strong> hidden behind the HTTP proxy server and, as such, it <strong>is</strong>important to configure the proxy host properties or TCP firewall properties to specifythe HIOP fake host/port.54 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Proxy servers and <strong>GateKeeper</strong>5: Troubleshooting <strong>GateKeeper</strong> 55


56 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Appendix<strong>GateKeeper</strong> propertiesTh<strong>is</strong> appendix describes the properties that may be set on <strong>GateKeeper</strong> with theexception of “Server's properties for firewall specifications”, which are properties set onthe server.NoteThe following notations are used for the column “Default/Options” in the tables:– Options are in bold; gatekeeper.ior– <strong>is</strong> a blank space or an empty string.– Options enclosed in angle brackets () are user supplied values, for example, or .General propertiesThe following table l<strong>is</strong>ts the common properties used by <strong>GateKeeper</strong>.Property Default/Options Descriptionvbroker.gatekeeper.namenull – no name <strong>is</strong> defined Specifies the name of a <strong>GateKeeper</strong> instance to differentiate it from other <strong>GateKeeper</strong>s instances.vbroker.gatekeeper.referenceStorevbroker.gatekeeper.locationServicevbroker.gatekeeper.cache.sizegatekeeper.ior – in thecurrent directory of<strong>GateKeeper</strong>. true – enabledfalse – d<strong>is</strong>abled64 (default)1 – cache <strong>is</strong> d<strong>is</strong>abled0 – cache size <strong>is</strong> unlimitedSpecifies the name of the <strong>GateKeeper</strong> IOR file. Youmay define the full path name if th<strong>is</strong> file <strong>is</strong> not stored inthe <strong>GateKeeper</strong> current directory.Enables or d<strong>is</strong>ables the location service using<strong>GateKeeper</strong>. Th<strong>is</strong> service <strong>is</strong> provided for clients suchas applets that are not able to communicate with theSmart Agent (OSAgent) to do the bind. If th<strong>is</strong> property<strong>is</strong> set to false, the client will get a NO_PERMISSIONexception during the binding operation through<strong>GateKeeper</strong>.Defines the size of the <strong>GateKeeper</strong> cache.Appendix A: <strong>GateKeeper</strong> properties 57


Exterior server engineProperty Default/Options Descriptionvbroker.gatekeeper.cache.timeout 900 Specifies the time in seconds for keeping theinformation in the cache. If the information <strong>is</strong> not usedby the end of the timeout interval, garbage information<strong>is</strong> collected.vbroker.gatekeeper.asynchronizedIOfalse (default) – enabledtrue – d<strong>is</strong>abledEnables or d<strong>is</strong>ables the asynchronized IO feature in<strong>GateKeeper</strong>. The asynchronized IO feature <strong>is</strong> onlyuseful in situations in which calling methods on theservers takes a long time and there are a lot of newincoming clients. In most situations, activating th<strong>is</strong>feature does not provide any advantages. Th<strong>is</strong> featureex<strong>is</strong>ts mainly due to h<strong>is</strong>torical reasons and the use of it<strong>is</strong> d<strong>is</strong>couraged.Exterior server engineThe following table l<strong>is</strong>ts the properties used by the exterior server engine on the clientside or Internet side of <strong>GateKeeper</strong>. Most of the important properties, however, aredefined in each Server Connection Manager (SCM) which are described in thefollowing sections.Property Default Descriptionvbroker.se.exterior.scms ex-iiop,ex-hiop – ex-iiop andex-hiop Server connectionmanagers in use. It can also bea l<strong>is</strong>t of ex-iiop, ex-hiop, ex-ssl,and ex-hiops separated bycommas.Defines the server connection managers for theexterior server engine.vbroker.se.exterior.host null – the primary host <strong>is</strong> used;that <strong>is</strong> the IP address of theprimary Network Interface Card(NIC). vbroker.se.exterior.proxyHost – No proxy host. The host address of the exterior host. The primary NIC<strong>is</strong> the exterior NIC. You can set th<strong>is</strong> property in the panel of <strong>GateKeeper</strong>.Network Address Translation (NAT) devices hide theactual IP address and/or port number in the networkby changing the IP address and/or in the IP packet.Set th<strong>is</strong> value to the value defined by the NAT. Whenyou have callback enabled and <strong>GateKeeper</strong> sitsbehind a NAT, the callback proxy host(vbroker.gatekeeper.backcompat.callback.proxyHost)should be set to equal th<strong>is</strong> property. Th<strong>is</strong> <strong>is</strong> used when<strong>GateKeeper</strong> sits behind a NAT. You can also set th<strong>is</strong>property on the Basic Properties panel of theV<strong>is</strong>iBroker Console.vbroker.se.exterior.type gatekeeper Th<strong>is</strong> setting says that the exterior server engine <strong>is</strong> in a“proxying” role. It means packet/messages forwardingfunction <strong>is</strong> enabled on th<strong>is</strong> server engine. The usershould not change th<strong>is</strong> setting.ex-hiop server connection manager (SCM)JavaThe ex-hiop server connection manager <strong>is</strong> responsible for servicing HTTP requests onthe exterior server engine. Both the l<strong>is</strong>tener and d<strong>is</strong>patcher properties are configuredusing the property with the vbroker.scm.exterior.ex-hiop prefix.The following vbroker.se.exterior.scm.ex-hiop properties specify the behavior of theex-hiop l<strong>is</strong>tener. The ex-hiop l<strong>is</strong>tener <strong>is</strong> an HIOP l<strong>is</strong>tener. The default port <strong>is</strong> 8088. Thethreading policy <strong>is</strong> set to ThreadSession.58 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


ex-hiop server connection manager (SCM)NoteAll the properties related to an SCM are defined with the following prefix:vbroker.se..scm..Some SCMs may define additional properties, but some properties, especially theproperties related to threads and connections, have the same property names for allSCMs.Property Default Descriptionvbroker.se.exterior.scm.ex-hiop.root .Sets to the root directory as itsdefault. The default directory <strong>is</strong>where <strong>GateKeeper</strong> starts.vbroker.se.exterior.scm.ex-hiop.d<strong>is</strong>patcher.type ThreadSession Specifies the d<strong>is</strong>patcher type for aex-hiop scm request. The typeshould always be set to “ThreadSession”.vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port 8088vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.proxyPortSets the default l<strong>is</strong>tener port for<strong>GateKeeper</strong>'s client side (exterior)HIOP l<strong>is</strong>tener. Client applications orapplets use th<strong>is</strong> port primarily forHTTP tunneling support. Th<strong>is</strong> portmay also be used on a limited bas<strong>is</strong>for standard HTTP requests such asfetching the <strong>GateKeeper</strong> IOR file.The proxyPort property <strong>is</strong> often usedin conjunction with the server engineproxyHost property to mask the targetport for th<strong>is</strong> l<strong>is</strong>tener. If th<strong>is</strong> property <strong>is</strong>set, the <strong>GateKeeper</strong> IOR file willcontain the proxyPort value in theendpoint information for th<strong>is</strong> l<strong>is</strong>tener.It <strong>is</strong> then the responsibility of theexternal NAT device to map theproxyPort to the l<strong>is</strong>tener's true port.The default <strong>is</strong> indicating thefeature <strong>is</strong> d<strong>is</strong>abled (the l<strong>is</strong>tener portwill not be masked).vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.type HIOP Specifies the l<strong>is</strong>tener type for the exhiopsSCM. HIOP indicates that th<strong>is</strong>l<strong>is</strong>tener supports the proprietaryHIOP protocol used for HTTPtunneling as well as the HTTPprotocol. The l<strong>is</strong>tener type for preconfiguredserver connectionmanagers such as ex-hiop shouldnot be changed.vbroker.se.exterior.scm.ex-hiop.manager.connectionMax 0 – incomingconnections areunlimited vbroker.se.exterior.scm.ex-hiop.manager.connectionMaxIdle 0Defines the maximum number ofincoming connections allowed to the<strong>GateKeeper</strong> exterior HIOP l<strong>is</strong>tener.Specifies the time in seconds that aninactive connection <strong>is</strong> idle before itcan be closed.vbroker.se.exterior.scm.ex-hiop.manager.type Socket It specifies the type of ServerConnection Manager.vbroker.se.exterior.scm.ex-hiop.servletL<strong>is</strong>t orb The servlet class type to be used.vbroker.se.exterior.scm.ex-hiop.servlet.orb.GETvbroker.se.exterior.scm.ex-hiop.servlet.orb.PUTtrue – enabledfalse – d<strong>is</strong>abledtrue – enabledfalse – d<strong>is</strong>abledEnables or d<strong>is</strong>ables the servlet GEToperation. Note that the ORB <strong>is</strong> apredefined property.Enables or d<strong>is</strong>ables the servlet PUToperation. Note that the ORB <strong>is</strong> apredefined property.Appendix A: <strong>GateKeeper</strong> properties 59


ex-iiop server connection manager (SCM)Property Default Descriptionvbroker.se.exterior.scm.ex-hiop.servlet.orb.class com.inpr<strong>is</strong>e.vbroker.HIOP.servlets.ORB.ServletIt specifies the java class to beloaded for HIOP when <strong>GateKeeper</strong><strong>is</strong> used as a servlet. The customershould not change th<strong>is</strong> property toother values.vbroker.se.exterior.scm.ex-hiop.servlet.orb.loadfalse – d<strong>is</strong>abledtrue – enabledEnables or d<strong>is</strong>ables the servlet Loadoperation. Note that the ORB <strong>is</strong> apredefined property.ex-iiop server connection manager (SCM)The ex-iiop server connection manager <strong>is</strong> responsible for servicing IIOP requests onthe exterior sever engine. The l<strong>is</strong>tener and d<strong>is</strong>patcher properties can be configuredusing properties with the vbroker.se.exterior.scm.ex-iiop prefix. The followingvbroker.se.exterior.scm.ex-iiop properties specify the behavior of the ex-iiop l<strong>is</strong>tener.The ex-iiop l<strong>is</strong>tener <strong>is</strong> an IIOP l<strong>is</strong>tener.Property Default Descriptionvbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMax 100vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMaxIdle 300vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.threadMin 0Specifies the maximum number ofthreads the server connectionmanager can create.Specifies the time an idle thread <strong>is</strong>idle before it <strong>is</strong> destroyed. Thedefault <strong>is</strong> 300.Specifies the minimum number ofthreads the server connectionmanager can create.vbroker.se.exterior.scm.ex-iiop.d<strong>is</strong>patcher.type ThreadPool Specifies the d<strong>is</strong>patcher type forthe ex-iiop scm.vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.giopVersion 1.2 It sets the GIOP version to beused by the GIOP messages. Th<strong>is</strong>property can be used to overcomeinteroperability problems witholder ORBs that cannot handleunknown minor GIOP versionscorrectly.vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port 683vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.proxyPort – The proxyport feature <strong>is</strong> d<strong>is</strong>abled.Th<strong>is</strong> indicates thefeature <strong>is</strong> d<strong>is</strong>abled (thel<strong>is</strong>tener port will not bemasked).Sets as a default l<strong>is</strong>tener port for<strong>GateKeeper</strong>'s client-side IIOPl<strong>is</strong>tener. Port 683 <strong>is</strong> therecommended setting for adeployed application since it <strong>is</strong> anOMG standard for IIOP and <strong>is</strong>reg<strong>is</strong>tered with IANA.UNIX: On a UNIX platform, thedefault l<strong>is</strong>tener port number <strong>is</strong> inthe range of 0 to 1024 which <strong>is</strong>reserved for privileged use. Whenrunning as a non-privileged user,the l<strong>is</strong>tener port can be set to avalue greater than 1024 if desired.Specifies the proxy port numberused with the proxy host nameproperty.vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.type IIOP Specifies the l<strong>is</strong>tener type for theex-iiop scm.60 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


ex-hiops server connection manager (SCM)Property Default Descriptionvbroker.se.exterior.scm.ex-iiop.manager.connectionMax 0 – incomingconnections areunlimited Defines the maximum number ofincoming connections allowed tothe <strong>GateKeeper</strong> exterior IIOPl<strong>is</strong>tener.vbroker.se.exterior.scm.ex-iiop.manager.connectionMaxIdle 0Specifies the time in seconds inwhich a inactive connection <strong>is</strong> idlebefore it can be closed.vbroker.se.exterior.scm.ex-iiop.manager.type Socket It specifies the type of ServerConnection Manager. Currently,only “Socket” <strong>is</strong> available.ex-hiops server connection manager (SCM)The ex-hiops server connection manager <strong>is</strong> responsible for servicing HTTPS requestson the exterior server engine. Both the l<strong>is</strong>tener and d<strong>is</strong>patcher properties areconfigured using the property with the vbroker.scm.exterior.ex-hiops prefix.The following vbroker.se.exterior.scm.ex-hiops properties specify the behavior of theex-hiops l<strong>is</strong>tener. The ex-hiops l<strong>is</strong>tener <strong>is</strong> an HIOPS l<strong>is</strong>tener. The default port <strong>is</strong> 8089.The threading policy must always be ThreadSession.Property Default Descriptionvbroker.se.exterior.scm.ex-hiops.root .Sets to the root directory as itsdefault. The default directory <strong>is</strong>where <strong>GateKeeper</strong> starts.vbroker.se.exterior.scm.ex-hiops.d<strong>is</strong>patcher.type ThreadSession Specifies the d<strong>is</strong>patcher type forex-hiop scm request. The typeshould always be set to“ThreadSession”.vbroker.se.exterior.scm.ex-hiops.l<strong>is</strong>tener.port 8089vbroker.se.exterior.scm.ex-hiops.l<strong>is</strong>tener.proxyPortSets the default l<strong>is</strong>tener port for the<strong>GateKeeper</strong>'s client-side (exterior)HIOPS l<strong>is</strong>tener. Client applicationsor applets use th<strong>is</strong> port primarily forHTTPS tunneling support. Th<strong>is</strong> portmay also be used on a limited bas<strong>is</strong>for standard HTTPS requests suchas fetching the <strong>GateKeeper</strong> IORfile.The proxyPort property <strong>is</strong> oftenused in conjunction with the serverengine proxyHost property to maskthe target port for th<strong>is</strong> l<strong>is</strong>tener. Ifth<strong>is</strong> property <strong>is</strong> set, the <strong>GateKeeper</strong>IOR file will contain the proxyPortvalue in the end point informationfor th<strong>is</strong> l<strong>is</strong>tener. It <strong>is</strong> then theresponsibility of the external NATdevice to map the proxyPort to thel<strong>is</strong>tener's true port. The default <strong>is</strong> indicating the feature <strong>is</strong>D<strong>is</strong>abled (the l<strong>is</strong>tener port will notbe masked).vbroker.se.exterior.scm.ex-hiops.l<strong>is</strong>tener.type HIOPS Specifies the l<strong>is</strong>tener type for theex-hiops SCM. HIOPS indicatesthat th<strong>is</strong> l<strong>is</strong>tener supports theproprietary HIOPS protocol usedfor HTTP tunneling as well as theHTTPS protocol. The l<strong>is</strong>tener typefor pre configured serverconnection managers such as exhiopsshould not be changed.Appendix A: <strong>GateKeeper</strong> properties 61


ex-ssl server connection manager (SCM)Property Default Descriptionvbroker.se.exterior.scm.ex-hiops.manager.connectionMax 0 – the cachedconnections areunlimitedDefines the maximum number ofcached connections available tothe <strong>GateKeeper</strong> exterior HIOPSl<strong>is</strong>tener.vbroker.se.exterior.scm.ex-hiops.manager.connectionMaxIdle 0Specifies the time in seconds inwhich a inactive connection <strong>is</strong> idlebefore it can be closed.vbroker.se.exterior.scm.ex-hiops.manager.type Socket It specifies the type of ServerConnection Manager.vbroker.se.exterior.scm.ex-hiops.servletL<strong>is</strong>t orb The servlet class type to be used.vbroker.se.exterior.scm.ex-hiops.servlet.orb.GETvbroker.se.exterior.scm.ex-hiops.servlet.orb.PUTvbroker.se.exterior.scm.ex-hiops.servlet.orb.classvbroker.se.exterior.scm.ex-hiops.servlet.orb.loadtrue – enabledfalse – d<strong>is</strong>abledtrue – enabledfalse – d<strong>is</strong>abledcom.inpr<strong>is</strong>e.vbroker.HIOP.servlets.ORB.Servletfalse – d<strong>is</strong>abledtrue – enabledEnables or d<strong>is</strong>ables the servletGET operation. Note that the ORB<strong>is</strong> a predefined property.Enables or d<strong>is</strong>ables the servletPUT operation. Note that the ORB<strong>is</strong> a predefined property.It specifies the java class to beloaded for HIOPS when<strong>GateKeeper</strong> <strong>is</strong> used as a servlet.The customer should not changeth<strong>is</strong> property to other values.Enables or d<strong>is</strong>ables the servletLoad operation. Note that the ORB<strong>is</strong> a predefined property.ex-ssl server connection manager (SCM)The ex-ssl server connection manager <strong>is</strong> responsible for servicing SSL requests on theexterior sever engine. The l<strong>is</strong>tener and d<strong>is</strong>patcher properties can be configured usingproperties with the vbroker.se-exterior.scm.ex-ssl prefix.The following vbroker.se.exterior.scm.ex-ssl properties specify the behavior of the exssll<strong>is</strong>tener. The ex-ssl l<strong>is</strong>tener <strong>is</strong> an ssl l<strong>is</strong>tener.Property Default Descriptionvbroker.se.exterior.scm.ex-ssl.d<strong>is</strong>patcher.threadMax 100vbroker.se.exterior.scm.ex-ssl.d<strong>is</strong>patcher.threadMaxIdle 300vbroker.se.exterior.scm.ex-ssl.d<strong>is</strong>patcher.threadMin 0Specifies the maximum number ofthreads the server connectionmanager can create.Specifies the time an idle thread <strong>is</strong>idle before it <strong>is</strong> destroyed. Thedefault <strong>is</strong> 300.Specifies the minimum number ofthreads the server connectionmanager can create.vbroker.se.exterior.scm.ex-ssl.d<strong>is</strong>patcher.type ThreadPool Specifies the d<strong>is</strong>patcher type forthe ex-iiop scm.vbroker.se.exterior.scm.ex-ssl.l<strong>is</strong>tener.port 684Sets as a default l<strong>is</strong>tener port forthe <strong>GateKeeper</strong>'s client-side SSLl<strong>is</strong>tener. Port 684 <strong>is</strong> therecommended setting for deployedapplication since it <strong>is</strong> an OMGstandard for IIOP and <strong>is</strong> reg<strong>is</strong>teredwith IANA.UNIX: On a UNIX platform, thedefault l<strong>is</strong>tener port number <strong>is</strong> inthe range 0 to 1024 which <strong>is</strong>reserved for privileged use. Whenrunning as a non-privileged user,the l<strong>is</strong>tener port can be set to avalue greater than 1024 if desired.62 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Interior server engineProperty Default Descriptionvbroker.se.exterior.scm.ex-ssl.l<strong>is</strong>tener.proxyPort – The proxyport feature <strong>is</strong> d<strong>is</strong>abled.Th<strong>is</strong> indicates thefeatures <strong>is</strong> d<strong>is</strong>abled (thel<strong>is</strong>tener port will not bemasked).Specifies the proxy port numberused with the proxy host nameproperty.vbroker.se.exterior.scm.ex-ssl.l<strong>is</strong>tener.type SSL Specifies the l<strong>is</strong>tener type for theex-ssl scm.vbroker.se.exterior.scm.ex-ssl.manager.connectionMax0 – cached connectionsare unlimited.vbroker.se.exterior.scm.ex-ssl.manager.connectionMaxIdle 0Defines the maximum number ofcached connections available tothe <strong>GateKeeper</strong> exterior SSLl<strong>is</strong>tener.Specifies the time in seconds inwhich an inactive connection <strong>is</strong> idlebefore it can be closed.vbroker.se.exterior.scm.ex-ssl.manager.type Socket Specifies the type of ServerConnection Manager. Currently,only “Socket” <strong>is</strong> available.Interior server engineThe following table l<strong>is</strong>ts the properties used by the interior server engine on the serversideor Intranet side of <strong>GateKeeper</strong>.You may need to set some of the properties in the interior server engine in specialcases, such as when <strong>GateKeeper</strong> runs on a dual-homed machine or if there <strong>is</strong> aNetwork Address Translation (NAT) between <strong>GateKeeper</strong> and the server.Property Default Descriptionvbroker.se.interior.scms in-iiop in-hiop in-ssl in-hiopsTh<strong>is</strong> defines the serverconnection managers for theserver engine. The default <strong>is</strong>IIOP scm. However, you maychoose to use other types ofprotocols, such as SSL byspecifying its respectivescms.vbroker.se.interior.hostvbroker.se.interior.proxyHostNull – the primary host <strong>is</strong> used;that <strong>is</strong> the IP address of theprimary Network InterfaceCard (NIC). – The proxy portfeature <strong>is</strong> d<strong>is</strong>abled.The interior server enginehost address. You can alsoset th<strong>is</strong> property on the BasicProperties panel of theV<strong>is</strong>iBroker Console.Th<strong>is</strong> property can be used ifyou have a NAT runningbetween <strong>GateKeeper</strong> andthe server to hide the serverhost's address. You can alsoset th<strong>is</strong> property on the BasicProperties panel of theV<strong>is</strong>iBroker Console.Appendix A: <strong>GateKeeper</strong> properties 63


in-iiop server connection manager (SCM)in-iiop server connection manager (SCM)The in-iiop server manager <strong>is</strong> responsible for servicing IIOP requests on the interiorserver engine. The l<strong>is</strong>tener and d<strong>is</strong>patcher can be configured using properties with thevbroker.se.interior.in-iiop prefix.The following vbroker.se.interior.scm.in-iiop properties specify the behavior of thein-iiop server connection manager.Property Default Descriptionvbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMax 100vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMaxIdle 300vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.threadMin 0Specifies the maximum numberof threads the serverconnection manager cancreate.Specifies the time an idle thread<strong>is</strong> idle before it <strong>is</strong> destroyed.The default <strong>is</strong> 300.Specifies the minimum numberof threads the serverconnection manager cancreate.vbroker.se.interior.scm.in-iiop.d<strong>is</strong>patcher.type ThreadPool Specifies the d<strong>is</strong>patcher type forthe in-iiop scm. The type shouldalways be set to “ThreadPool”.vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.giopVersion 1.2 The protocol version number tobe used for GIOP messages.vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.portvbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.proxyPort0 – pick a random number – The proxy portfeature <strong>is</strong> d<strong>is</strong>abled.Specifies the port number usedwith the host name property.Specifies the proxy port numberused with the proxy host nameproperty.vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.type IIOP Specifies the l<strong>is</strong>tener type forthe in-iiop scm.vbroker.se.interior.scm.in-iiop.manager.connectionMax 0 – cached connectionsare unlimited.vbroker.se.interior.scm.in-iiop.manager.connectionMaxIdle 0Defines the maximum numberof cached connections availableto the <strong>GateKeeper</strong> IIOP l<strong>is</strong>tener.Specifies the time in seconds inwhich an inactive connection <strong>is</strong>idle before it can be closed.vbroker.se.interior.scm.ex-iiop.manager.type Socket Specifies the type of ServerConnection Manager. Currently,only Socket <strong>is</strong> available.in-ssl server connection manager (SCM)The in-ssl server manager <strong>is</strong> responsible for servicing SSL requests on the interiorserver engine. The l<strong>is</strong>tener and d<strong>is</strong>patcher can be configured using properties with thevbroker.se.interior.in-ssl prefix.The vbroker.se.interior.scm.in-ssl properties l<strong>is</strong>ted below specify the behavior of thein-ssl server connection manager.Property Default Descriptionvbroker.se.interior.scm.in-ssl.d<strong>is</strong>patcher.threadMax 100vbroker.se.interior.scm.in-ssl.d<strong>is</strong>patcher.threadMaxIdle 300Specifies the maximum numberof threads the server connectionmanager can create.Specifies the time an idle thread<strong>is</strong> idle before it <strong>is</strong> destroyed. Thedefault <strong>is</strong> 300.64 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Admin<strong>is</strong>trationProperty Default Descriptionvbroker.se.interior.scm.in-ssl.d<strong>is</strong>patcher.threadMin 0Specifies the minimum numberof threads the server connectionmanager can create.vbroker.se.interior.scm.in-ssl.d<strong>is</strong>patcher.type ThreadPool Specifies the d<strong>is</strong>patcher type forthe in-iiop scm. The type shouldalways be set to ThreadPool.vbroker.se.interior.scm.in-ssl.l<strong>is</strong>tener.portvbroker.se.interior.scm.in-ssl.l<strong>is</strong>tener.proxyPort0 – pick a random number – The proxy portfeature <strong>is</strong> d<strong>is</strong>abled.Specifies the port number usedwith the host name property.Specifies the proxy port numberused with the proxy host nameproperty.vbroker.se.interior.scm.in-ssl.l<strong>is</strong>tener.type SSL Specifies the l<strong>is</strong>tener type for thein-ssl scm.vbroker.se.interior.scm.in-ssl.manager.connectionMax0 – incoming connectionsare unlimited.vbroker.se.interior.scm.in-ssl.manager.connectionMaxIdle 0Defines the maximum number ofincoming connections allowed tothe <strong>GateKeeper</strong> interior SSLl<strong>is</strong>tener.Specifies the time in seconds inwhich an inactive connection <strong>is</strong>idle before it can be closed.vbroker.se.interior.scm.ex-ssl.manager.type Socket Specifies the type of ServerConnection Manager. Currently,only Socket <strong>is</strong> available.Admin<strong>is</strong>trationJavaThe following table l<strong>is</strong>ts the admin<strong>is</strong>tration properties. Note that the default l<strong>is</strong>tener portnumber <strong>is</strong> 9091.Property Default/Options Descriptionvbroker.se.iiop_tp.hostnull – use host addressfrom the system.Specifies the host address that canbe used by th<strong>is</strong> server engine.vbroker.se.iiop_tp.ProxyHost – use hostaddress from the system.Specifies the proxy host address thatcan be used by th<strong>is</strong> server engine.vbroker.se.iiop_tp.scms iiop_tp, hiop_ts Specifies the l<strong>is</strong>t of ServerConnection Managers name(s).vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener-portvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort vbroker.se.iiop_tp.scm.hiop_ts.l<strong>is</strong>tener.port 9091vbroker.se.iiop_tp.scm.hiop_ts.l<strong>is</strong>tener.proxyPort – The proxy portfeature <strong>is</strong> d<strong>is</strong>abledSpecifies the IIOP admin<strong>is</strong>trativel<strong>is</strong>tener port.Specifies the proxy port for IIOPadmin<strong>is</strong>trative l<strong>is</strong>tener port.Specifies the <strong>GateKeeper</strong>admin<strong>is</strong>trative l<strong>is</strong>tener port.Specifies the proxy port number forHIOP admin<strong>is</strong>trative l<strong>is</strong>tener port.vbroker.se.iiop_tp.type normal Th<strong>is</strong> <strong>is</strong> applicable to theAdmin<strong>is</strong>trative Server Engine.vbroker.se.iiop_tp.scm.hiop_ts.servletL<strong>is</strong>t orb A virtual name given to the servletclass. It <strong>is</strong> used for specifying otherproperties like PUT, GET, LOAD andetc.vbroker.se.iiop_tp.scm.hiop_ts.servlet.orb.GETvbroker.se.iiop_tp.scm.hiop_ts.servlet.orb.PUTtrue – enabledfalse – d<strong>is</strong>abledtrue – enabledfalse – d<strong>is</strong>abledEnables or d<strong>is</strong>ables the servlet GEToperation.Enables or d<strong>is</strong>ables the servlet PUToperation.Appendix A: <strong>GateKeeper</strong> properties 65


Access controlProperty Default/Options Descriptionvbroker.se.iiop_tp.scm.hiop_ts.servlet.orb.classvbroker.se.iiop_tp.scm.hiop_ts.servlet.orb.loadcom.inpr<strong>is</strong>e.vbroker.HIOP.servlets.ORBServlettrue – enabledfalse – d<strong>is</strong>abledThe name of the servlet class.Enables or d<strong>is</strong>ables the servlet Loadoperation.Access controlThe following table l<strong>is</strong>ts the properties used to set security control in <strong>GateKeeper</strong>.Property Default Descriptionvbroker.gatekeeper.security.accessControllersvbroker.gatekeeper.security.acl..defaultvbroker.gatekeeper.security.acl..where <strong>is</strong> the nameof the given rule.defaultnull – no default actiondeny – refused entrygrant – perm<strong>is</strong>siongrantednull – no actionsspecified. Seedescription foradditional options.Specifies the l<strong>is</strong>t of names of access controllers.Specifies the default action for the control l<strong>is</strong>t. <strong>is</strong>specified above.Defines the action for the specific properties for the given rule. Thedefinition <strong>is</strong> as follows:[operation=""[signer by="" defines the signer's companyname.server host="" specifies the server hostname.client host="" specifies the client hostname.server ip="" specifies the IP address of the machinethat the server resides on.client ip="" defines the IP address of the machinethat the client resides on.object interface="" defines the object type.Examples:vbroker.gatekeeper.security.accessControllers=defaultvbroker.gatekeeper.security.acl.default.rules=rule1,rule2,rule3vbroker.gatekeeper.security.acl.default.rule1=grant[operation=\"*"\[server host=\"borland"\]]vbroker.gatekeeper.security.acl.default.rule2=deny[operation=\"*"\[client ip=192.168.100.40|255.255.255.0]]vbroker.gatekeeper.security.acl.default.rule3=deny[operation=\"*"\[server host=\"inpr<strong>is</strong>e"\][client ip=192.168.100.88|255.255.255.0]]Note: Variables in Bold are user-definable.66 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


V<strong>is</strong>iBroker 3.x style callbackProperty Default Descriptionvbroker.gatekeeper.security.acl..typevbroker.gatekeeper.security.acl..rulescom.inpr<strong>is</strong>e.vbroker.gatekeeper.security.ACImplnull – no rulesspecified. Seedescription.Specifies the implementation class to be loaded by <strong>GateKeeper</strong> forAccess Control.Note: User should not change th<strong>is</strong> value.Specifies the names for the set of rules. Example:vbroker.gatekeeper.security.accessControllers=defaultvbroker.gatekeeper.security.acl.default.rules=rule1,rule2,rule3where rule1, rule2, rule3 are names defined by the user.V<strong>is</strong>iBroker 3.x style callbackThe following table l<strong>is</strong>ts the properties that can be set in V<strong>is</strong>iBroker 5.x to use theV<strong>is</strong>iBroker 3.x style callback.Property Default/Options Descriptionvbroker.gatekeeper.callbackEnabledvbroker.gatekeeper.backcompat.callbackfalse – d<strong>is</strong>abledtrue – enabledfalse – d<strong>is</strong>abledtrue – enabledEnables or d<strong>is</strong>ables thecallback mechan<strong>is</strong>m through<strong>GateKeeper</strong>. The default <strong>is</strong>d<strong>is</strong>abled.Enables or d<strong>is</strong>ables theV<strong>is</strong>iBroker 3.x style callbacks.If you w<strong>is</strong>h to use the old stylecallbacks, set both the aboveand th<strong>is</strong> property to true.vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>teners iiop ssl Specifies a l<strong>is</strong>t of l<strong>is</strong>teners.vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.type IIOPCallback Specifies the type of IIOPcallback l<strong>is</strong>teners.vbroker.gatekeeper.backcompat.callback.host – the value<strong>is</strong> set to the primaryhost IP address andthat <strong>is</strong> the IP addressof the primary NIC.Defines the host IP address tobind for the callback l<strong>is</strong>tener.vbroker.gatekeeper.backcompat.callback.proxyHost – no proxyhost <strong>is</strong> used.Th<strong>is</strong> property <strong>is</strong> often used inconjunction with the serverengine proxyPort property tomask the target port for th<strong>is</strong>l<strong>is</strong>tener. If th<strong>is</strong> property <strong>is</strong> set,the callback IOR will containthe proxyHost value in the endpoint information for th<strong>is</strong>l<strong>is</strong>tener. It <strong>is</strong> then theresponsibility of the NetworkAddress Translation (NAT)device to map the proxyHost tothe l<strong>is</strong>tener's true port. Thedefault <strong>is</strong> indicatingthat the feature <strong>is</strong> d<strong>is</strong>abled (thel<strong>is</strong>tener port will not be maskedin the callback IOR).vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.type SSLCallback Specifies the type of SSLl<strong>is</strong>tener.vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.portvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.ssl.proxyPort0 – a port picked atrandom – no proxyport <strong>is</strong> used>Defines the port on which thecallback l<strong>is</strong>tener uses to l<strong>is</strong>tenfor SSL.Use th<strong>is</strong> property when a NATsits between the client and<strong>GateKeeper</strong> in which the NAThides the actual <strong>GateKeeper</strong>host address.Appendix A: <strong>GateKeeper</strong> properties 67


Performance and load balancingProperty Default/Options Descriptionvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.port 0 – a port number <strong>is</strong>picked at random.Specifies the port in which thecallback l<strong>is</strong>teners l<strong>is</strong>ten for theIIOP.vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.proxyPort – no proxyport <strong>is</strong> used.The proxyPort property <strong>is</strong> oftenused in conjunction with theserver engine proxyHostproperty to mask the target portfor th<strong>is</strong> l<strong>is</strong>tener. If th<strong>is</strong> property<strong>is</strong> set, the callback IOR willcontain the proxyPort value inthe end point information forth<strong>is</strong> l<strong>is</strong>tener. It <strong>is</strong> then theresponsibility of the NetworkAddress Translation (NAT)device to map the proxyPort tothe l<strong>is</strong>tener's true port. Thedefault <strong>is</strong> indicatingthat the feature <strong>is</strong> d<strong>is</strong>abled (thel<strong>is</strong>tener port will not be maskedin the callback IOR).Performance and load balancingThe following table l<strong>is</strong>ts the performance and load balancing properties to d<strong>is</strong>tributeand monitor the load between client and server.Property Default Descriptionvbroker.gatekeeper.load.d<strong>is</strong>tributor com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.RoundRobinD<strong>is</strong>tributorSpecifies the D<strong>is</strong>tributor class to be used by theLoad Balance Manager. Users should notchange th<strong>is</strong> property unless they understand thed<strong>is</strong>tributor interface and implement their ownd<strong>is</strong>tributor. The following implementation class<strong>is</strong> used as a default d<strong>is</strong>tributor: (RoundRobin):com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.RoundRobinD<strong>is</strong>tributor.vbroker.ce.iiop.ccm.connectionMax0 – will not try to closeany of the old active orcached connections.vbroker.orb.gcTimeout 30Specifies the maximum number of totalconnections within a client. Th<strong>is</strong> value <strong>is</strong> equalto the number of active connections plus thosethat are cached.Specifies the time in seconds that must passbefore important resources that are not usedare cleared.vbroker.orb.fragmentSize 0 Specifies the GIOP fragment size. It must be amultiple of GIOP stream chunk size.vbroker.orb.streamChunkSize 4096vbroker.orb.bufferCacheTimeout 6000Specifies the GIOP message chunk size. Itmust be the power of 2.Specifies (in mill<strong>is</strong>econds) the time in which amessage chunk has been cached before it <strong>is</strong>d<strong>is</strong>carded.68 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Performance and load balancingProperty Default Descriptionvbroker.gatekeeper.load.slavesvbroker.gatekeeper.load.slave.vbroker.gatekeeper.load.balancer – no slaves<strong>GateKeeper</strong> – seedescription. –see description.Specifies the l<strong>is</strong>t of Slave <strong>GateKeeper</strong>s to beclustered together for the purpose of LoadBalancing by th<strong>is</strong> Master <strong>GateKeeper</strong>. The l<strong>is</strong>tof names <strong>is</strong> separated by commas. For eachname in the l<strong>is</strong>t, a property such as“vbroker.gatekeeper.load.slave.”<strong>is</strong> added to the property file. There <strong>is</strong> no defaultvalue for th<strong>is</strong> property. Note that th<strong>is</strong> property <strong>is</strong>used in the Master <strong>GateKeeper</strong> property only.For example:vbroker.gatekeeper.load.slaves=abc,xyz.Note: If you set th<strong>is</strong> property, you must load theappropriate library. See the description ofvbroker.orb.dynamicLibs in “M<strong>is</strong>cellaneous ORBproperties”.Specifies the IOR or a URL pointing to specificSlave <strong>GateKeeper</strong> to be clustered for thepurpose of Load Balancing by th<strong>is</strong> Master<strong>GateKeeper</strong>. Note that th<strong>is</strong> property <strong>is</strong> used inMaster <strong>GateKeeper</strong> property only. For example:vbroker.gatekeeper.load.slave.abc=http://host1:9091/<strong>GateKeeper</strong>.iorvbroker.gatekeeper.load.slave.xyz=http://host2:9091/<strong>GateKeeper</strong>.ior.Note: If you set th<strong>is</strong> property, you must load theappropriate library. See the description ofvbroker.orb.dynamicLibs in “M<strong>is</strong>cellaneous ORBproperties”.Specifies that the master <strong>GateKeeper</strong>'s solepurpose <strong>is</strong> to do load balancing and it will nevertake a turn in serving clients. In the defaultmode, the master itself <strong>is</strong> also a slave, in thesense that it <strong>is</strong> included in the l<strong>is</strong>t of available<strong>GateKeeper</strong>s and will take turn among theslaves. When a particular <strong>GateKeeper</strong> <strong>is</strong>unavailable, the client will come back to themaster to obtain the next slave <strong>GateKeeper</strong> inturn (th<strong>is</strong> can be one of the slaves or the masteritself).Note: If you set th<strong>is</strong> property, you must load theappropriate library. See the description ofvbroker.orb.dynamicLibs in “M<strong>is</strong>cellaneous ORBproperties”.Appendix A: <strong>GateKeeper</strong> properties 69


Support for bidirectional communicationsSupport for bidirectional communicationsThe following table l<strong>is</strong>ts the properties that support bidirectional communications.These properties are evaluated only once, when the SCMs are created. In all cases,the exportBiDir and importBiDir properties on the SCMs are given priority over theenableBiDir property. In other words, if both properties are set to conflicting values, theSCM-specific properties will take effect. Th<strong>is</strong> allows you to set the enableBiDir propertyglobally, and more importantly, turn off bidirectionality in individual SCMs.Property Default Descriptionvbroker.orb.enableBiDirboth server and client:noneSee “Callback with<strong>GateKeeper</strong>'sbidirectional support”.You can selectively make bidirectionalconnections. If the client definesvbroker.orb.enableBiDir=client, and theserver definesvbroker.orb.enableBiDir=server, the value ofvbroker.orb.enableBiDir in <strong>GateKeeper</strong>determines the state of the connection.Note: Just as you can selectively enablebidirectional communication on a per-SCMbas<strong>is</strong>, you can also selectively enablebidirectional communication on <strong>GateKeeper</strong>.For example, if you set thevbroker.se.exterior.scm.ex--iiop.manager.importBiDir property to true,<strong>GateKeeper</strong> will accept bidirectionalconnections from the client. Setting thevbroker.se.exterior.scm.ex--iiop.manager.exportBiDir property to truecauses <strong>GateKeeper</strong> to request bidirectionalconnections with the server.Support for pass-through connectionsNoteThe vbroker.gatekeeper.enablePassthru property <strong>is</strong> the only property that supportspass-through connections.Property Default Descriptionvbroker.gatekeeper.enablePassthrufalse – d<strong>is</strong>abledtrue – enabledvbroker.gatekeeper.passthru.blockSize 16384vbroker.gatekeeper.passthru.connectionTimeout 300000 mill<strong>is</strong>econds(5 minutes)vbroker.gatekeeper.passthru.inPortMin 1024vbroker.gatekeeper.passthru.inPortMax 65535Specifies enabled or d<strong>is</strong>abled Passthru mode in<strong>GateKeeper</strong>.Specifies the buffer size that the channel usesfor each read and write operation. A high valuehandles large messages with a single read andwrite, but increases the resources used by asingle channel. A low value will optimizeresource utilization, while degradingperformance due to multiple reads and writes.Specifies the amount of time in mill<strong>is</strong>econds agiven channel will wait before it stops waitingfor connections and shuts down the channel.Used together withvbroker.gatekeeper.passthru.inPortMax. Itspecifies the start of a range of interior port forpass-through incoming connections.Used together withvbroker.gatekeeper.passthru.inPortMin. Itspecifies the end of a range of ports for passthroughin-coming connections.70 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Security services (SSL)Property Default Descriptionvbroker.gatekeeper.passthru.logLevel0 – no loggingvbroker.gatekeeper.passthru.outPortMin 0vbroker.gatekeeper.passthru.outPortMax 65535vbroker.gatekeeper.passthru.streamTimeout 2000Enables the level of logging for the passthroughcomponent.Used together withvbroker.gatekeeper.passthru.outPortMax. Itspecifies the start of a range of exterior port forpass-through outgoing connections.Used together withvbroker.gatekeeper.passthru.outPortMin. Itspecifies the end of a range of exterior port forpass-through outgoing connections.Specifies the amount of time in mill<strong>is</strong>econds anestabl<strong>is</strong>hed channel will wait for messagesbefore it shuts down.Security services (SSL)The following table l<strong>is</strong>ts the properties used in the Security Services.NoteIf you set th<strong>is</strong> property then you load the appropriate library. See the description ofvbroker.orb.dynamicLibs in “M<strong>is</strong>cellaneous ORB properties”.Property Default Descriptionvbroker.orb.alwaysSecurefalse – d<strong>is</strong>abledtrue – enabledSpecifies whether <strong>GateKeeper</strong> willmake secure connections to theserver.vbroker.security.peerAuthenticationMode See description. Refer to the Security Propertiesfor Java or the Security Propertiesfor C++ section in the SecurityGuide for more details.vbroker.security.trustpointsRepository See description. Refer to the Security Propertiesfor Java or the Security Propertiesfor C++ section in the SecurityGuide for more details.vbroker.security.wallet.identity See description. Refer to the Security Propertiesfor Java or the Security Propertiesfor C++ section in the SecurityGuide for more details.vbroker.security.wallet.password See description. Refer to the Security Propertiesfor Java or the Security Propertiesfor C++ section in the SecurityGuide for more details.Appendix A: <strong>GateKeeper</strong> properties 71


Location services (Smart Agent)Location services (Smart Agent)The following table l<strong>is</strong>ts the Smart Agent (OSAgent) properties used in the LocationService to locate server objects.Property Default Descriptionvbroker.agent.addr null – seedescription.Specifies the IP address or host name of the hostrunning the Smart Agent (OSAgent). The defaultvalue, null, installs V<strong>is</strong>iBroker applications to use thevalue from the OSAGENT_ADDR environmentvariable. If the OSAGENT_ADDR variable <strong>is</strong> notset,it <strong>is</strong> assumed that the Smart Agent <strong>is</strong> running onthe local host or will be located by a broadcastmessage. Refer to “Using the Smart Agent” in theV<strong>is</strong>iBroker for C++ Developer's Guide or theV<strong>is</strong>iBroker for Java Developer's Guide for moredetails.vbroker.agent.port null Specifies the port number that defines a domainwithin your network. V<strong>is</strong>iBroker applications andSmart Agent (OSAgent) work together when theyhave the same port number. Th<strong>is</strong> <strong>is</strong> the sameproperty as the OSAGENT_PORT environmentvariable.Refer to “Using the Smart Agent” section in theV<strong>is</strong>iBroker for C++ Developer's Guide or theV<strong>is</strong>iBroker for Java Developer's Guide for moredetails.vbroker.agent.addrFile null Specifies a file that stores information on where theIP address(es) or host names(s) of the Smart Agentmay be found. Refer to “Using the Smart Agent”section in the V<strong>is</strong>iBroker for C++ Developer's Guideor the V<strong>is</strong>iBroker for Java Developer's Guide formore details.vbroker.agent.failOvervbroker.agent.enableCachetruefalsetruefalseWhen set to true, allows a V<strong>is</strong>iBroker application tofailover to another Smart Agent. Refer to “Using theSmart Agent” section in the V<strong>is</strong>iBroker for C++Developer's Guide or the V<strong>is</strong>iBroker for JavaDeveloper's Guide for more details.When set to true, allows V<strong>is</strong>iBroker applications tocache object references. Setting th<strong>is</strong> property to trueimproves performance when locating servers, butd<strong>is</strong>ables Smart Agent round-robin activity. Refer to“Using the Smart Agent” section in the V<strong>is</strong>iBroker forC++ Developer's Guide or the V<strong>is</strong>iBroker for JavaDeveloper's Guide for more details.72 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Backward compatibility with V<strong>is</strong>iBroker 4.x and belowBackward compatibility with V<strong>is</strong>iBroker 4.x and below<strong>GateKeeper</strong> Version 5.x by default <strong>is</strong> not compatible with programs developed withV<strong>is</strong>iBroker 4.x and below. To make <strong>GateKeeper</strong> Version 5.x run properly with programsdeveloped with V<strong>is</strong>iBroker 4.x and below, set the following property to true.NoteEarlier versions of <strong>GateKeeper</strong> are by default compatible with older programsdeveloped with V<strong>is</strong>ibroker 4.x and below. With <strong>GateKeeper</strong> 5.x, however, you mustexplicitly set th<strong>is</strong> property.Property Default Descriptionvbroker.orb.enableVB4backcompattruefalseSpecifies whether <strong>GateKeeper</strong> <strong>is</strong> compatible witholder V<strong>is</strong>iBroker versions. Setting the property tofalse makes <strong>GateKeeper</strong> compatible withprograms developed with V<strong>is</strong>iBroker 4.5.xonwards. Setting th<strong>is</strong> property to true makes<strong>GateKeeper</strong> compatible with versions earlier thanV<strong>is</strong>iBroker 4.5.x as well. (See Appendix B for moreinformation.)Note: Th<strong>is</strong> value <strong>is</strong> set to true by default in<strong>GateKeeper</strong>. Th<strong>is</strong> value, however, <strong>is</strong> false bydefault on the client and server.Server's properties for firewall specificationsNoteThese properties should only be set in the property file for the server. If you set any ofthese properties then you load the appropriate library. See the description ofvbroker.orb.dynamicLibs in the section “M<strong>is</strong>cellaneous ORB properties”.The following properties specify the communication paths from the client to the server.See “Specifying communication paths to the server” for examples of its usage.Property Default Descriptionvbroker.se.iiop_tp.firewallPathsvbroker.firewall-path.vbroker.firewall..typevbroker.firewall..iorvbroker.firewall..hostvbroker.firewall..iiop_portPROXY TCPIOR:


M<strong>is</strong>cellaneous ORB propertiesProperty Default Descriptionvbroker.firewall..ssl_portvbroker.firewall..hiop_portSpecifies a fake SSL port for the server. Th<strong>is</strong> <strong>is</strong>specified together withvbroker.firewall..type=TCP and thecomponent <strong>is</strong> a TCP Firewall with NAT.Specifies a fake HIOP port for the server. Th<strong>is</strong> <strong>is</strong>specified together withvbroker.firewall..type=TCP and thecomponent <strong>is</strong> a TCP Firewall with NAT.M<strong>is</strong>cellaneous ORB propertiesThese properties are common ORB objects and are directly and indirectly related to<strong>GateKeeper</strong>. They are not necessarily set in the <strong>GateKeeper</strong> property file, so pleaseread each description carefully.Property Default Descriptionvbroker.orb.gatekeeper.iorvbroker.orb.alwaysProxyvbroker.locator.ior.iorvbroker.orb.alwaysTunnelvbroker.orb.dynamicLibsfalse – d<strong>is</strong>abletrue – enabledfalse – d<strong>is</strong>abledtrue – enabledSee descriptionSpecifies the URL of the <strong>GateKeeper</strong> IORfile. Th<strong>is</strong> property must be set in the HTMLfiles with applets because of the change inthe behavior of the Applet Viewer.Specifies whether the client must alwaysconnect to the server via <strong>GateKeeper</strong>. Th<strong>is</strong>property can be set in the client or<strong>GateKeeper</strong>. If set in the client, the client willalways connect to the server via<strong>GateKeeper</strong>. If set in <strong>GateKeeper</strong>, it willconnect to the server via another<strong>GateKeeper</strong>. See the V<strong>is</strong>iBrokerProgrammer's Reference for more details.Specifies URL of the <strong>GateKeeper</strong> IOR file.Th<strong>is</strong> property <strong>is</strong> usually set in the clientapplet, but can also be set in an application.Note: <strong>GateKeeper</strong> provides limited locationservices. It cannot forward location requeststo another <strong>GateKeeper</strong>. Th<strong>is</strong> <strong>is</strong> in contrast tothe Smart Agent which <strong>is</strong> able to forwardrequests to another available Smart Agent.Specifies whether the client must alwaysmake HTTP tunnel (IIOP wrapper)connections to the server. Th<strong>is</strong> property canbe set in the client or <strong>GateKeeper</strong>. See theV<strong>is</strong>iBroker Programmer's Reference for moredetails.Specifies a l<strong>is</strong>t of libraries. Only librariesrelated to <strong>GateKeeper</strong> are described here.If the firewall component <strong>is</strong> specified, youmust set th<strong>is</strong> property in the properties of theclient and server to:com.inpr<strong>is</strong>e.vbroker.firewall.InitIf the load balancing component <strong>is</strong>specified, you must set th<strong>is</strong> property in<strong>GateKeeper</strong>'s property file to:com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.Init74 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


M<strong>is</strong>cellaneous ORB propertiesAppendix A: <strong>GateKeeper</strong> properties 75


76 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Appendix<strong>GateKeeper</strong> deployment scenariosTh<strong>is</strong> appendix shows some common deployment scenarios in a multi-networkenvironment with and without using <strong>GateKeeper</strong>.TCP firewall (without <strong>GateKeeper</strong>)Scenario 1.1: Smart Agent behind firewallTh<strong>is</strong> scenario shows how to configure a client object to access a Smart Agent locatedbehind a firewall.Client's environment setting (using environment variables or Windows Reg<strong>is</strong>try):OSAGENT_PORTClient's properties:vbroker.agent.addr=vbroker.agent.port=Firewall settings:– Allow UDP packets for both directions between the client host and the Smart Agenthost on port .– Allow TCP and UDP packets for both directions between the client host and theSmart Agent host on port .Appendix B: <strong>GateKeeper</strong> deployment scenarios 77


TCP firewall (without <strong>GateKeeper</strong>)Scenario 1.2: Using IIOP communicationClient's properties: none requiredServer's properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683Firewall setting:Allow TCP packet from client host to server host on port 683.Scenario 1.3: Using IIOP/SSL communicationSecured Client's properties:# Enabling Security Servicevbroker.security.d<strong>is</strong>able=false# Enforcing secure transport at client sidevbroker.security.alwaysSecure=true# Setting peerAuthenticationModevbroker.security.peerAuthenticationMode=REQUIRE_AND_TRUSTvbroker.security.trustpointsRepository=Directory:./trustpointsSecured Server's properties:# Enabling Security Servicevbroker.security.d<strong>is</strong>able=false# Setting SSL Layer Attributesvbroker.security.peerAuthenticationMode=REQUIRE_AND_TRUSTvbroker.security.trustpointsRepository=Directory:./trustpoints# Set the ssl l<strong>is</strong>tener port at 443vbroker.se.iiop_tp.scms=iiop_tp,sslvbroker.se.iiop_tp.scm.ssl.l<strong>is</strong>tener.port=443vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOP78 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


TCP firewall (without <strong>GateKeeper</strong>)NoteThe sample properties assume that valid certificate information has already beenloaded into the Secured Client and Secured Server similar to the /examples/vbroker/security/bank_ssl example.Firewall setting:Allow SSL packet from client host to server host on port 443.Scenario 1.4: Firewall performs address translation onlyFirewall setting:Address translation: 199.10.9.6 to 101.10.2.6Server's properties: Use only one of the following two methods.Method 1: Using IIOP profilevbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.proxyHost=199.10.9.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683Method 2: Using firewall componentvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683vbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fwvbroker.firewall.fw.type=TCPvbroker.firewall.fw.host=199.10.9.6vbroker.firewall.fw.iiop_port=683vbroker.firewall.fw.hiop_port=0NoteSpecify real port when there <strong>is</strong> no port translation, and 0 if the l<strong>is</strong>tener port <strong>is</strong> d<strong>is</strong>abled.Appendix B: <strong>GateKeeper</strong> deployment scenarios 79


TCP firewall (without <strong>GateKeeper</strong>)Scenario 1.5: Firewall performs port translation onlyFirewall setting:Port translation: 1683 to 683Server's properties: Use only one of the following two methods.Method 1: Using IIOP profilevbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=1683Method 2: Using firewall componentvbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fwvbroker.firewall.fw.type=TCPvbroker.firewall.fw.host=101.10.2.6vbroker.firewall.fw.iiop_port=1683vbroker.firewall.fw.hiop_port=0NoteSpecify real host when there <strong>is</strong> no address translation.When method 2 <strong>is</strong> used, add the following to the client's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.InitScenario 1.6: Firewall performs both address and port translationsCombine the settings in Scenarios 1.4 and 1.5 when the firewall performs both addressand port translation.80 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


TCP firewall (without <strong>GateKeeper</strong>)NoteFor firewall component method, specify the firewall once combining both the fake hostand fake port into the same firewall entry like the following:vbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fwvbroker.firewall.fw.type=TCPvbroker.firewall.fw.host=199.10.9.6vbroker.firewall.fw.iiop_port=1683vbroker.firewall.fw.hiop_port=0NoteFor secure connection with NAT (Network Address Translation), use the securityproperties settings in Scenario 1.3.Scenario 1.7: Callback without NATRefer to Scenario 1.2 for forward communication settings.Client's properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=16001Firewall setting:Allow TCP packet from server host to client host on port 16001.Scenario 1.8: Callback with NATRefer to Scenario 1.2 for forward communication settings.Firewall setting:Address translation: 130.129.129.10 to 99.29.29.10 for packets from server network toclient network. Port translation: 16100 to 16001 for packets from server network toclient network.Appendix B: <strong>GateKeeper</strong> deployment scenarios 81


TCP firewall (without <strong>GateKeeper</strong>)Client's properties:vbroker.se.iiop_tp.host=99.29.29.10vbroker.se.iiop_tp.proxyHost=130.129.129.10vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=16001vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=16100Scenario 1.9: Bidirectional communicationUse the settings in Scenario 1.2, 1.3, 1.4, 1.5, or 1.6 with the following additionalsettings to enable bidirectional communication.In the figure above, the same connections are used for both forward and reversecommunications paths.Client's Properties:vbroker.orb.enableBiDir=clientServer's Properties:vbroker.orb.enableBiDir=serverScenario 1.10: Multiple firewalls in front of serverTh<strong>is</strong> scenario shows two firewalls in front of the server host. It can be extendedsimilarly to more than two firewalls.Both firewalls do not perform NATWhen both firewalls do not perform NAT, configure both the firewalls to allow TCPpackets (for IIOP communication) on port Ps.Only Firewall 1 performs NAT82 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


TCP firewall (without <strong>GateKeeper</strong>)Firewall performs the following NAT:– Address translation: H1 to HsPort translation: P1 to Ps– Firewall 2 must be configured to allow TCP packets on port Ps.– Clients will send IIOP packets to host H1 on port P1.Server's properties: Use only one of the following two methods.Method 1: Using IIOP profilevbroker.se.iiop_tp.host=vbroker.se.iiop_tp.proxyHost=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=Method 2: Using firewall componentvbroker.se.iiop_tp.host=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fw1vbroker.firewall.fw1.type=TCPvbroker.firewall.fw1.host=vbroker.firewall.fw1.iiop_port=vbroker.firewall.fw1.hiop_port=0Only firewall2 performs NATFirewall2 performs the following NAT:– Address translation: H2 to HsPort translation: P2 to Ps– Firewall1 must be configured to allow TCP packets on port P2.– Clients will send IIOP packets to host H2 on port P2.Server's properties: Use only one of the following two methods.Method 1: Using IIOP profilevbroker.se.iiop_tp.host=vbroker.se.iiop_tp.proxyHost=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=Appendix B: <strong>GateKeeper</strong> deployment scenarios 83


TCP firewall (without <strong>GateKeeper</strong>)Method 2: Using firewall componentvbroker.se.iiop_tp.host=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fw2vbroker.firewall.fw2.type=TCPvbroker.firewall.fw2.host=vbroker.firewall.fw2.iiop_port=vbroker.firewall.fw2.hiop_port=0Both firewalls perform NATFirewall1 performs the following NAT:– Address translation: H1 to H2Port translation: P1 to P2– Firewall2 performs the following NAT:– Address translation: H2 to HsPort translation: P2 to Ps– Clients will send IIOP packets to host H1 on port P1.Server's properties: Use only one of the following two methods.Method 1: Using IIOP profilevbroker.se.iiop_tp.host=vbroker.se.iiop_tp.proxyHost=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=Method 2: Using firewall componentvbroker.se.iiop_tp.host=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fw1vbroker.firewall.fw1.type=TCPvbroker.firewall.fw1.host=vbroker.firewall.fw1.iiop_port=vbroker.firewall.fw1.hiop_port=0NoteThe NAT information of Firewall2 does not need to be configured. The proxyHost andproxyPort specify only the first NAT fake host and fake port. For the firewall componentand the firewall path, only specify the first NAT device.84 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> deployment<strong>GateKeeper</strong> deploymentScenario 2.1: <strong>GateKeeper</strong> as Web Server<strong>GateKeeper</strong> can acts as a Web Server to serve HTML pages, client applet and IORfiles.Set the <strong>GateKeeper</strong> HTTP l<strong>is</strong>tener using the following <strong>GateKeeper</strong>'s properties:vbroker.se.exterior.scms=ex-iiop,ex-hiopvbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088From the web browser of the client host,– Use the following to load an HTML file or client applet:http://gatekeeper:8088/ClientApplet.html– Use the following to load <strong>GateKeeper</strong>'s IOR:http://gatekeeper:8088/gatekeeper.iorConfigure the client applet (ClientApplet.html) using the following example:Any additional client properties needed can be set similarly using param name andvalue.Scenario 2.2: <strong>GateKeeper</strong> as IIOP ProxyAppendix B: <strong>GateKeeper</strong> deployment scenarios 85


<strong>GateKeeper</strong> deploymentClient's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.alwaysProxy=true<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088Server's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://gatekeeper:8088/gatekeeper.iorIf the client <strong>is</strong> an applet that wants to use IIOP instead of HTTP Tunneling, use thefollowing configuration, do not specify the property:Scenario 2.3: HTTP Tunneling ConnectionClient's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Init,com.inpr<strong>is</strong>e.vbroker.HIOP.Initvbroker.orb.alwaysTunnel=truevbroker.orb.alwaysProxy=truevbroker.orb.gatekeeper.ior=http://gatekeeper:8088/gatekeeper.ior<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683Server's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://gatekeeper:8088/gatekeeper.iorvbroker.orb.exportFirewallPath=trueIf the client <strong>is</strong> an applet that wants to use HTTP Tunneling, use the followingconfiguration:86 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> deploymentScenario 2.4: Secure connection (SSL)Client's properties:# Firewall related propertiesvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.alwaysProxy=true# Set SSL related propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.wallet.type=Directory:./identitiesvbroker.security.wallet.identity= paulvbroker.security.wallet.password= Paul$$$$vbroker.security.trustpointsRepository=Directory:./trustpoints<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.scms=ex-iiop,ex-sslvbroker.se.exterior.scms.ex-iiop.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPvbroker.se.exterior.scms.ex-hiop.l<strong>is</strong>tener.port=8088vbroker.se.exterior.scms.ex-ssl.l<strong>is</strong>tener.port=443# Set SSL related propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.wallet.type=Directory:./identitiesvbroker.security.wallet.identity= kevinvbroker.security.wallet.password= Kevin$$$$vbroker.security.trustpointsRepository=Directory:./trustpointsvbroker.se.iiop_tp.scm.ssl.l<strong>is</strong>tener.port=Server's properties:# Firewall related propertiesvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://gatekeeper:8088/gatekeeper.ior# SSL related propertiesvbroker.security.d<strong>is</strong>able=falsevbroker.security.wallet.type=Directory:./identitiesvbroker.security.wallet.identity= kevinAppendix B: <strong>GateKeeper</strong> deployment scenarios 87


<strong>GateKeeper</strong> deploymentvbroker.security.wallet.password= Kevin$$$vbroker.security.trustpointsRepository=Directory:./trustpointsvbroker.se.iiop_tp.scms=iiop_tp,sslvbroker.se.iiop_tp.scm.ssl.l<strong>is</strong>tener.port=vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPScenario 2.5: Secure HTTP TunnelingUse the client and server settings in Scenario 2.4 and add the following to the client'sproperties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Init,com.inpr<strong>is</strong>e.vbroker.HIOP.Initcom.inpr<strong>is</strong>e.security.Init,com.inpr<strong>is</strong>e.security.hiops.Initvbroker.orb.alwaysTunnel=true<strong>GateKeeper</strong>'s properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.security.Init,com.inpr<strong>is</strong>e.vbroker.gatekeeper.ssl.Init,com.inpr<strong>is</strong>e.security.hiops.Initvbroker.se.exterior.scms=ex-IIOP,ex-hiop,ex-hiopsvbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.type=D<strong>is</strong>abled-IIOPvbroker.se.exterior.scm.ex-hiops.l<strong>is</strong>tener.port=443vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088vbroker.security.wallet.type=Directory:./identitiesvbroker.security.wallet.identity=Kevinvbroker.security.wallet.password=Kevin$$$vbroker.security.secureTransport=truevbroker.security.trustpointsRepository=Directory:./trustpointsvbroker.security.peerAuthenticationMode=noneScenario 2.6: Callback connection (for V<strong>is</strong>iBroker 3.x style)Refer to Scenario 2.2 for forward communication settings.Set the following client's property:vbroker.se.iiop_tp.scm.iiop_tp.type=Callback-IIOPvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.gatekeeper=http://gk_host:8088/gatekeeper.ior88 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> deploymentEnable <strong>GateKeeper</strong> callback (V<strong>is</strong>iBroker 3.x style) using the following <strong>GateKeeper</strong>'sproperties:vbroker.gatekeeper.callbackEnabled=truevbroker.gatekeeper.backcompat.callback=truevbroker.gatekeeper.backcompat.callback.l<strong>is</strong>teners=iiopvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.port=vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.type=IIOPCallbackThe interior port in-iiop <strong>is</strong> automatically enabled when callback <strong>is</strong> enabled. Only forsecured callback, you need to add the SCM for in-ssl, ex-ssl and ex-hiops asrequired.Scenario 2.7: Bidirectional communicationUse the settings in Scenario 2.2, 2.3, 2.4, or 2.5 with the following additional settings toenable bidirectional communication.Client's Properties:vbroker.orb.enableBiDir=clientServer's Properties:vbroker.orb.enableBiDir=server<strong>GateKeeper</strong>'s Properties:vbroker.orb.enableBiDir=bothScenario 2.8: Pass-through connectionUse the settings in Scenario 2.2 or 2.4 with the following additional settings to enablepass-through connection.Client's Properties:vbroker.orb.proxyPassthru=true<strong>GateKeeper</strong>'s Properties:vbroker.gatekeeper.enablePassthru=trueScenario 2.9: <strong>GateKeeper</strong> in dual-homed host configurationAppendix B: <strong>GateKeeper</strong> deployment scenarios 89


<strong>GateKeeper</strong> with server-side firewallUse the following <strong>GateKeeper</strong>'s properties to configure:– exterior host and interior host addressvbroker.se.exterior.host=199.10.9.5vbroker.se.interior.host=101.10.2.6– exterior l<strong>is</strong>tener portsvbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=– interior l<strong>is</strong>tener ports (used for V<strong>is</strong>iBroker 3.x style callback)vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=<strong>GateKeeper</strong> with server-side firewallNoteRouters can also perform the function of a firewall.Firewall in front of <strong>GateKeeper</strong>Scenario 3.1: Firewall performs packet-filtering without NAT<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088Firewall setting:Allow routing of TCP packets on port 683 and HTTP packets on port 8088 from theexternal network to the internal network.Server's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://101.10.2.10:8088/gatekeeper.ior90 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> with server-side firewallScenario 3.2: Firewall performs NATFirewall NAT setting:Address translation: 199.10.9.10 to 101.10.2.10 Port translations: 10683 to 683 and8000 to 8088There are two methods for specifying a NAT on a firewall in front of <strong>GateKeeper</strong> (useonly one of the following two methods):– Using <strong>GateKeeper</strong>'s proxyHost and proxyPort configuration<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.host=101.10.2.10vbroker.se.exterior.proxyHost=199.10.9.10vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.proxyPort=10683vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.proxyPort=8000Server's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://101.10.2.10:8088/gatekeeper.ior– Using the server's firewall component<strong>GateKeeper</strong>'s properties:vbroker.se.exterior.host=101.10.2.10vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port=8088Appendix B: <strong>GateKeeper</strong> deployment scenarios 91


<strong>GateKeeper</strong> with server-side firewallServer's properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=fw,gkvbroker.firewall.fw.type=TCPvbroker.firewall.fw.host=199.10.9.10vbroker.firewall.fw.iiop_port=10683vbroker.firewall.fw.hiop_port=8000vbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://101.10.2.10:8088/gatekeeper.iorScenario 3.3: Callback connection (for V<strong>is</strong>iBroker 3.x style)Refer to Scenario 3.1 or 3.2 for forward communication settings.Set the following client's property:vbroker.se.iiop_tp.scm.iiop_tp.type=Callback-IIOPvbroker.se.iiop_tp.scm.iiop.l<strong>is</strong>tener.gatekeeper=http://gk_host:8088/gatekeeper.iorEnable <strong>GateKeeper</strong> callback (V<strong>is</strong>iBroker 3.x style) and specify the callback port usingthe following properties:vbroker.gatekeeper.callbackEnabled=truevbroker.gatekeeper.backcompat.callback=truevbroker.gatekeeper.backcompat.callback.host=101.10.2.10vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>teners=iiopvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.port=2683vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.type=IIOPCallbackThe firewall must allow the client to establ<strong>is</strong>h a callback connection (TCP protocol) to<strong>GateKeeper</strong> using port 2683.Configure the interior ports using the following <strong>GateKeeper</strong>'s properties:vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=1600092 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> with server-side firewallIf the firewall performs NAT on the <strong>GateKeeper</strong>'s host and callback port (addresstranslation:199.10.9.10 to 101.10.2.10 and port translation: 12683 to 2683), add thefollowing into <strong>GateKeeper</strong>'s properties:vbroker.gatekeeper.backcompat.callback.proxyHost=199.10.9.10vbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.proxyPort=12683Scenario 3.4: Bidirectional communicationUse the settings in Scenario 3.1 or 3.2 with the following additional settings to enablebidirectional communication.Client's Properties:vbroker.orb.enableBiDir=clientServer's Properties:vbroker.orb.enableBiDir=server<strong>GateKeeper</strong>'s Properties:vbroker.orb.enableBiDir=bothScenario 3.5: Pass-through connectionUse the settings in Scenario 3.1 or 3.2 with the following additional settings to enablepass-through connection.Client's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.proxyPassthru=true<strong>GateKeeper</strong>'s Properties:vbroker.gatekeeper.enablePassthru=truevbroker.gatekeeper.passthru.inPortMin=vbroker.gatekeeper.passthru.inPortMax=Firewall setting:CautionAllow routing of TCP packets on port range to from theclient host to the <strong>GateKeeper</strong>. The firewall must not perform port translation on th<strong>is</strong>range of ports.Firewall in front and behind of <strong>GateKeeper</strong><strong>GateKeeper</strong> <strong>is</strong> deployed in the Demilitarized Zone (DMZ) while the servers aredeployed in the internal network.NoteRefer to the previous section for a configuration related to a firewall in front of<strong>GateKeeper</strong>. Th<strong>is</strong> section concentrates on the configuration related to the firewallbetween the <strong>GateKeeper</strong> and servers.Appendix B: <strong>GateKeeper</strong> deployment scenarios 93


<strong>GateKeeper</strong> with server-side firewallScenario 4.1: Configuring firewall behind <strong>GateKeeper</strong>Use the settings in Scenario 3.1 or 3.2 to configure the communication between clientsand <strong>GateKeeper</strong>. The settings described here should be used in conjunction to thesettings in Scenario 3.1 or 3.2.Specify the server IIOP l<strong>is</strong>tener port using the following server's properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683Configure Firewall2 to allow IIOP packet (TCP protocol) from <strong>GateKeeper</strong> to the serverhost on port 683.Scenario 4.2: Firewall behind <strong>GateKeeper</strong> performs NATUse the settings in Scenario 3.1 or 3.2 to configure the communication between clientsand <strong>GateKeeper</strong>. The settings described here should be used in conjunction to thesettings in Scenario 3.1 or 3.2.Firewall2 NAT setting:Address translation: 199.10.9.10 to 101.10.2.10Ports translation: 1683 to 683There are two methods for specifying NAT on Firewall2. Use only one of the followingtwo methods.94 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> with server-side firewallServer's properties:Method 1: Using IIOP profilevbroker.se.iiop_tp.host=101.10.2.6vbroker.se.iiop_tp.proxyHost=199.10.9.6vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=683vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=1683Method 2: Using firewall componentvbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gk,fw2vbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://gatekeeper:8088/gatekeeper.iorvbroker.firewall.fw2.type=TCPvbroker.firewall.fw2.host=199.10.9.6vbroker.firewall.fw2.iiop_port=1683vbroker.firewall.fw2.hiop_port=0Scenario 4.3: Callback connection (for V<strong>is</strong>iBroker 3.x style)Use the settings in Scenario 3.3 callback connection between client and <strong>GateKeeper</strong>.Configure the interior ports using the following <strong>GateKeeper</strong>'s properties:vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=16000Firewall2 must allow the server to communicate with <strong>GateKeeper</strong> on port 16000 usingTCP protocol.If Firewall2 performs the following NAT for packets routed from the server to<strong>GateKeeper</strong>:Address Translation: 121.100.2.19 to 101.10.2.10Port Translation: 161000 to 16000Then add the following properties to the <strong>GateKeeper</strong>'s properties:vbroker.se.interior.host=101.10.2.10vbroker.se.interior.proxyHost=121.100.2.19vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=16000vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.proxyPort=16100Appendix B: <strong>GateKeeper</strong> deployment scenarios 95


<strong>GateKeeper</strong> with server-side firewallScenario 4.4: Bidirectional communicationUse the settings in Scenario 4.1 or 4.2 with the following additional settings to enablebidirectional communication.Client's Properties:vbroker.orb.enableBiDir=clientServer's Properties:vbroker.orb.enableBiDir=server<strong>GateKeeper</strong>'s Properties:vbroker.orb.enableBiDir=bothScenario 4.5: Pass-through connectionUse the settings in Scenario 4.1 or 4.2 with the following additional settings to enablepass-through connection.Client's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.proxyPassthru=true<strong>GateKeeper</strong>'s Properties:vbroker.gatekeeper.enablePassthru=truevbroker.gatekeeper.passthru.inPortMin=vbroker.gatekeeper.passthru.inPortMax=vbroker.gatekeeper.passthru.outPortMin=vbroker.gatekeeper.passthru.outPortMax=Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=CautionThe value of must fall in the range of and.Configure Firewall1 to allow routing of TCP packets in port range to from the client host to the <strong>GateKeeper</strong>. Configure Firewall2 to allowrouting of TCP packets in port range to from the<strong>GateKeeper</strong> to the server host. The firewalls must not perform port translation on theseports.Scenario 4.6: Smart Agent in internal networkUse the settings in Scenario 1.1 assuming <strong>GateKeeper</strong> <strong>is</strong> the client.96 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> with client-side firewall<strong>GateKeeper</strong> with client-side firewallScenario 5.1: Firewall allows IIOPThe client-side firewall allows clients from the internal network to send IIOP messages(TCP protocol) to the external network.Refer to Scenarios 3.x replacing the server-side firewall in front of <strong>GateKeeper</strong> with aclient-side firewall. As <strong>GateKeeper</strong> <strong>is</strong> outside the client domain, the client-sideadmin<strong>is</strong>trator who control the firewall, usually does not have the authority to modify the<strong>GateKeeper</strong>'s configuration. The admin<strong>is</strong>trator has to collect the <strong>GateKeeper</strong>'s l<strong>is</strong>tenerports information to configure the client-side firewall accordingly.Scenario 5.2: Firewall allows HTTP onlyThe client-side firewall allows clients from the internal network to send HTTPmessages only to the external network. IIOP message will be blocked by the firewall.Therefore, clients have to use HTTP tunneling to communicate with a <strong>GateKeeper</strong>outside the client-side firewall.Set the following client's property to force the client to always use HTTP tunneling.Notevbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.alwaysTunnel=trueHTTP tunneling does not support the V<strong>is</strong>iBroker 3.x style callback. If callback <strong>is</strong>required, use a bidirectional connection. Pass-through connection <strong>is</strong> also not availablewith HTTP tunneling.Appendix B: <strong>GateKeeper</strong> deployment scenarios 97


<strong>GateKeeper</strong> load balancing and fault-tolerance<strong>GateKeeper</strong> load balancing and fault-toleranceScenario 6.1: Using multiple <strong>GateKeeper</strong>s for fault-toleranceInstead of relying on a single <strong>GateKeeper</strong>, you can deploy multiple <strong>GateKeeper</strong>s forfault-tolerance. Assign more than one <strong>GateKeeper</strong>s to a server to create redundancy.The server's properties in th<strong>is</strong> example are as follows:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=p1,p2vbroker.firewall-path.p1=gk1vbroker.firewall.gk1.type=PROXYvbroker.firewall.gk1.ior=http://gk1_host:8088/gatekeeper.iorvbroker.firewall-path.p2=gk2vbroker.firewall.gk2.type=PROXYvbroker.firewall.gk2.ior=http://gk2_host:8088/gatekeeper.iorThe following property <strong>is</strong> required for both GK1 and GK2:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.InitClients can use either GK1 or GK2 to communicate with the server. When one<strong>GateKeeper</strong> <strong>is</strong> down, the client can use the other one to communicate with the server.98 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> load balancing and fault-toleranceScenario 6.2: Master/Slave configuration for load balancingThe figure above shows a master/slave <strong>GateKeeper</strong> configuration with GK1 as themaster <strong>GateKeeper</strong> while GK2 and GK3 are the slave <strong>GateKeeper</strong>s<strong>GateKeeper</strong> GK1 properties (master):vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.Initvbroker.gatekeeper.load.slaves=gk2,gk3vbroker.gatekeeper.load.slave.gk2=http://gk2_host:8088/gatekeeper.iorvbroker.gatekeeper.load.slave.gk3=http://gk3_host:8088/gatekeeper.iorNo additional properties are required for slave <strong>GateKeeper</strong>s GK1 and GK2:Server's Properties (specify only the master <strong>GateKeeper</strong>):vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gk1vbroker.firewall.gk1.type=PROXYvbroker.firewall.gk1.ior=http://gk1_host:8088/gatekeeper.iorIf the client <strong>is</strong> not able to obtain the server's IOR directly, then the client can specify a<strong>GateKeeper</strong> to contact using the following property:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.gatekeeper.ior=http://gk1_host:8088/gatekeeper.iorTh<strong>is</strong> configuration also provides fault-tolerance. For each connecting client, the master<strong>GateKeeper</strong> assigns the next slave <strong>GateKeeper</strong> in turn to serve the client, but if thatslave <strong>GateKeeper</strong> <strong>is</strong> down, the client will come back to the master <strong>GateKeeper</strong> to getassigned to the next available slave <strong>GateKeeper</strong>, and so on, until the client obtains ausable <strong>GateKeeper</strong>.The master <strong>GateKeeper</strong> actually keeps a l<strong>is</strong>t of available <strong>GateKeeper</strong>s, which it canassign to a connecting client. The l<strong>is</strong>t contains all slave <strong>GateKeeper</strong>s as well as themaster <strong>GateKeeper</strong> itself. Therefore, when its turn comes around, the master<strong>GateKeeper</strong> will assign itself to a client.When the following property <strong>is</strong> set on the master <strong>GateKeeper</strong>, the master <strong>GateKeeper</strong><strong>is</strong> not included in the l<strong>is</strong>t.vbroker.gatekeeper.load.balancer=masterIn the case that all slave <strong>GateKeeper</strong>s are down, in order to prevent clients fromcoming back to the master <strong>GateKeeper</strong> for obtaining a usable <strong>GateKeeper</strong> again andagain infinitely, the following property should be set on the client side:Appendix B: <strong>GateKeeper</strong> deployment scenarios 99


<strong>GateKeeper</strong> load balancing and fault-tolerancevbroker.orb.rebindForward=Nwhere N must be less than the number of slave <strong>GateKeeper</strong>s.When the master <strong>GateKeeper</strong> itself <strong>is</strong> down, the rebind mechan<strong>is</strong>m on the client ORBwill make all clients connect through the first available slave <strong>GateKeeper</strong>, there will beno load balancing in th<strong>is</strong> situation as the load balance functionality <strong>is</strong> in the master<strong>GateKeeper</strong> and the master <strong>is</strong> down. However, fault tolerance <strong>is</strong> preserved becauseclients still can get through and connect to the servers.Scenario 6.3: Multiple instances of same server for load balancingYou can deploy multiple instances of the same server to provide load balancing andfault-tolerance for the server. For load balancing, the <strong>GateKeeper</strong> will direct the requestto the multiple servers using a round-robin mechan<strong>is</strong>m. For fault-tolerance, if oneserver <strong>is</strong> down, another server can continue to provide the same service.Add the following property to the <strong>GateKeeper</strong>:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.InitServer1 and Server2 properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gkvbroker.firewall.gk.type=PROXYvbroker.firewall.gk.ior=http://gk_host:8088/gatekeeper.ior100 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> chaining<strong>GateKeeper</strong> chainingScenario 7.1: Server-side chainingUse the following server's properties to specify the server-side <strong>GateKeeper</strong> chaining:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gk1,gk2vbroker.firewall.gk1.type=PROXYvbroker.firewall.gk1.ior=http://gk1_host:8088/gatekeeper.iorvbroker.firewall.gk2.type=PROXYvbroker.firewall.gk2.ior=http://gk2_host:8088/gatekeeper.iorWhen the client obtains the server's IOR, it will be able to use the <strong>GateKeeper</strong> chainingto communicate with the server.Scenario 7.2: Client-side chainingClient's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.gatekeeper.ior=http://GK1:8088/gatekeeper.iorGK1's Properties:vbroker.orb.gatekeeper.ior=http://GK2:8088/gatekeeper.iorNoteIn order for the client to communicate with the server using the chained <strong>GateKeeper</strong>s,the last <strong>GateKeeper</strong> on the chain (GK2) must be able to obtain the server's IOR.Appendix B: <strong>GateKeeper</strong> deployment scenarios 101


<strong>GateKeeper</strong> chainingScenario 7.3: Both server-side and client-side chainingClient's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.gatekeeper.ior=http://gk_host:8088/gatekeeper.iorServer's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.p=gk2vbroker.firewall.gk2.type=PROXYvbroker.firewall.gk2.ior=http://gk2_host:8088/gatekeeper.iorIf GK1 always connect to GK2, you can chain GK1 to GK2 statically using the followingGK1 property:vbroker.orb.gatekeeper.ior=http://gk2_host:8088/gatekeeper.iorOtherw<strong>is</strong>e, GK1 must be able to obtain the IOR of the server or GK2 using a SmartAgent or Naming Services.Scenario 7.4: Callback communication (V<strong>is</strong>iBroker 3.x style)Set the following properties to allow V<strong>is</strong>iBroker 3.x style callback communication.Client's Properties:vbroker.orb.alwaysProxy=truevbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.type=Callback-IIOPvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.gatekeeper=http://gk1_host:8088/gatekeeper.ior102 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


<strong>GateKeeper</strong> chainingGK1 and GK2 properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.gatekeeper.ext.Initvbroker.gatekeeper.callbackEnabled=truevbroker.gatekeeper.backcompat.callback=truevbroker.gatekeeper.backcompat.callback.l<strong>is</strong>teners=iiopvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.type=IIOPCallbackvbroker.gatekeeper.backcompat.callback.l<strong>is</strong>tener.iiop.port=vbroker.gatekeeper.backcompat.callback.host=vbroker.se.interior.scm.in-iiop.l<strong>is</strong>tener.port=Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.firewallPaths=pvbroker.firewall-path.intranet=gk1,gk2vbroker.firewall.gk1.type=PROXYvbroker.firewall.gk1.ior=http://gk1_host:8088/gatekeeper.iorvbroker.firewall.gk2.type=PROXYvbroker.firewall.gk2.ior=http://gk2_host:8088/gatekeeper.iorScenario 7.5: Bi-directional connectionRefer to Scenario 7.1, 7.2, or 7.3.Add the following additional settings to enable bi-directional communication.Client's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.enableBiDir=clientServer's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.enableBiDir=serverGK1 and GK2 Properties:vbroker.orb.enableBiDir=bothScenario 7.6: Pass-through connectionRefer to the diagrams in Scenario 7.1, 7.2, or 7.3.Client's Properties:vbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Initvbroker.orb.proxyPassthru=trueGK1 and GK2 Properties:vbroker.gatekeeper.enablePassthru=truevbroker.gatekeeper.passthru.inPortMin=vbroker.gatekeeper.passthru.inPortMax=vbroker.gatekeeper.passthru.outPortMin=vbroker.gatekeeper.passthru.outPortMax=Server's Properties:vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=NoteThe value of must fall in the range of and of GK2. The range of and of GK2 must fallin the range of and of GK1.Appendix B: <strong>GateKeeper</strong> deployment scenarios 103


Using V<strong>is</strong>iBroker in a multiple firewall/subnet environmentIf there <strong>is</strong> a firewall between any of the hosts, refer to the following table for the ports tobe opened.Firewall locationBetween Client and GK1Between GK1 and GK2Between GK2 and ServerRange of open portsGK1 exterior IIOP and HIOP l<strong>is</strong>tener port, and GK1 and GK2 exterior IIOP and HIOP l<strong>is</strong>tener port, and GK2 and GK2 and CautionThe firewalls must not perform any port translation on the pass-through ports.Using V<strong>is</strong>iBroker in a multiple firewall/subnet environmentV<strong>is</strong>iBroker can be used in multiple firewall scenarios. In general, V<strong>is</strong>iBroker providestwo different approaches to cross firewalls.First, the Network Address Translation (also called TCP firewalls) can be configuredusing the following properties:vbroker.se.iiop_tp.host=www.realdomain.comvbroker.se.iiop_tp.proxyHost=www.fakedomain.comvbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.port=25000vbroker.se.iiop_tp.scm.iiop_tp.l<strong>is</strong>tener.proxyPort=32000In the above-mentioned configuration, the real host / port information <strong>is</strong> lost in the IOR,which means only the fake host /port <strong>is</strong> available in the IOR. Another commonlydeployed TCP firewall configuration <strong>is</strong> a server-side configuration. Since th<strong>is</strong>configuration <strong>is</strong> an ORB built-in mechan<strong>is</strong>m, it also applies to all types of services (forexample <strong>GateKeeper</strong>, Naming Service, and so forth).vbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.firewallPaths =Queenvbroker.firewall-path.Queen=Atlanticvbroker.firewall-path.Atlantic.type=TCPvbroker.firewall-path.Atlantic.host=www.fakedomain.comvbroker.firewall-path.Atlantic.iiop_port=32000vbroker.firewall-path.Atlantic.hiop_port=32003vbroker.firewall-path.Atlantic.ssl_port=32004The advantage of the technique above <strong>is</strong> that the configuration information <strong>is</strong> not lost.The internal client can connect to the servers directly using the real IP host / portinformation. The r<strong>is</strong>k involved with th<strong>is</strong> configuration, however, <strong>is</strong> that both the IP host /port (real and fake) are exposed in the generated IOR file.Second, <strong>GateKeeper</strong> can be run on the firewall server to act as a GIOP proxy server.Various mechan<strong>is</strong>ms are available in <strong>GateKeeper</strong> that are designed for differentpurposes. For example:– Normal mode: Used when the firewalls can allow at least one port for the GIOPProxy Server (such as <strong>GateKeeper</strong>). It <strong>is</strong> an automatic mode which can switch toHTTP tunneling if required.– Pass through mode: Used when the firewalls can allow a range of ports andpackets exchanged between the client and server that <strong>is</strong> not to be interpreted by<strong>GateKeeper</strong>. In such a scenario, <strong>GateKeeper</strong> will act as a resource manager only.<strong>GateKeeper</strong> acts as a resource manager because it allocates IP ports to be used bythe clients.104 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Firewall and Smart Agent scenario– HTTP tunneling: Used when the firewalls allow only HTTP traffic. In such ascenario, the GIOP Proxy Server cannot be run in the firewall. Instead, an HTTPproxy server sits before <strong>GateKeeper</strong>. The client ORB has a built in mechan<strong>is</strong>m toconvert GIOP messages into HTTP messages which will be sent to the HTTP proxyserver or the firewall. Then, the HTTP proxy server (or the applicable firewall)forwards the HTTP messages to <strong>GateKeeper</strong>. Additionally, <strong>GateKeeper</strong> will convertthe HTTP messages into GIOP messages and forwards it to the required target(such as server or another <strong>GateKeeper</strong>). Th<strong>is</strong> configuration <strong>is</strong> also useful in a clientsideconfiguration when outgoing HTTP traffic <strong>is</strong> allowed by the firewall, but othertypes of TCP connections are not allowed.NoteMultiple firewalls may need a combination of the above configuration techniques.Basically, the use of multiple firewalls <strong>is</strong> a deployment <strong>is</strong>sue and, therefore, all possiblecombinations cannot be covered in th<strong>is</strong> document. Some general guidelines are.– The Smart Agent should be avoided because it <strong>is</strong> designed to work in a singledomain only.– CORBA Naming Service should be used to store and lookup CORBA object IOR.– Domain Name Service (DNS) lookups should be avoided.– Network Address Translation (NAT) or TCP Firewall configuration should be usedonly on the outermost firewall in the firewall enclaves. In such scenarios, even theinternal clients are expected to behave as if they are outside the firewall.– <strong>GateKeeper</strong> can be used wherever it <strong>is</strong> possible to run it in a firewall environment.HTTP Tunneling feature can be used if TCP connections are not allowed by thefirewall.– <strong>GateKeeper</strong> chaining can be used when multiple firewalls are involved. With<strong>GateKeeper</strong> chaining, multiple hops can be configured.– Multiple <strong>GateKeeper</strong>s should be used for load balancing and d<strong>is</strong>tribution.Firewall and Smart Agent scenarioWithin a firewall architecture, the Smart Agent <strong>is</strong> not expected to run on the firewallhost. Instead, the Smart Agent can be run within the internal network. Usually, theSmart Agent should not be exposed to the external network because of securityreasons. The Smart Agent uses an IPv4 UDP broadcast message to advert<strong>is</strong>e itself.Since the firewall / routers can block broadcast messages from being forwarded to thenext hop in the network, the Smart Agent <strong>is</strong> usually v<strong>is</strong>ible only in the local network. Ifthe Smart Agent needs to be accessible from an external network, you must openspecific a port on the firewall.The following environment variables are used by the Smart Agent:– OSAGENT_PORT– OSAGENT_CLIENT_HANDLER_PORTThe V<strong>is</strong>iBroker-ORB requires the OSAGENT_PORT environment variable to be set toreg<strong>is</strong>ter and query CORBA objects using the Smart Agent. The default value ofOSAGENT_PORT <strong>is</strong> 14000. By setting OSAGENT_PORT to an appropriate TCP/IP port, you candefine a virtual domain. One can run any number of Smart Agents in a given subnet.Setting different OSAGENT_PORT values will create different domains, which meansCORBA objects reg<strong>is</strong>tered in one Smart Agent domain will not be v<strong>is</strong>ible to CORBAclient querying from a different domain.Set the following TCP/IP address or port to be used by CORBA application to reach theSmart Agent:– vbroker.agent.addr=143.186.142.21– vbroker.agent.port=25873Appendix B: <strong>GateKeeper</strong> deployment scenarios 105


Using the Smart Agent in a firewall scenarioIf the client, server, or <strong>GateKeeper</strong> does not require the use of the Smart Agent, set thefollowing property in the respective property files to d<strong>is</strong>able it:vbroker.agent.enableLocator=false<strong>GateKeeper</strong> <strong>is</strong> run on a multi-homed (or firewall) host. The Smart Agent can be runeither on the multi-homed host on in the internal network. <strong>GateKeeper</strong> can beconfigured to use a designated Smart Agent using the following properties (forexample):vbroker.agent.addr=143.186.142.21vbroker.agent.port=25873The server in the internal network should reg<strong>is</strong>ter itself to the same Smart Agent as the<strong>GateKeeper</strong> if your client program expects <strong>GateKeeper</strong> to query the server objects toget the IOR using the following properties (for example).vbroker.agent.addr=143.186.142.21vbroker.agent.port=25873<strong>GateKeeper</strong> can use only one Smart Agent domain at a time. The Smart Agent domain<strong>is</strong> determined by setting the OSAGENT_PORT value or the vbroker.agent.port property. Allservers accessible through <strong>GateKeeper</strong> should reg<strong>is</strong>ter to the same Smart Agentdomain or to the Naming Service. It <strong>is</strong> recommended to run the Smart Agent on thesame subnet as <strong>GateKeeper</strong> in the internal network.The following ports are required by the Smart Agent:1 OSAGENT_PORT (UDP type)2 OSAGENT_CLIENT_HANDLER_PORT (UDP type)3 OSAGENT_CLIENT_HANDLER_PORT (TCP type)The OSAGENT_PORT used by the ORB applications <strong>is</strong> a UDP port. The only TCP type ofport (also known as the OSAGENT_CLIENT_HANDLER_PORT) used by the Smart Agent <strong>is</strong>assigned to the Location Service. The OSAGENT_CLIENT_HANDLER_PORT of the UDP type <strong>is</strong>used by the Smart Agent itself. Please note that OSAGENT_CLIENT_HANDLER_PORT should beset only on those hosts where the Smart Agent <strong>is</strong> running.Using the Smart Agent in a firewall scenarioThe Smart Agent has some built-in fail-over and load-balancing capabilities. Thedomain of the Smart Agent <strong>is</strong> defined by the OSAGENT_PORT in use. If an ORB application(such as a server) <strong>is</strong> reg<strong>is</strong>tered to one of the Smart Agents in a given domain (theSmart Agent domain), other ORB applications (such as a client program) can query theserver objects in that domain from any of Smart Agents in the same domain . Thus,Smart Agents can query within a domain to locate a server object without making theclient application aware of the process. Therefore, if one Smart Agent fails, the ORBapplication can find another Smart Agent in the same domain, reg<strong>is</strong>ter itself again, andproceed.By design, the load-balancing capability of Smart Agents <strong>is</strong> not extended to firewallsbecause each firewall has unique behavior. For example, a NAT (Network AddressTranslation) device <strong>is</strong> a type of firewall which changes the IP address/port. The SmartAgent <strong>is</strong> not designed to handle NAT scenarios. Also, some firewalls may allow onlyspecific types of packets, others may require security and encryption, and some maynot allow DNS lookups. Therefore, the Smart Agent should not be used in any kind offirewall or NAT configuration.Although the Smart Agent <strong>is</strong> not designed to be used in a firewall scenario, there arefew steps to follow if an application must access a Smart Agent sitting behind thefirewall. The following steps, however, apply to inter-departmental firewalls only:1 Open the OSAGENT_PORT and OSAGENT_CLIENT_HANDLER_PORT on the firewall. Certainfirewalls may require that you set static forwarding routes so that the packets canreach the Smart Agent. All the intermediate firewalls between the applicationsshould open these ports as well. Since firewalls may be on a multi-homed host, editthe localaddr (located, for example, in the var/defaults/adm/properties/services/osagentfile folder) and set OSAGENT_LOCAL_ADDR_FILE to specify all theinterfaces Smart Agent should bind to l<strong>is</strong>ten for request packets.106 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Behavior during the Smart Agent failure in a firewall scenario2 Set the Smart Agent IP address in the agentaddr file to allow the Smart Agent on onenetwork to contact a Smart Agent on another network.3 Set OSAGENT_PORT and OSAGENT_CLIENT_HANDLER_PORT on all hosts from where ORBapplications may be launched. Please note that these ports should be the same asthose opened on the firewalls.NoteEven though it <strong>is</strong> possible to use the Smart Agent with the above settings, such usage<strong>is</strong> not recommend because th<strong>is</strong> type of configuration may work with some firewalls, butwill not work with all types of firewalls.Behavior during the Smart Agent failure in a firewall scenarioIf the Smart Agent fails, the ORB application <strong>is</strong> expected to switch to another SmartAgent in the same subnet. Because the Smart Agent OSAGENT_PORT <strong>is</strong> already fixed, theORB application sends a UDP broadcast to locate another Smart Agent. If there <strong>is</strong> afirewall, the ORB application should have access to reach another host where theSmart Agent <strong>is</strong> running. The ORB application may not have the knowledge of thelocation of an alternative Smart Agent, so it can't do much. If the Smart Agent starts upagain on the same host, the client may be able to contact it. Basically, it <strong>is</strong> important tounderstand that the Smart Agent uses a UDP broadcast-based technology. Somefirewalls and routers may not forward UDP broadcasts and th<strong>is</strong> <strong>is</strong> one of the reasonswhy the Smart Agent cannot be used across firewalls. Another Smart Agent, however,can be used if a Smart Agent in the same subnet fails.Client behavior for using the Smart AgentA client ORB application can be configured to use a specific range of ports to bind tothe Smart Agent by setting the following properties:vbroker.agent.clientPortvbroker.agent.clientPortRangeThe port range ensures that the client ORB uses the local ports in a given range only.The client port range <strong>is</strong> required because Windows/NT delays actual closure of portsresulting in limited use of the port range.Using <strong>GateKeeper</strong> with other CORBA servicesFrom a client's perspective, <strong>GateKeeper</strong> <strong>is</strong> transparent to all other CORBA Services.There <strong>is</strong> no d<strong>is</strong>tinction made between a usual server object and other CORBA servicessuch as the Naming Service, Transaction Service, Notification Service, Event Service,and so forth..In a server-side configuration, the server can be configured to specify the firewallcomponent in its IOR which <strong>is</strong> identified by the client ORB and <strong>is</strong> used only whenrequired. In such cases, the client fails over to bind to the server using <strong>GateKeeper</strong>only if a direct connection could not be establ<strong>is</strong>hed. Assuming that iiop_tp <strong>is</strong> thedefault server-engine used by the server, the following example shows a typical set ofproperties for a firewall configuration:vbroker.orb.exportFirewallPath=truevbroker.se.iiop_tp.firewallPaths =Queen,Kingvbroker.firewall-path.Queen=Atlantic,Pacificvbroker.firewall-path.King=Indianvbroker.firewall-path.Atlantic.type=TCPvbroker.firewall-path.Atlantic.host=www.borland.comvbroker.firewall-path.Atlantic.iiop_port=25000vbroker.firewall-path.Atlantic.hiop_port=25003vbroker.firewall-path.Atlantic.ssl_port=25004Appendix B: <strong>GateKeeper</strong> deployment scenarios 107


Configuring <strong>GateKeeper</strong> with an HTTP proxy servervbroker.firewall-path.Pacific.type=PROXYvbroker.firewall-path.Pacific.ior=http://www.mygk1domain.com/gatekeeper.iorvbroker.firewall-path.Indian.type=PROXYvbroker.firewall-path.Indian.ior=http://www.mygk1domain.com/gatekeeper.iorIn a client-side configuration, the <strong>GateKeeper</strong> IOR can be provided to the Client ORB.In such a scenario, the client makes all its operations using <strong>GateKeeper</strong>. In th<strong>is</strong> case,the following properties are useful:vbroker.orb.alwaysProxy=truevbroker.orb.gatekeeper.ior=http://www.mydomain.com/gatekeeper.iorIn some cases, when the Smart Agent <strong>is</strong> not accessible by the client, <strong>GateKeeper</strong> <strong>is</strong>used to locate server objects. In such a scenario, it <strong>is</strong> recommended that you use theLocation Service available through <strong>GateKeeper</strong>. In th<strong>is</strong> case, the following property <strong>is</strong>used for <strong>GateKeeper</strong>:vbroker.gatekeeper.locationService=trueAdditionally, the following property <strong>is</strong> used on the client-side to locate objects:vbroker.locator.ior=http://www.mydomain.com/gatekeeper.iorConfiguring <strong>GateKeeper</strong> with an HTTP proxy serverWhen an HTTP proxy server <strong>is</strong> running between the client and <strong>GateKeeper</strong>,<strong>GateKeeper</strong> needs to publ<strong>is</strong>h the HTTP proxy server's IP host/port address in its IOR.The technique described below can be used to achieve th<strong>is</strong> goal. The following<strong>GateKeeper</strong> properties can be set which resemble a Network Address Translationconfiguration. In th<strong>is</strong> case, the HTTP Proxy Server <strong>is</strong> acting as a NAT.vbroker.se.exterior.proxyHost=142.186.142.21vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.proxyPort=32001NoteSetting both of the above properties <strong>is</strong> not mandatory. In th<strong>is</strong> scenario, <strong>GateKeeper</strong>appears to be behind a NAT device and, as such,.all clients trying to communicate with<strong>GateKeeper</strong> using HTTP tunneling will always pass their requests through the HTTPProxy Server.Additional server engines in <strong>GateKeeper</strong>There are three in-built server engines available in <strong>GateKeeper</strong>:– iiop_tp– exterior– interiorThe iiop_tp server engine <strong>is</strong> used for admin<strong>is</strong>trative purposes only. The exterior andinterior server engines are used for external and internal networks, respectively. Whenusing TCP/IP networks, each server engine may be associated with a network IP hostaddress, for example:vbroker.se.exterior.host=142.186.142.21vbroker.se.interior.host=142.186.182.30vbroker.se.iiop_tp.host=192.73.8.25Th<strong>is</strong> version of <strong>GateKeeper</strong> does not allow adding new server engines using theproperties file.108 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Additional l<strong>is</strong>teners or server connection managers in <strong>GateKeeper</strong>Additional l<strong>is</strong>teners or server connection managers in <strong>GateKeeper</strong><strong>GateKeeper</strong> can have more than one server connection manager (SCM) or l<strong>is</strong>tener fora given type of service. Usually, an SCM provides a specific type of service, such asIIOP, SSL, HIOP, HIOPS, and so forth. Each SCM <strong>is</strong> bound to a server engine, such asexterior or interior. To configure an SCM, you must assign a logical name (for example,myscm), and append th<strong>is</strong> name to the following property:vbroker.se.exterior.scms=ex-iiop,ex-hiop,myscmFurthermore, the following properties must be added for each SCM (see Appendix Afor more details):vbroker.se.exterior.scm.myscm.manager.type=Socketvbroker.se.exterior.scm.myscm.manager.connectionMax=0vbroker.se.exterior.scm.myscm.manager.connectionMaxIdle=0vbroker.se.exterior.scm.myscm.l<strong>is</strong>tener.type=IIOPvbroker.se.exterior.scm.myscm.l<strong>is</strong>tener.port=683vbroker.se.exterior.scm.myscm.l<strong>is</strong>tener.proxyPort=0vbroker.se.exterior.scm.myscm.l<strong>is</strong>tener.giopVersion=1.2vbroker.se.exterior.scm.myscm.d<strong>is</strong>patcher.type=ThreadPoolvbroker.se.exterior.scm.myscm.d<strong>is</strong>patcher.threadMax=100vbroker.se.exterior.scm.myscm.d<strong>is</strong>patcher.threadMin=0vbroker.se.exterior.scm.myscm.d<strong>is</strong>patcher.threadMaxIdle=300<strong>GateKeeper</strong> stress/load metricsBecause <strong>GateKeeper</strong> <strong>is</strong> a Java based ORB service implementation, many Java toolscan be used to obtain performance character<strong>is</strong>tics.The V<strong>is</strong>iBroker Console provides certain real time performance character<strong>is</strong>tics aboutany ORB service (including <strong>GateKeeper</strong>). It can d<strong>is</strong>play information related to allocatedmemory, numbers of threads, connections, fragmentation, and so forth.Deploying <strong>GateKeeper</strong> as a servletTh<strong>is</strong> section describes an example of deploying <strong>GateKeeper</strong> as a servlet into a Tomcat5.0 web server. For earlier or later versions of Tomcat, some small modifications maybe required.Th<strong>is</strong> example makes use of the bank_agent example along with the suppliedClient.properties, which among other things will force the client to connect to a serveronly via the gatekeeper servlet embedded in the web server. The bank_agent example<strong>is</strong> located in the following directory:/examples/vbroker/basic/bank_agentThe additional files you will need to run the example in th<strong>is</strong> scenario are:– web.xml—the deployment descriptor for gatekeeper to be deployed as a servlet.– Client.properties—the properties needed to set the bank_agent client to connect tothe bank server via the <strong>GateKeeper</strong> embedded inside a web server as a servlet.At the end of th<strong>is</strong> section there are screen dumps of web.xml and Client.properties (seeweb.xml and Client.properties) which you can copy, paste, and save to designated filesin specified directories.Building the example1 Download free copy of Tomcat web server from http://jakarta.apache.org/tomcat/index.html, and follow the instructions to install it. A properly functioning installationcan be verified by launching a web browser for http://localhost:8080.Appendix B: <strong>GateKeeper</strong> deployment scenarios 109


Deploying <strong>GateKeeper</strong> as a servlet2 Copy, paste, and save web.xml (see web.xml) to /webapps/gatekeeper_servlet/WEB-INF/web.xml. Create subdirectories as needed.3 Open and edit the file/webapps/gatekeeper_servlet/WEB-INF/web.xmland change the following portion to correctly refer to your osagent Tomcat ports.vbroker.agent.portYOUR OSAGENT PORT...vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.portTOMCAT HTTP PORT. OUT OF TOMCAT BOX, THIS MUST BE 80804 Copy the following jars from/lib/to/shared/libPutting the jars into the Tomcat shared/lib/ directory will make them available to allweb applications deployed in the container. If th<strong>is</strong> <strong>is</strong> not desired, consult the Tomcatdocumentation for the other lib directories.– lm.jar– sanctuary.jar– vbjorb.jar– sanct4.jar– vbjclientorb.jar– vbsec.jar1 Copy, paste, and save Client.properties (see Client.properties) to/examples/vbroker/basic/bank_agentand open and edit the following settings.vbroker.orb.gatekeeper.ior=http://:/gatekeeper_servlet/gatekeeper.iorwhere <strong>is</strong> the IP of machine on which Tomcat <strong>is</strong> running and <strong>is</strong> theHTTP port to which Tomcat <strong>is</strong> l<strong>is</strong>tening. Th<strong>is</strong> must be the same number as the portin the web.xml above. For out-of the box Tomcat installations th<strong>is</strong> must be set to8080.Running th<strong>is</strong> example1 Set the proper environment for the ex<strong>is</strong>ting V<strong>is</strong>iBroker (that <strong>is</strong>, execute${VBROKERDIR}/vbroker.sh on UNIX platform).2 Build the basic/bank_agent example if necessary.3 Make sure osagent <strong>is</strong> running.4 Make sure that ${JAVA_HOME} and ${PATH} cons<strong>is</strong>tently refer to the desired JDK.5 Start Tomcat by executing the following command:110 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Deploying <strong>GateKeeper</strong> as a servletWindowsUNIX/bin/startup.bat/bin/startup.sh6 Navigate to the example basic bank agent directory:/examples/vbroker/basic/bank_agent7 Start the bank server by executing the following command:vbj Server8 Start the client by executing the following command:web.xmlvbj -DORBpropStorage=Client.properties Client<strong>GateKeeper</strong> Servlet<strong>GateKeeper</strong> as a servlet example<strong>GateKeeper</strong>Servletcom.inpr<strong>is</strong>e.vbroker.gatekeeper.servlet.Servletvbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.path/gatekeeper_servlet/servletvbroker.agent.portPUT YOUR OSAGENT PORT


Deploying <strong>GateKeeper</strong> as a servlet-->vbroker.gatekeeper.referenceStorewebapps/gatekeeper_servlet/gatekeeper.iorvbroker.se.exterior.scmsex-iiop,ex-hiopvbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.typeD<strong>is</strong>abled-IIOPvbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.port8080vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.port0112 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Deploying <strong>GateKeeper</strong> as a servlet<strong>GateKeeper</strong>Servlet/servletClient.properties# The following line <strong>is</strong> only one (single) linevbroker.orb.dynamicLibs=com.inpr<strong>is</strong>e.vbroker.firewall.Init,com.inpr<strong>is</strong>e.vbroker.HIOP.Initvbroker.orb.alwaysTunnel=truevbroker.orb.alwaysProxy=true# The following line <strong>is</strong> only one (single) linevbroker.orb.gatekeeper.ior=http://host:8080/gatekeeper_servlet/gatekeeper.ior# Uncomment the following lines for debug messages# vbroker.orb.debug=true# vbroker.orb.warn=2# vbroker.orb.logLevel=7Appendix B: <strong>GateKeeper</strong> deployment scenarios 113


Deploying <strong>GateKeeper</strong> as a servlet114 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


IndexAaccess control 34access control properties 66access rules 34adjacent networks 6admin<strong>is</strong>tration properties 65admin<strong>is</strong>trative service 16alwaysProxy 23alwaysSecure 24alwaysTunnel 23asynchronized invocation 39Bbackward compatibility, <strong>GateKeeper</strong> properties 73bid order of clients in <strong>GateKeeper</strong> 25bidding mechan<strong>is</strong>m of <strong>GateKeeper</strong> 38bidirectional communication 32<strong>GateKeeper</strong> properties 70bidirectional communication scenario 77, 85, 90, 93,101Ccache, managing 38call types 40callbackl<strong>is</strong>tener port 25scenario 85, 90V<strong>is</strong>iBroker 3.x style 25callback scenario 77, 85, 93, 101callback types 40callbacksand bidirectional communication 32in <strong>GateKeeper</strong> 16V<strong>is</strong>iBroker 3.x properties 67V<strong>is</strong>iBroker 3.x style 16with <strong>GateKeeper</strong> 30chainingdynamic in <strong>GateKeeper</strong> 30of <strong>GateKeeper</strong> 29static chaining of <strong>GateKeeper</strong> 29client properties, configuring in <strong>GateKeeper</strong> 23client-side firewall 1in <strong>GateKeeper</strong> 97client-side server engine properties 58clustering of <strong>GateKeeper</strong>s 36, 37, 68command line options for <strong>GateKeeper</strong> 3communication paths 25, 26compatibility with V<strong>is</strong>iBorker 4.x and below 73connection managers 109connectionsin <strong>GateKeeper</strong> 39passthrough, in <strong>GateKeeper</strong> 24secure, in <strong>GateKeeper</strong> 24connections, managing in <strong>GateKeeper</strong> 39CORBA 1CORBA Services with <strong>GateKeeper</strong> 107Ddebugging <strong>GateKeeper</strong>. See troubleshooting 47debugging mode, starting <strong>GateKeeper</strong> in 49Demilitarized Zon, in <strong>GateKeeper</strong> 93d<strong>is</strong>tributor, <strong>GateKeeper</strong> properties 68DMZ, in <strong>GateKeeper</strong> 93dual homed host scenario 85dual-homed host, with <strong>GateKeeper</strong> 6dynamic chaining 30dynamicLibs, <strong>GateKeeper</strong> properties 68, 74dynamicsLibs 71Eenvironment variables 49errors and FAQs 54ex-hiop 17ex-hiop properties 58ex-hiops properties 61ex-iiop 17ex-iiop properties 60ex-ssl properties 62exterior server engine 17, 108exterior server engine properties 58Ffake port 26fault_tolerance with <strong>GateKeeper</strong> 37fault-tolerance in <strong>GateKeeper</strong> 98firewallclient-side 1, 97server-side 1, 90troubleshooting in <strong>GateKeeper</strong> 53firewall configurations 26firewall package, loading in <strong>GateKeeper</strong> 22firewallsand Smart Agent in <strong>GateKeeper</strong> 105, 106, 107<strong>GateKeeper</strong> properties 73in <strong>GateKeeper</strong> 14multiple with <strong>GateKeeper</strong> 104G<strong>GateKeeper</strong>access control 34access control properties 66admin<strong>is</strong>tration properties 65admin<strong>is</strong>trative service 16and multiple networks 8and SSL 40as IIOP proxy 85as Web Server 85asynchronized invocation 39backward compatibility property 73bidding mechan<strong>is</strong>m 38bidirectional callbacks 32bidirectional communication 32bidirectional communication properties 70cache management 38call types 40callbacks 16, 30chaining 29, 101client-side server engine properties 58clustering 36, 37Index 115


compatibility with V<strong>is</strong>iBorker 4.x and below 73configuring 15configuring services 15connections 39custom-designed load balancing 36debugging. See troubleshooting 47definition of 1deploy as servlet 109dynamic chaining 30errors and FAQs 54ex-hiop properties 58ex-hiops properties 61ex-iiop properties 60ex-ssl properties 62exterior server engine properties 58fault_tolerance 37firewall configuration 14firewall properties 73general properties 57HTTP proxy server 108HTTP tunneling 108in adjacent networks 6in dual-homed host 6, 85in-iiop properties 64in-ssl properties 64installation 2interior server engine properties 63internetworking devices 8licensing 41l<strong>is</strong>tener ports 15l<strong>is</strong>teners 109load balancing 36load metrics 109location service 17location service properties 72managing 4master 36message marshalling 38multi-homed host 12multiple firewalls 104naming service 44OAD 17Object Activation Demon 17ORB properties 74passthrough conections 16pass-through connections properties 70passthrough mode 40performance guidelines 37port configuration 15proxy servers 54reg<strong>is</strong>try settings 50removing an NT service 4security 41security considerations 33security properties 66security services (Java) 18server connection managers 109server engines 108server side interior engine properties 63slave 36Smart Agent properties 72SSL 85SSL bidirectional communication 41SSL connections to 41starting as a servlet 4starting as an NT service 3starting from the command line 3starting in debugging mode 49static chaining 29stress metrics 109subnet environment 104thread management 38ThreadPool 40ThreadSession 40troubleshooting 47using the Smart Agent 17vbroker properties 74V<strong>is</strong>iBroker 3.x callback properties 67V<strong>is</strong>iBroker Console 4V<strong>is</strong>iSecure (Java) 18where to deploy 5with CORBA Services 107<strong>GateKeeper</strong> chainingclient-side 101server-side 101server-side and client-side 101<strong>GateKeeper</strong> performance 4general properties of <strong>GateKeeper</strong> 57GIOP Proxy Server 1GIOP, <strong>GateKeeper</strong> properties 68HHIOP and <strong>GateKeeper</strong> 4HIOP properties in <strong>GateKeeper</strong> 58hiop_ts 17HIOPS properties 61HTTP proxy server 108HTTP tunneling 5, 23, 85, 108HTTP Tunneling scenario 85IIIOPin <strong>GateKeeper</strong> 77, 97IIOP l<strong>is</strong>tener port 26d<strong>is</strong>abling 26IIOP propertiesin <strong>GateKeeper</strong> 60, 64IIOP proxyin <strong>GateKeeper</strong> 5IIOP proxy scenarioin <strong>GateKeeper</strong> 85IIOP/SSLin <strong>GateKeeper</strong> 77iiop_tp 17iiop_tp server enginein <strong>GateKeeper</strong> 108in <strong>GateKeeper</strong>performance properties 39in-hiopin <strong>GateKeeper</strong> 17in-iiop propertiesin <strong>GateKeeper</strong> 64in-SSLin <strong>GateKeeper</strong> 17in-ssl propertiesin <strong>GateKeeper</strong> 64installing <strong>GateKeeper</strong> 2interior server enginein <strong>GateKeeper</strong> 17, 108interior server engine properties116 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


Indexin <strong>GateKeeper</strong> 63internetworking deviceswith <strong>GateKeeper</strong> 8IOR filestroubleshooting <strong>GateKeeper</strong> 53IP forwardingin <strong>GateKeeper</strong> 13Jjava policy, troubleshooting <strong>GateKeeper</strong> 53Java sandbox security in <strong>GateKeeper</strong> 5Ll<strong>is</strong>tener portin <strong>GateKeeper</strong> 15l<strong>is</strong>tener portsIIOP 26random 25V<strong>is</strong>iBroker 3.x callbacks 25l<strong>is</strong>tenersin <strong>GateKeeper</strong> 109load balancingcustom-designed in <strong>GateKeeper</strong> 36<strong>GateKeeper</strong> properties 68in <strong>GateKeeper</strong> 98with <strong>GateKeeper</strong> 36load metricsin <strong>GateKeeper</strong> 109location service<strong>GateKeeper</strong> properties 72in <strong>GateKeeper</strong> 17log enablein <strong>GateKeeper</strong> 47log levelin <strong>GateKeeper</strong> 47Mmanaging <strong>GateKeeper</strong> 4marshalling of messages 38master <strong>GateKeeper</strong> 36master slave 98message marshallingin <strong>GateKeeper</strong> 38multi-homed hostin <strong>GateKeeper</strong> 12multiple firewallsin <strong>GateKeeper</strong> 77multiple networkswith <strong>GateKeeper</strong> 8Nnaming servicein <strong>GateKeeper</strong> 44NATin <strong>GateKeeper</strong> 15NAT (Network Address Translation) 26NATs scenario 77in <strong>GateKeeper</strong> 90netstatwith <strong>GateKeeper</strong> 50Network Address Translationin <strong>GateKeeper</strong> 15Network Address Translation (NAT) 26network configurationwith <strong>GateKeeper</strong> 51network interface cardwith <strong>GateKeeper</strong> 12NICwith <strong>GateKeeper</strong> 12nslookupwith <strong>GateKeeper</strong> 50OOADin <strong>GateKeeper</strong> 17Object Activation Demonin <strong>GateKeeper</strong> 17ORB <strong>GateKeeper</strong> properties 74OSAGENT_CLIENT_HANDLER_PORT 105OSAGENT_PORT 105osfindwith <strong>GateKeeper</strong> 50Ppassthrough conections in <strong>GateKeeper</strong> 16pass-through connections<strong>GateKeeper</strong> properties 70troubleshooting <strong>GateKeeper</strong> 53passthrough connectionsin <strong>GateKeeper</strong> 24passthrough modein <strong>GateKeeper</strong> 40passthrough scenario 85in <strong>GateKeeper</strong> 85, 90, 93, 101performance<strong>GateKeeper</strong> properties 68of <strong>GateKeeper</strong> 37properties in <strong>GateKeeper</strong> 39pingwith <strong>GateKeeper</strong> 50POAsconfiguring globally in <strong>GateKeeper</strong> 22programming individually in <strong>GateKeeper</strong> 21portconfiguring in <strong>GateKeeper</strong> 15port translationin <strong>GateKeeper</strong> 26printiorwith <strong>GateKeeper</strong> 50properties filetroubleshooting <strong>GateKeeper</strong> 52Proxy 1proxy Passthru 24proxy serverswith <strong>GateKeeper</strong> 54Rreg<strong>is</strong>try settingsand <strong>GateKeeper</strong> 50Index 117


emoving <strong>GateKeeper</strong> as NT service 4response timeof <strong>GateKeeper</strong> 37round robin <strong>GateKeeper</strong> properties 68round-robin algorithmin <strong>GateKeeper</strong> load d<strong>is</strong>tribution 36routewith <strong>GateKeeper</strong> 50routing tablein <strong>GateKeeper</strong> 13troubleshooting <strong>GateKeeper</strong> 52Ssandbox securityin <strong>GateKeeper</strong> 5scalabilityof <strong>GateKeeper</strong> 37Scenarioaddress and port translations 77address translation 77bi-directional communication 77, 85, 90, 93, 101callback 77, 85, 90, 93, 101client-side chaining 101client-side firewall 97dual homed host configuration 85fault-tolerance 98Firewall and Smart Agent 105, 106, 107firewall behind <strong>GateKeeper</strong> 93firewall behind <strong>GateKeeper</strong> with NAT 93HTTP Tunneling 85IIOP 77IIOP proxy 85IIOP/SSL 77load balancing 98master slave configuration 98multiple firewalls 77passthrough 85, 90, 93, 101port translation 77secure HTTP Tunneling 85server-side and client-side chaining 101server-side chaining 101server-side firewall 90server-side firewall with NAT 90Smart Agent 77, 93SSL 85Web Server 85SCMex-hiop 17ex-hiop properties 58ex-hiops properties 61ex-iiop 17ex-iiop properties 60ex-ssl properties 62<strong>GateKeeper</strong> properties 58, 65hiop_ts 17iiop_tp 17in <strong>GateKeeper</strong> 17in-hiop 17in-iiop properties 64in-SSL 17in-ssl properties 64secure connectionsin <strong>GateKeeper</strong> 24secure HTTP Tunneling 85secure HTTP tunneling Scenario 85securityaccess control properties 66enabling in <strong>GateKeeper</strong> 41in <strong>GateKeeper</strong> 33security servicein <strong>GateKeeper</strong> 41security services<strong>GateKeeper</strong> properties 71security services (Java)in <strong>GateKeeper</strong> 18server connection managerex-hiop properties 58ex-hiops properties 61ex-iiop properties 60ex-ssl properties 62<strong>GateKeeper</strong> properties 58, 65in-iiop properties 64in-ssl properties 64server connection manager (See SCM) 17server connection managersin <strong>GateKeeper</strong> 109server engine<strong>GateKeeper</strong> properties 58, 63, 65server enginesin <strong>GateKeeper</strong> 17, 108server side interior engine propertiesin <strong>GateKeeper</strong> 63server-side firewall 1in Gatekeeprer 90services, configuring in <strong>GateKeeper</strong> 15servlet, running <strong>GateKeeper</strong> as 4slave <strong>GateKeeper</strong>s 36Smart Agent 77and client behavior 107and firewall with <strong>GateKeeper</strong> 105, 106, 107<strong>GateKeeper</strong> properties 72in <strong>GateKeeper</strong> 17, 93port configuration 107reg<strong>is</strong>try settings for <strong>GateKeeper</strong> 50troubleshooting <strong>GateKeeper</strong> 52SSLand <strong>GateKeeper</strong> 40bidirectional communication in <strong>GateKeeper</strong> 41<strong>GateKeeper</strong> properties 71troubleshooting <strong>GateKeeper</strong> 53SSL connectionsin <strong>GateKeeper</strong> 24to <strong>GateKeeper</strong> 41SSL propertiesin <strong>GateKeeper</strong> 62, 64SSL scenarioin <strong>GateKeeper</strong> 85starting <strong>GateKeeper</strong>as an NT service 3command line options 3from the command line 3startup option-h 3-J-D 3-props 3-quiet 3static chainingof <strong>GateKeeper</strong> 29stress metricsin <strong>GateKeeper</strong> 109subnet environment118 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide


IndexTwith <strong>GateKeeper</strong> 104TCP firewall 27ThreadPoolin <strong>GateKeeper</strong> 40threadsmanaging, in <strong>GateKeeper</strong> 38ThreadSessionin <strong>GateKeeper</strong> 40traceroutewith <strong>GateKeeper</strong> 50tracertwith <strong>GateKeeper</strong> 50troubleshootingcommon errors and FAQs for <strong>GateKeeper</strong> 54enable log in <strong>GateKeeper</strong> 47environment variables 49firewall in <strong>GateKeeper</strong> 53<strong>GateKeeper</strong> 47IOR files in <strong>GateKeeper</strong> 53java policy in <strong>GateKeeper</strong> 53log level in <strong>GateKeeper</strong> 47network configuration 51pass-through connections in <strong>GateKeeper</strong> 53properties file in <strong>GateKeeper</strong> 52reg<strong>is</strong>try settings for <strong>GateKeeper</strong> 50routing table in <strong>GateKeeper</strong> 52Smart Agent in <strong>GateKeeper</strong> 52SSL in <strong>GateKeeper</strong> 53troubleshooting command optionsclient 49<strong>GateKeeper</strong> 49server 49troubleshooting toolsfor <strong>GateKeeper</strong> 50tunnelingHTTP in <strong>GateKeeper</strong> 23Vvbroker <strong>GateKeeper</strong> properties 74vbroker.orb.dynamicLibs property 18vbroker.se.exterior.scm.ex-hiop.l<strong>is</strong>tener.typeproperty 18vbroker.se.exterior.scm.ex-iiop.l<strong>is</strong>tener.typeproperty 18vbroker.se.exterior.scms property 18vbroker.security.d<strong>is</strong>able property 18V<strong>is</strong>iBroker 3.x callbacks 25V<strong>is</strong>iBroker Consolein <strong>GateKeeper</strong> 4V<strong>is</strong>iSecure (Java)in <strong>GateKeeper</strong> 18WWeb Serverwith <strong>GateKeeper</strong> 4Web Server scenarioin <strong>GateKeeper</strong> 85Windows reg<strong>is</strong>try settingsand <strong>GateKeeper</strong> 50Index 119


120 V<strong>is</strong>iBroker <strong>GateKeeper</strong> Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!