blob: a8e8c5c43a6de10dc5f3e7875ac8dd1737403f99 [file]
#Sample Plugin - AccessControl
##Overview
This plugin provides IP filtering to Edge Microgateway. With this plugin, users can whitelist and/or blacklist IP Addresses.
##Enable the plugin
Include the plugin the in plugin sequence of {org}-{env}-config.yaml file:
```
plugins:
sequence:
- oauth
- accesscontrol
```
##Configure the plugin
The plugin configuration has three parts:
* (instance) Defining the microgateway instance. This registers microgateway with Eureka
* (eureka) Provide the endpoint details to where Eureka is hosted
* (lookup) See below for details
```
accesscontrol:
allow:
- 10.10.10.10
- 11.*.11.*
deny:
- 12.12.12.*
```
###Lookup Configuration
Eureka registers apps (BOOK in the example above). There needs to be a mapping to map the API Proxy basePath to an app registered on Eureka. In the example above, the basePath /httpbin and /book maps to the BOOK app.
NOTE: If a mapping is not found, then the plugins forwards the API traffic as configured in the proxy.