To retrieve client IP address.
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.
If BUS Server is behind a L7 switch, RemoteAddress would be the IP of the L7 switch, not the original client IP.
- L7 switch should enable “x-forwarded-for” http header.
- 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.