'Is it possible to bind api consumers to certain ip address so that they can invoke an api their own ip address in wso2 apim 4.0.0?

I am exploring wso2 apim 4.0.0. I would like to find out if it is possible to bind a user to certain ip address so that it can invoke an api only from specified ip address. For instance user1 one is bound to 192.168.10.106, hence it can call apis only from 192.168.10.106 address. I read about the feature that can be applied to an api itself so that every user can invoke certain api from particular ip address.

So my question is how I can bind a user to certain ip address so it can invoke apis only from this ip address



Solution 1:[1]

You can attach a custom sequence to the API. In the custom sequence you can write any logic. So in your case, you can write a logic to match a particular IP address.

https://apim.docs.wso2.com/en/latest/deploy-and-publish/deploy-on-gateway/api-gateway/message-mediation/changing-the-default-mediation-flow-of-api-requests/#changing-the-default-mediation-flow-of-api-requests

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pubci