Layer7 API Management

 View Only
  • 1.  how to know client or requestor ip address

    Posted May 02, 2020 02:14 AM
    hi everyone,

    what's the best ways to know the ip address of clients / requesters  submitting web api calls to the ca api gw hosts that are behind a load balancer ?
    i think it can be obtained from the http header ? if it can, how ?

    thanks
    darwin



  • 2.  RE: how to know client or requestor ip address
    Best Answer

    Posted May 03, 2020 10:27 AM
    If you are using a load balancer ahead of the Layer 7 API  gateway, you will need the load balancer to set an header value like client IP in header which you can access using header attributes
    https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=771522

    If there is no load balancer you can use tcp layer context variable to access this value 
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-api-management/api-gateway/9-2/reference/context-variables/transport-layer-context-variables.html
    e.g.
    ${request.tcp.remoteHost}


    ------------------------------
    Pre-Sales Consultant
    CA Southern Africa
    ------------------------------



  • 3.  RE: how to know client or requestor ip address

    Posted May 05, 2020 07:31 PM
    thanks ronald.  in my case, the context variable that contains the client ip address is ${request.http.headervalues.x-forwarded-for}.  this works after x-forwarded-for setting is enabled on the load balancer (for the hosts behind the vip)


  • 4.  RE: how to know client or requestor ip address

    Posted May 20, 2020 11:11 AM
    Thank you for the explanation. It is clear for me.