Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accesscontrol plugin allows IPs that are NOT in the allow list. #147

Open
swilliams11 opened this issue Sep 26, 2019 · 1 comment
Open

Comments

@swilliams11
Copy link
Contributor

If you send a request from an IP address and that IP is not listed in the allow list, then this plugin still allows the request to continue. It should fail in this instance.

Can we update this plugin, lines 24 - 26, as shown below?
https://github.com/apigee/microgateway-plugins/blob/master/accesscontrol/index.js#L24

if (scanIP(config.allow, sourceIP)) {
allow = true;
} else {
allow = false;
}

We should also update lines 30 - 33 as shown below.
https://github.com/apigee/microgateway-plugins/blob/master/accesscontrol/index.js#L30

if (scanIP(config.deny, sourceIP)) {
debug ('deny incoming message');
deny = true;
} else {
deny = false;
}

@jithinrjv
Copy link

swilliams, Any update on fixing this issue? Even i have tested the plugin and its looks like its not working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants