Skip to content

Update to NGINX OSS 1.29.1, PLUS R35, Agent v3.2, App Protect and Alpine 3.22 #7971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:

- name: Generate WAF v5 tgz from JSON
run: |
docker run --rm --user root -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}/tests/data/ap-waf-v5:/data gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/nap/waf-compiler:5.6.0 -p /data/wafv5.json -o /data/wafv5.tgz
docker run --rm --user root -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}/tests/data/ap-waf-v5:/data gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/nap/waf-compiler:5.8.0 -p /data/wafv5.json -o /data/wafv5.tgz
if: ${{ contains(matrix.images.image, 'nap-v5')}}

- name: Run Regression Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:

- name: Generate WAF v5 tgz from JSON
run: |
docker run --rm --user root -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}/tests/data/ap-waf-v5:/data gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/nap/waf-compiler:5.6.0 -p /data/wafv5.json -o /data/wafv5.tgz
docker run --rm --user root -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}/tests/data/ap-waf-v5:/data gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/nap/waf-compiler:5.8.0 -p /data/wafv5.json -o /data/wafv5.tgz
if: ${{ contains(inputs.image, 'nap-v5')}}

- name: Run Smoke Tests
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
VER = $(shell grep IC_VERSION .github/data/version.txt | cut -d '=' -f 2)
GIT_TAG = $(shell git describe --exact-match --tags || echo untagged)
VERSION = $(VER)-SNAPSHOT
NGINX_OSS_VERSION ?= 1.27
NGINX_PLUS_VERSION ?= R34
NGINX_OSS_VERSION ?= 1.29.1
NGINX_PLUS_VERSION ?= R35
PLUS_ARGS = --build-arg NGINX_PLUS_VERSION=$(NGINX_PLUS_VERSION) --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key

# Variables that can be overridden
Expand Down
39 changes: 19 additions & 20 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.16
ARG BUILD_OS=debian
ARG NGINX_OSS_VERSION=1.27
ARG NGINX_PLUS_VERSION=R34
ARG NGINX_OSS_VERSION=1.29.1
ARG NGINX_PLUS_VERSION=R35
ARG DOWNLOAD_TAG=edge
ARG DEBIAN_FRONTEND=noninteractive
ARG PREBUILT_BASE_IMG=nginx/nginx-ingress:${DOWNLOAD_TAG}
Expand All @@ -13,7 +13,7 @@ ARG PACKAGE_REPO=pkgs.nginx.com
FROM ghcr.io/nginx/dependencies/nginx-ubi:ubi8@sha256:12b2f675a94fed04ab5787d78a27b4f8723991bdbe1403257e71de368e7ec852 AS ubi8-packages
FROM ghcr.io/nginx/dependencies/nginx-ubi:ubi9@sha256:c9c269ae1ae6a4608fe4e6536073cdea9445433de652fd8ac667992a1ed198d6 AS ubi9-packages
FROM ghcr.io/nginx/alpine-fips:0.3.0-alpine3.19@sha256:449f1a149e81e36bb929ebd362433a06a158ff2a7e3ba05b4b8d9ea96d59ae91 AS alpine-fips-3.19
FROM ghcr.io/nginx/alpine-fips:0.3.0-alpine3.21@sha256:5e5033f34ae7147ce8df928fa58c485bc08ded8ace22428b4c16df30e3b39901 AS alpine-fips-3.21
FROM ghcr.io/nginx/alpine-fips:0.3.0-alpine3.22@sha256:86a8ec5ff400572d9004fcfe1468f9c22954ebd7d2b57910cb8d454f148f4ad4 AS alpine-fips-3.22
FROM redhat/ubi9-minimal:9.6@sha256:8d905a93f1392d4a8f7fb906bd49bf540290674b28d82de3536bb4d0898bf9d7 AS ubi-minimal
FROM golang:1.24-alpine@sha256:c8c5f95d64aa79b6547f3b626eb84b16a7ce18a139e3e9ca19a8c078b85ba80d AS golang-builder

Expand Down Expand Up @@ -82,7 +82,7 @@ USER 101


