Skip to content

NGINX App Protect (Task B): design spec + the v4 proof box (infra) - #55

Merged
henleda merged 1 commit into
mainfrom
feat-nginx-app-protect-design
Aug 18, 2026
Merged

NGINX App Protect (Task B): design spec + the v4 proof box (infra)#55
henleda merged 1 commit into
mainfrom
feat-nginx-app-protect-design

Conversation

@henleda

@henleda henleda commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Task B kickoff for the bring-your-own NGINX + App Protect variant: the design spec and the Terraform for the proof box to validate it on. Two commits, both reviewable independently.

1. Design spec — docs/design/nginx-app-protect-apply.md

The L2 analogue of bigip_apply.py, from a research + design + adversarial-critique pass grounded in the actual codebase. Follows the docs/design/bigip-apply.md precedent (#46).

  • Transport: SSH → policy file → copilot-owned managed includenginx -t → reload. New nginx.py/nginx_lab.py/nginx_apply.py mirror the bigip.py trio; emit(target='nginx-app-protect'), _run_validation, probe, ledger, audit reused unchanged. One new control string: nginx_app_protect. v4 (raw JSON) is the v1 target.
  • Forms: all three port; waf stays honestly DECLINED (NAP's own signature staging — the exact BIG-IP analogue).
  • §10 "Verify on the live box": the 6 adversarial must-fixes, each a NAP runtime behavior asserted from schema+docs but unproven (entity staging, real block-page, the reload/enforcer command, v4/v5, uncited identifiers). All fail closed (the live probe rolls back), so nothing unsafe can ship — the live box is the tiebreaker.

2. Proof box — infra/vpcopilot-nap/

A single NGINX Plus + App Protect v4 EC2 that fronts the existing Larkspur origin, so we can prove a form end-to-end on a real NAP box.

  • Reuses the vpcopilot-lab VPC + subnet (data-sourced by tag) + the running Larkspur origin. The lab's origin SG already admits :8080 from the VPC CIDR → adds one box, zero changes to vpcopilot-lab. terraform plan: 7 to add, 0 to change, 0 to destroy (validated against the live lab VPC vpc-034a04318ab240063).
  • Ubuntu 22.04 t3.medium at 10.30.10.30, public EIP, SG (vhost :80; SSH via SSM), SSM role, keypair from .secrets/.
  • Onboarding is out-of-band over SSM (make onboard JWT=…): installs NGINX Plus + App Protect using the F5 subscription JWT, stands up a reverse-proxy vhost to Larkspur with App Protect enforcing, ends with a smoke test. The JWT lands only at /etc/nginx/license.jwt on the box — never in user_data or state. Secrets/state/*.jwt gitignored.
  • F5 gated the JWT-era v4 install docs behind MyF5, so the onboard script is an honest scaffold with # VERIFY: markers (repo-auth line, package names, log path) — the NAP Phase-0 live spike, expected to iterate on first contact like the BIG-IP onboarding did.

Provisioning stays user-gatedterraform apply is yours to run.

Next (once merged / on your go)

make applymake onboard (with the JWT) → prove the NAP install blocks → resolve the §10 must-fixes on the real box → build out nginx_apply.py + the forms.

🤖 Generated with Claude Code

The bring-your-own NGINX + App Protect analogue of the BIG-IP Advanced-WAF apply
path (bigip_apply.py). Grounded in the actual codebase + an adversarial design
review; maps the full L2 spine onto the BIG-IP one:

- Transport: SSH → policy file + a copilot-owned managed `include` → nginx -t →
  reload. v4 (raw JSON) is the v1 target; v4/v5 split lives inside the Nginx client.
- New: nginx.py / nginx_lab.py / nginx_apply.py (mirror bigip.py / bigip_lab.py /
  bigip_apply.py). Reuses emit(target='nginx-app-protect'), _run_validation,
  probe_from_spec, ledger, audit unchanged. One new control string: nginx_app_protect.
- All three forms port (service_policy / waf_data_guard / api_schema); waf stays
  honestly DECLINED (NAP's own signature staging — the exact BIG-IP analogue).
- §10 "Verify on the live box" collects every NAP runtime behavior asserted from
  schema+docs but unproven (entity staging, block-page text, the reload/enforcer
  command, v4/v5, uncited identifiers). The live L2 proof is the tiebreaker, same
  discipline as the three BIG-IP forms; nothing unsafe can ship (the live probe
  fails closed on all of them).
- §11 provisioning plan: no NAP box exists yet, so standing one up (NGINX Plus +
  App Protect v4 EC2, reuse the lab VPC + Larkspur origin, JWT install out-of-band)
  is the first step.

Design only — no code yet. Follows the docs/design/bigip-apply.md precedent (#46).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@henleda
henleda merged commit 7911aff into main Aug 18, 2026
4 checks passed
@henleda henleda changed the title docs(design): NGINX App Protect live-apply (L2) spec NGINX App Protect (Task B): design spec + the v4 proof box (infra) Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant