This repository contains resources that can be used to demo Nginx App Protect within a Docker environment. This demo requires paid version of NGINX. Before running demo from any of the branches please make sure you have put the NGINX Plus key and cert within nginx-plus/etc/ssl/nginx/ directory. You can request for an NGINX Plus trial key by visiting www.nginx.com.
This repo has four "distinct" branches which can be used for different demos as described below.
NOTE: All App Protect related configurations are applied to the http context present inside the nginx.conf file for all the branches.
- This branch can be used to demonstrate basic configuration to enable App Protect.
- The
Dockerfilewithinnginx-plusdirectory has steps to install App Protect and also installsAttack SignaturesandThreat campaignspackages. - You can test the installation of this packages by getting inside the
nginx-pluscontainer and then running the below commands:docker exec -it [containerID] bash #Within the container run below commands: apt list --installed| grep app-protect apt-cache policy app-protect-attack-signatures apt-cache policy app-protect-threat-campaigns
- This branch is based of
mainbranch. This branch can be used to demonstrate customlog-formatand custompolicyin context to App Protect. - Toggle between various commented
policylines withinnginx.confto cover various scenarios. - Within this branch, App Protect related policies are also applied to
\basiclocation block present inside theconf.d\example.com.conffile along withhttpcontext present inside thenginx.conffile.
- This branch is based of
advancebranch. This branch can be used to demostrate how App Protect logs can be streamed to an elasticsearch server and then consolidate logs can be viewed within Kibana dashboard. - As a prerequisite, please allocate sufficient virtual memory to docker desktop as elk consumes a significant amount of memory. (Recommended: Atleast 4GB memory)
- The
docker-composefile within this branch addselkservice which is used for Kibana dashboards. - The Kibana dashboard can be accessed using http://localhost:5601
- For further details on how to setup ELK for NAP refer to https://github.com/f5devcentral/f5-waf-elk-dashboards repository.