############################################# Base image for Alpine #############################################
FROM nginx:1.27.5-alpine@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10 AS alpine
FROM nginx:1.29.1-alpine3.22@sha256:599f75c32c9bfe5859e022f75d26e4d939f5b1097c7abc1add287d48ec100f1e AS alpine
ARG PACKAGE_REPO
ARG NGINX_OSS_VERSION

Expand All @@ -93,15 +93,14 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.rsa.pub,target=/etc/apk
&& export $(cat /tmp/user_agent) \
&& printf "%s%s%s\n" "http://packages.nginx.org/nginx/mainline/alpine/v" `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` "/main" >> /etc/apk/repositories \
&& printf "%s%s%s\n" "http://packages.nginx.org/nginx-agent/alpine/v" `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` "/main" >> /etc/apk/repositories \
&& apk add --no-cache nginx-module-otel~${NGINX_OSS_VERSION} "nginx-agent<3.1" \
&& apk add --no-cache nginx-module-otel~${NGINX_OSS_VERSION} nginx-agent~3.2 \
&& ldconfig /usr/local/lib/ \
&& agent.sh \
&& sed -i -e '/nginx.org/d' /etc/apk/repositories


############################################# Base image for Debian #############################################
FROM nginx:1.27.5@sha256:6784fb0834aa7dbbe12e3d7471e69c290df3e6ba810dc38b34ae33d3c1c05f7d AS debian
ARG NGINX_OSS_VERSION
FROM nginx:1.29.1@sha256:33e0bbc7ca9ecf108140af6288c7c9d1ecc77548cbfd3952fd8466a75edefe57 AS debian

RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_signing.key \
--mount=type=bind,from=nginx-files,src=90pkgs-nginx,target=/etc/apt/apt.conf.d/90pkgs-nginx \
Expand All @@ -116,7 +115,7 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
http://packages.nginx.org/nginx-agent/debian `lsb_release -cs` agent" >> /etc/apt/sources.list.d/nginx.list \
&& printf "%s" "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.0.* nginx-module-otel=${NGINX_OSS_VERSION}* \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.2.* nginx-module-otel=${NGINX_OSS_VERSION}* \
&& apt-get purge --auto-remove -y gpg \
&& rm -rf /var/lib/apt/lists/* /etc/apt/preferences.d/99nginx /etc/apt/sources.list.d/nginx.list \
&& agent.sh
Expand Down Expand Up @@ -159,12 +158,12 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
&& printf "%s\n" "[agent]" "name=agent repo" \
"baseurl=https://packages.nginx.org/nginx-agent/centos/9/\$basearch/" \
"gpgcheck=1" "enabled=1" "module_hotfixes=true" >> /etc/yum.repos.d/nginx.repo \
&& microdnf --nodocs install -y nginx-${NGINX_OSS_VERSION}* nginx-module-njs-${NGINX_OSS_VERSION}* nginx-module-otel-${NGINX_OSS_VERSION}* nginx-module-image-filter-${NGINX_OSS_VERSION}* nginx-module-xslt-${NGINX_OSS_VERSION}* nginx-agent-3.0.* \
&& microdnf --nodocs install -y nginx-${NGINX_OSS_VERSION}* nginx-module-njs-${NGINX_OSS_VERSION}* nginx-module-otel-${NGINX_OSS_VERSION}* nginx-module-image-filter-${NGINX_OSS_VERSION}* nginx-module-xslt-${NGINX_OSS_VERSION}* nginx-agent-3.2.* \
&& rm /etc/yum.repos.d/nginx.repo \
&& ubi-clean.sh

############################################# Base image for Alpine with NGINX Plus ##############################################
FROM alpine:3.21@sha256:b6a6be0ff92ab6db8acd94f5d1b7a6c2f0f5d10ce3c24af348d333ac6da80685 AS alpine-plus
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 AS alpine-plus
ARG NGINX_PLUS_VERSION
ARG PACKAGE_REPO

Expand All @@ -179,7 +178,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
export $(cat /tmp/user_agent) \
&& printf "%s\n" "https://${PACKAGE_REPO}/plus/${NGINX_PLUS_VERSION}/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& printf "%s\n" "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check "nginx-agent<3.1" libcap libcurl \
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent~3.2 libcap libcurl \
&& mkdir -p /etc/nginx/reporting/ && cp -av /tmp/nginx/reporting/tracking.info /etc/nginx/reporting/tracking.info \
&& agent.sh \
&& sed -i -e '/nginx.com/d' /etc/apk/repositories
Expand All @@ -191,7 +190,7 @@ ARG NGINX_PLUS_VERSION

