Sign inSign up

crowdsecurity/lua-bouncer-plugin

By crowdsecurity

•Updated 12 months ago

Crowdsec Lua bouncer plugin for Ingress-nginx

Image
0

50K+

crowdsecurity/lua-bouncer-plugin repository overview

⁠CrowdSec Lua Plugin

CrowdSec Lua Plugin - a Lua plugin bouncer to use with Ingress Nginx controller.

⁠Configuration

The bouncer uses lua_shared_dict⁠ to share cache between all workers. If you want to increase the cache size you need to change this value lua_shared_dict: "crowdsec_cache 50m" in the helm ingress-nginx config file (ingress-nginx documentation⁠).

For others parameters, you can use environment variables below or mount your own config file at /etc/crowdsec/bouncers/crowdsec-openresty-bouncer.conf

⁠Environment Variables
  • API_URL - Crowdsec local API URL : -e API_URL="http://172.17.0.1:8080"
  • API_KEY - Disable local API (default: false) : -e API_KEY="abcdefghijklmnopqrstuvwxyz"
  • CACHE_EXPIRATION - [For 'live' mode only] decisions cache time (in seconds) (default: 1) : -e CACHE_EXPIRATION="1"
  • CACHE_SIZE - The maximum number of decisions in cache (default: 1000) : -e CACHE_SIZE="1000"
  • BOUNCING_ON_TYPE - The decisions type the bouncer should remediate on (default: ban) : -e BOUNCING_ON_TYPE="ban"
  • REQUEST_TIMEOUT - Request timeout (in seconds) for LAPI request (default: 0.2) : -e REQUEST_TIMEOUT="0.2"
  • UPDATE_FREQUENCY - [For 'stream' mode only] pull frequency (in seconds) from LAPI (default: 10) : -e UPDATE_FREQUENCY="10"
  • MODE - Bouncer mode : streaming (stream) or rupture (live) mode (default: stream) : -e MODE="stream"
⁠Volumes
  • /etc/crowdsec/ - Directory where all crowdsec configurations are located
⁠Useful File Locations
  • /usr/local/openresty/lualib/plugins/crowdsec - Crowdsec lua library path

  • /etc/nginx/conf.d - Nginx configuration to load the crowdsec bouncer lua library and configuration.

⁠Find Us

⁠Contributing

Please read contributing⁠ for details on our code of conduct, and the process for submitting pull requests to us.

⁠License

This project is licensed under the MIT License - see the LICENSE⁠ file for details.

Tag summary

Content type

Image

Digest

sha256:9a6229aa9…

Size

10.1 MB

Last updated

about 1 year ago

docker pull crowdsecurity/lua-bouncer-plugin