TIBCO Retrieve Client IP Address

Situation

To retrieve client IP address.

Environment

TIBCO 5.8.0.10

Solution

Step 1. Create a “Context Resource” from Service palette.

Step 2. Define a schema (ex. root/RemoteAddress).

Step 3. Select the service which needs to track client IP address→Configuration→Endpoint Bindings→Select the HTTP endpoint→SOAP Details→Advanced→Input Context→Check “Expose Security Context”→Map “RemoteAddress” to the schema defined in Step 2.

Step 4. In the process, select “GetContext” activity from Service palette→context configuration: the context resource created in Step1. Now it is ready to retrieve IP address.

Extension

If BUS Server is behind a L7 switch, RemoteAddress would be the IP of the L7 switch, not the original client IP.

  1. L7 switch should enable “x-forwarded-for” http header.
  2. In the Step 3, “Input Context→TransportProperties→Header” contains “x-forwarded-for” information. Parse the value of Header and retrieve the Client IP address. If more than one IP address, the first one is used.

Reference

http://eai.ittoolbox.com/groups/technical-functional/tibco-l/track-ip-address-of-the-client-tibco-business-works-4279677#M4553437

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s