{"id":19200429,"url":"https://github.com/fabriziofiorucci/nap-compiler-rest-api","last_synced_at":"2026-05-20T05:41:11.153Z","repository":{"id":228678233,"uuid":"755232230","full_name":"fabriziofiorucci/NAP-Compiler-REST-API","owner":"fabriziofiorucci","description":"A REST API for NGINX App Protect WAF 5.0 Compiler","archived":false,"fork":false,"pushed_at":"2024-07-01T10:39:43.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-04T13:07:00.107Z","etag":null,"topics":["app-protection","nginx","rest-api"],"latest_commit_sha":null,"homepage":"https://docs.nginx.com/nginx-app-protect-waf/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabriziofiorucci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-09T17:45:39.000Z","updated_at":"2024-10-02T11:28:04.000Z","dependencies_parsed_at":"2024-03-19T23:51:25.490Z","dependency_job_id":null,"html_url":"https://github.com/fabriziofiorucci/NAP-Compiler-REST-API","commit_stats":null,"previous_names":["fabriziofiorucci/nap-compiler-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNAP-Compiler-REST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNAP-Compiler-REST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNAP-Compiler-REST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNAP-Compiler-REST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabriziofiorucci","download_url":"https://codeload.github.com/fabriziofiorucci/NAP-Compiler-REST-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240273035,"owners_count":19775166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-protection","nginx","rest-api"],"created_at":"2024-11-09T12:32:55.456Z","updated_at":"2026-05-20T05:41:06.121Z","avatar_url":"https://github.com/fabriziofiorucci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API for NGINX App Protect WAF Compiler\n\nThis repository provides a set of REST API to use the NGINX App Protect policy compiler within an automation pipeline.\nThe service can be run either on `docker-compose` or on `Kubernetes`.\n\n## Requirements\n\n- NGINX App Protect WAF Compiler\n- docker version v24+ to build the image\n- One of:\n  - Docker-compose v2.20+\n  - Kubernetes cluster\n\n## REST API Endpoints\n\n- `/v1/compile/policy` - compiles a JSON policy into a bundle\n  - Method: `POST`\n  - Payload: `{\"global-settings\": \"\u003cBASE64_ENCODED_GLOBAL_SETTINGS_JSON\u003e\", \"policy\": \"\u003cBASE64_ENCODED_POLICY_JSON\u003e\"}`\n- `/v1/compile/logprofile` - compiles a log profile JSON into a bundle\n  - Method: `POST`\n  - Payload: `{\"logprofile\": \"\u003cBASE64_ENCODED_LOG_PROFILE_JSON\u003e\"}`\n- `/v1/bundle/info` - returns details on a compiled bundle\n  - Method: `POST`\n  - Payload: `{\"bundle\": \"\u003cBASE64_ENCODED_TGZ_BUNDLE\u003e\"}`\n\nHeaders required for all endpoints:\n\n```\nContent-Type: application/json\n```\n\n## Building the Docker image\n\nThe docker image can be built using:\n\n```\ndocker build --no-cache -f Dockerfile \\\n  --secret id=nginx-key,src=\u003cNGINX_KEY_FILE\u003e --secret id=nginx-crt,src=\u003cNGINX_CERTIFICATE_FILE\u003e \\\n  -t \u003cDESTINATION_DOCKER_IMAGE_NAME:TAG\u003e .\n```\n\nExample:\n\n```\ndocker build --no-cache -f Dockerfile \\\n  --secret id=nginx-key,src=/etc/ssl/nginx/nginx-repo.key --secret id=nginx-crt,src=/etc/ssl/nginx/nginx-repo.crt \\\n  -t nap-compiler:latest .\n```\n\nNote: the docker image is automatically built by the `docker-compose.yaml` in the example\n\n## How to run\n\nThis repository can be run on:\n\n- [Docker compose](contrib/docker-compose)\n- [Kubernetes](contrib/kubernetes)\n\n## How to test\n\n- See the [examples](contrib/examples)\n- Use the [Postman collection](contrib/postman)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnap-compiler-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabriziofiorucci%2Fnap-compiler-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnap-compiler-rest-api/lists"}