简体   繁体   English

无法在 WSO2 API 管理器中实现 IP 白名单

[英]Unable to implement IP White Listing in WSO2 API Manager

I am doing POC on WSO2 API Manager for one of the project and trying to implement white listing IP for a particular API such that API should not be accessible from any other IP.我正在为其中一个项目在 WSO2 API Manager 上做 POC,并尝试为特定 API 实现白名单 IP,这样 API 就不能从任何其他 IP 访问。

I have tried implementing the same using the WSO2 documentation ( https://docs.wso2.com/display/AM200/Managing+Throttling ) but couldn't do it.我尝试使用 WSO2 文档 ( https://docs.wso2.com/display/AM200/Managing+Throttling ) 实现相同的功能,但无法做到。

Is it really possible to achieve the above scenario in WSO2 API Manager?在WSO2 API Manager中真的可以实现上述场景吗? If yes, then please guide to implement the same.如果是,那么请指导实施相同的。

Yes.是的。 It is possible to implement IP Whitelisting with WSO2 API-M.可以使用 WSO2 API-M 实现 IP 白名单。 Usually, after creating an advanced throttling policy as per instructed in the documentation [1], it takes some time to deploy the execution policy.通常,按照文档 [1] 中的说明创建高级节流策略后,部署执行策略需要一些时间。 The first few requests from the IPs, that should be blocked, will be passed through.应阻止的来自 IP 的前几个请求将通过。 After the execution policy is successfully deployed, accessing from non-whitelisted IP addresses will be blocked.执行策略部署成功后,将阻止非白名单IP访问。

But, when creating the related conditional group, if the time duration is set to a small duration, ie 1 minute, the execution policy will reset every 1 minute.但是,在创建相关条件组时,如果将持续时间设置为较小的持续时间,即 1 分钟,则执行策略将每 1 分钟重置一次。 During this resetting time, the requests from the IPs, that should be blocked, will be passed through.在此重置时间内,应阻止的 IP 请求将通过。 This can be avoided by setting a high time duration so that we can have a low frequency of resetting the execution policy.这可以通过设置较长的持续时间来避免,这样我们就可以降低重置执行策略的频率。 Then there won't be any intermittent passthrough calls from the blocked IP addresses.然后不会有来自被阻止的 IP 地址的任何间歇性直通呼叫。

[1]. [1]. https://docs.wso2.com/display/AM200/Managing+Throttling#ManagingThrottling-IPWhitelisting https://docs.wso2.com/display/AM200/Managing+Throttling#ManagingThrottling-IPWhitelisting

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM