API Connect

 View Only
  • 1.  Consumer app hostname or IP address

    Posted Thu September 29, 2022 09:08 AM
    Is there a way the hostname or IP address of the client app calling my API (by script):
    var apim = require('apim);
    var urlopen = require('urlopen');


    Second question: I would like to restrict calls to come ONLY from specific host (to mitigate risk)

    ------------------------------
    Samir Almousawi
    ------------------------------


  • 2.  RE: Consumer app hostname or IP address

    IBM Champion
    Posted Fri September 30, 2022 06:37 AM
    You can check if any of those variables works for you:
    https://www.ibm.com/docs/en/api-connect/10.0.x?topic=reference-api-connect-context-variables

    And later you can create a custom policy to use in your APIs:
    https://www.ibm.com/docs/en/api-connect/10.0.1.x?topic=policy-implementing-your

    Hope this helps!

    ------------------------------
    Leandro Takeda
    ------------------------------



  • 3.  RE: Consumer app hostname or IP address

    Posted Wed October 26, 2022 05:07 AM
    Hi Samir,

    >For first question: you can get IP address default in headers and App name can get through context variables using those can prepare the Custom policy as per your expected.
    >For second question:
    You can achieve this two procedures 

    1. API URL default picking the clients IP, this request header can be validate as per your saved document with list of IP's.
    2. Gateway can providing the feature Access control list to identify the all the Clients IP's.

    ------------------------------
    kandula nagababu
    ------------------------------