ENV NGINX_VERSION=${NGINX_PLUS_VERSION}

RUN --mount=type=bind,from=alpine-fips-3.21,target=/tmp/fips/ \
RUN --mount=type=bind,from=alpine-fips-3.22,target=/tmp/fips/ \
--mount=type=bind,from=nginx-files,src=tracking.info,target=/tmp/nginx/reporting/tracking.info \
mkdir -p /usr/ssl \
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
Expand Down Expand Up @@ -220,7 +219,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
&& printf "%s\n" "https://pkgs.nginx.com/app-protect-security-updates/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& printf "%s\n" "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
&& apk add --no-cache "nginx-agent<3" \
&& apk add --no-cache nginx-agent~2 \
&& mkdir -p /usr/ssl \
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
Expand Down Expand Up @@ -251,14 +250,14 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
&& printf "%s\n" "https://${PACKAGE_REPO}/app-protect-x-plus/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& printf "%s\n" "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
&& apk add --no-cache "nginx-agent<3" \
&& apk add --no-cache nginx-agent~2 \
&& mkdir -p /usr/ssl \
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
&& cp -av /tmp/fips/etc/ssl/openssl.cnf /etc/ssl/openssl.cnf \
&& mkdir -p /etc/nginx/reporting/ \
&& cp -av /tmp/nginx/reporting/tracking.info /etc/nginx/reporting/tracking.info \
&& apk add --no-cache app-protect-module-plus~=34.5.442 \
&& apk add --no-cache app-protect-module-plus~=35.5.498 \
&& sed -i -e '/nginx.com/d' /etc/apk/repositories \
&& nap-waf.sh \
agent.sh
Expand Down Expand Up @@ -308,7 +307,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
apt-get update \
&& cp /tmp/nginx-agent.sources /etc/apt/sources.list.d/nginx-agent.sources \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.0.* \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.2.* \
&& agent.sh \
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx-agent.sources

Expand Down Expand Up @@ -360,7 +359,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
--mount=type=bind,from=nginx-files,src=nap-waf.sh,target=/usr/local/bin/nap-waf.sh \
--mount=type=bind,from=nginx-files,src=debian-agent-12.sources,target=/etc/apt/sources.list.d/nginx-agent.sources \
apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=2.* app-protect-module-plus=34+5.442* nginx-plus-module-appprotect=34+5.442* app-protect-plugin=6.16.0* \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=2.* app-protect-module-plus=35+5.498* nginx-plus-module-appprotect=35+5.498* app-protect-plugin=6.20.0* \
&& nap-waf.sh \
&& agent.sh

Expand All @@ -385,7 +384,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
mkdir -p /etc/nginx/reporting/ && cp -av /tmp/nginx/reporting/tracking.info /etc/nginx/reporting/tracking.info \
&& ubi-setup.sh \
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
&& microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-3.0.* \
&& microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-3.2.* \
&& agent.sh \
&& ubi-clean.sh

Expand Down Expand Up @@ -462,7 +461,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
&& microdnf --nodocs install -y ca-certificates shadow-utils subscription-manager \
&& microdnf --nodocs install -y nginx-plus-module-otel nginx-agent-2.* app-protect-module-plus-34+5.442* \
&& microdnf --nodocs install -y nginx-plus-module-otel nginx-agent-2.* app-protect-module-plus-35+5.498* \
&& nap-waf.sh \
&& ubi-clean.sh \
&& agent.sh
Expand Down Expand Up @@ -532,7 +531,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
&& rpm --import /tmp/nginx_signing.key \
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-2.* \
&& dnf --nodocs install -y app-protect-module-plus-34+5.442* \
&& dnf --nodocs install -y app-protect-module-plus-35+5.498* \
&& nap-waf.sh \
&& agent.sh \
&& dnf clean all
Expand Down
20 changes: 10 additions & 10 deletions charts/nginx-ingress/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@
},
"tag": {
"type": "string",
"default": "5.6.0",
"default": "5.8.0",
"title": "The tag of the App Protect WAF v5 Enforcer image",
"examples": [
"5.6.0"
"5.8.0"
]
},
"digest": {
Expand Down Expand Up @@ -391,7 +391,7 @@
"examples": [
{
"repository": "private-registry.nginx.com/nap/waf-enforcer",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
}
]
Expand Down Expand Up @@ -425,10 +425,10 @@
},
"tag": {
"type": "string",
"default": "5.6.0",
"default": "5.8.0",
"title": "The tag of the App Protect WAF v5 Config Manager image",
"examples": [
"5.6.0"
"5.8.0"
]
},
"digest": {
Expand Down Expand Up @@ -465,7 +465,7 @@
"examples": [
{
"repository": "private-registry.nginx.com/nap/waf-config-mgr",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
}
]
Expand Down Expand Up @@ -1953,15 +1953,15 @@
"port": 50000,
"image": {
"repository": "private-registry.nginx.com/nap/waf-enforcer",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
},
"securityContext": {}
},
"configManager": {
"image": {
"repository": "private-registry.nginx.com/nap/waf-config-mgr",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
},
"securityContext": {
Expand Down Expand Up @@ -2596,15 +2596,15 @@
"port": 50000,
"image": {
"repository": "private-registry.nginx.com/nap/waf-enforcer",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
},
"securityContext": {}
},
"configManager": {
"image": {
"repository": "private-registry.nginx.com/nap/waf-config-mgr",
"tag": "5.6.0",
"tag": "5.8.0",
"pullPolicy": "IfNotPresent"
},
"securityContext": {
Expand Down
4 changes: 2 additions & 2 deletions charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ controller:
repository: private-registry.nginx.com/nap/waf-enforcer

## The tag of the App Protect WAF v5 Enforcer image.
tag: "5.6.0"
tag: "5.8.0"
## The digest of the App Protect WAF v5 Enforcer image.
## If digest is specified it has precedence over tag and will be used instead
# digest: "sha256:CHANGEME"
Expand All @@ -100,7 +100,7 @@ controller:
repository: private-registry.nginx.com/nap/waf-config-mgr

## The tag of the App Protect WAF v5 Configuration Manager image.
tag: "5.6.0"
tag: "5.8.0"
## The digest of the App Protect WAF v5 Configuration Manager image.
## If digest is specified it has precedence over tag and will be used instead
# digest: "sha256:CHANGEME"
Expand Down
8 changes: 4 additions & 4 deletions charts/tests/__snapshots__/helmunit_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ spec:
- -weight-changes-dynamic-reload=false

- name: waf-enforcer
image: my.private.reg/nap/waf-enforcer:5.6.0
image: my.private.reg/nap/waf-enforcer:5.8.0
imagePullPolicy: "IfNotPresent"
env:
- name: ENFORCER_PORT
Expand All @@ -1943,7 +1943,7 @@ spec:
- name: app-protect-bd-config
mountPath: /opt/app_protect/bd_config
- name: waf-config-mgr
image: my.private.reg/nap/waf-config-mgr:5.6.0
image: my.private.reg/nap/waf-config-mgr:5.8.0
imagePullPolicy: "IfNotPresent"
securityContext:

Expand Down Expand Up @@ -2514,7 +2514,7 @@ spec:
- -agent-instance-group=app-protect-wafv5-agentv2-nginx-ingress-controller

- name: waf-enforcer
image: my.private.reg/nap/waf-enforcer:5.6.0
image: my.private.reg/nap/waf-enforcer:5.8.0
imagePullPolicy: "IfNotPresent"
env:
- name: ENFORCER_PORT
Expand All @@ -2525,7 +2525,7 @@ spec:
- name: app-protect-bd-config
mountPath: /opt/app_protect/bd_config
- name: waf-config-mgr
image: my.private.reg/nap/waf-config-mgr:5.6.0
image: my.private.reg/nap/waf-config-mgr:5.8.0
imagePullPolicy: "IfNotPresent"
securityContext:

Expand Down
1 change: 1 addition & 0 deletions tests/data/agent/agent-v3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ log:

allowed_directories:
- /etc/nginx
- /etc/app_protect
- /usr/local/etc/nginx
- /usr/share/nginx/modules
- /var/run/nginx
Expand Down
Loading
Loading