@Harsha Randunna, given the situation, a couple options I can think of are:
1. Set IP based restrictions at the web server level to limit requests.
2. If the restriction is only for specific parts of the coaches, then you can invoke a webservice from the coach which will inspect the IP address and tell you if it is on the whitelist or not. Such webservice can make use of JEE/servlet API like
@Jens Engelke said.
Caution: Since the code in CSHS runs on the client side, the data returned from the web service isn't tamper-proof. It would make sense to keep such logic on the server-side. Also, making sure that those services do not use any data that can be changed in the client browser. For example, if you are getting the client IP address from one web service and passing it to another web service or to some JS function on the coach, then be aware that the IP address can be intercepted and changed between those calls. Please design your CSHS flow with this in mind.
Note: There are many web services that will return you the client IP available for free. Even if the customer permits their use, I would avoid using them not only for the reason mentioned above (in the caution) but also because they are not going to be supported.
------------------------------
Ajay Katre
Salient Process
------------------------------
Original Message:
Sent: Thu January 26, 2023 12:07 AM
From: Harsha Randunna
Subject: How to get the private IP address of a client machine in IBM BAW
Thanks for your response.
Actually in our case, one of our customer request IP based restriction to specific IPs and then we are searching some options to validate client IP address while open the coach in Process Portal, and then restrict the coach loading based on that validation.
------------------------------
Harsha Randunna
Original Message:
Sent: Wed January 25, 2023 02:50 AM
From: Jens Engelke
Subject: How to get the private IP address of a client machine in IBM BAW
Client IP address is available in "regular" JEE programming via the Servlet API (request.getRemoteAddress()).
BAW programming models do not grant access to such lower level APIs.
That said, there is a product feature to at least log the client IP at login time: https://community.ibm.com/community/user/automation/blogs/jens-engelke1/2020/12/22/track-client-ip-at-login-in-baw
------------------------------
Jens Engelke
Original Message:
Sent: Tue January 24, 2023 01:59 AM
From: Harsha Randunna
Subject: How to get the private IP address of a client machine in IBM BAW
How to get the private IP address of a client machine in IBM BAW?
------------------------------
Harsha Randunna
------------------------------