https://github.com/loafoe/kong-plugin-geofence
Kong plugin implementing geofencing
https://github.com/loafoe/kong-plugin-geofence
geofence geoip2 kong kong-gateway kong-plugin maxmind-geoip
Last synced: about 1 month ago
JSON representation
Kong plugin implementing geofencing
- Host: GitHub
- URL: https://github.com/loafoe/kong-plugin-geofence
- Owner: loafoe
- License: mit
- Created: 2021-09-21T05:15:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T06:24:59.000Z (over 1 year ago)
- Last Synced: 2025-01-20T15:17:39.955Z (3 months ago)
- Topics: geofence, geoip2, kong, kong-gateway, kong-plugin, maxmind-geoip
- Language: Go
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# kong-plugin-geofence
Kong plugin implementing geofencing. Supports fencing at Country level currently. The plugin
uses the excellent [MaxMind](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data) GeoIP2 or GeoLite2 databases.
The configured `license_key` will allow the plugin to download the database on-the-fly.## Kong environment
```shell
KONG_PLUGINS = "geofence,bundled"
KONG_PLUGINSERVER_NAMES = "geofence"
KONG_PLUGINSERVER_GEOFENCE_START_CMD = "/usr/local/bin/geofence"
KONG_PLUGINSERVER_GEOFENCE_QUERY_CMD = "/usr/local/bin/geofence -dump"
```## Kong configuration
### Declarative
```yaml
plugins:
- name: geofence
config:
license_key: XXX
countries_allow_list:
- NL
- SR
```## fields
* `config.license_key` - (Required) The MaxMind [license key](https://support.maxmind.com/account-faq/license-keys/how-do-i-generate-a-license-key/) to use
* `config.countries_allow_list` - (Optional) The list of country ISO codes to allow
* `config.countries_deny_list` - (Optional) The list of country ISO codes to deny## license
License is MIT