BPM, Workflow, and Case

 View Only
  • 1.  How to get the private IP address of a client machine in IBM BAW

    Posted Tue January 24, 2023 01:59 AM
    How to get the private IP address of a client machine in IBM BAW?

    ------------------------------
    Harsha Randunna
    ------------------------------


  • 2.  RE: How to get the private IP address of a client machine in IBM BAW

    Posted Wed January 25, 2023 02:51 AM
    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
    ------------------------------



  • 3.  RE: How to get the private IP address of a client machine in IBM BAW

    Posted Thu January 26, 2023 12:07 AM
    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
    ------------------------------



  • 4.  RE: How to get the private IP address of a client machine in IBM BAW

    Posted Thu January 26, 2023 03:43 PM
    @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
    ------------------------------



  • 5.  RE: How to get the private IP address of a client machine in IBM BAW

    Posted Wed January 25, 2023 08:21 AM
    You should be able to get it using JS jQuery. For instance - 
    https://www.geeksforgeeks.org/how-to-get-client-ip-address-using-javascript/

    ------------------------------
    Sergei Malynovskyi
    ------------------------------