Skip to content
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

Backport 2.13 lua check client abort #1421

Merged
merged 12 commits into from
Nov 2, 2023
Next Next commit
THREESCALE-10224 CVE-2023-44487 http/2 rapid reset
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
eguzki committed Nov 2, 2023
commit 354a5bd454b5ee0b030304525e4c3633dd95ede4
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ executors:
openresty:
working_directory: /opt/app-root/apicast
docker:
- image: quay.io/3scale/apicast-ci:openresty-1.19.3-pr1381
- image: quay.io/3scale/apicast-ci:openresty-1.19.3-23
- image: redis:3.2.8-alpine
environment:
TEST_NGINX_BINARY: openresty
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Fixed

- Fixed CVE-2023-44487 (HTTP/2 Rapid Reset) [PR #393](https://github.com/3scale/apicast/pull/392) [THREESCALE-10224](https://issues.redhat.com/browse/THREESCALE-10224)

### Added

- Detect number of CPU shares when running on Cgroups V2 [PR #1410](https://github.com/3scale/apicast/pull/1410) [THREESCALE-10167](https://issues.redhat.com/browse/THREESCALE-10167)
Expand Down
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM registry.access.redhat.com/ubi8:8.5

ARG OPENRESTY_RPM_VERSION="1.19.3"
ARG OPENRESTY_RPM_VERSION="1.19.3-23.el8"
ARG LUAROCKS_VERSION="2.3.0"
ARG JAEGERTRACING_CPP_CLIENT_RPM_VERSION="0.3.1-13.el8"

LABEL summary="The 3scale API gateway (APIcast) is an OpenResty application, which consists of two parts: NGINX configuration and Lua files." \
description="APIcast is not a standalone API gateway therefore it needs connection to the 3scale API management platform. The container includes OpenResty and uses LuaRocks to install dependencies (rocks are installed in the application folder)." \
Expand All @@ -18,13 +20,17 @@ ENV AUTO_UPDATE_INTERVAL=0 \
PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \
PLATFORM="el8"

RUN sed -i s/enabled=./enabled=0/g /etc/yum/pluginconf.d/subscription-manager.conf
RUN PKGS="perl-interpreter-5.26.3 libyaml-devel-0.1.7 m4 openssl-devel git gcc make curl" && \
mkdir -p "$HOME" && \
yum -y --setopt=tsflags=nodocs install $PKGS && \
rpm -V $PKGS && \
yum clean all -y

RUN dnf install -y 'dnf-command(config-manager)'

RUN yum config-manager --add-repo https://packages.dev.3sca.net/dev_packages_3sca_net.repo

RUN PKGS="perl-interpreter-5.26.3 libyaml-devel-0.1.7 m4 openssl-devel git gcc make curl openresty-resty-${OPENRESTY_RPM_VERSION} luarocks-2.3.0 opentracing-cpp-devel-1.3.0 libopentracing-cpp1-1.3.0 jaegertracing-cpp-client openresty-opentracing-${OPENRESTY_RPM_VERSION}" && \
RUN PKGS="openresty-resty-${OPENRESTY_RPM_VERSION} openresty-opentelemetry-${OPENRESTY_RPM_VERSION} openresty-opentracing-${OPENRESTY_RPM_VERSION} openresty-${OPENRESTY_RPM_VERSION} luarocks-${LUAROCKS_VERSION} opentracing-cpp-devel-1.3.0 libopentracing-cpp1-1.3.0 jaegertracing-cpp-client-${JAEGERTRACING_CPP_CLIENT_RPM_VERSION}" && \
mkdir -p "$HOME" && \
yum -y --setopt=tsflags=nodocs install $PKGS && \
rpm -V $PKGS && \
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile.devel
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM registry.access.redhat.com/ubi8:8.5

ARG OPENRESTY_RPM_VERSION="1.19.3"
ARG OPENRESTY_RPM_VERSION="1.19.3-23.el8"
ARG LUAROCKS_VERSION="2.3.0"
ARG JAEGERTRACING_CPP_CLIENT_RPM_VERSION="0.3.1-13.el8"

WORKDIR /tmp

Expand All @@ -12,7 +13,7 @@ ENV APP_ROOT=/opt/app-root \

RUN sed -i s/enabled=./enabled=0/g /etc/yum/pluginconf.d/subscription-manager.conf

RUN yum upgrade -y
RUN yum upgrade -y

RUN dnf install -y 'dnf-command(config-manager)'

Expand All @@ -29,7 +30,9 @@ RUN yum install -y \
openresty-${OPENRESTY_RPM_VERSION} \
openresty-resty-${OPENRESTY_RPM_VERSION} \
openresty-opentracing-${OPENRESTY_RPM_VERSION} \
jaegertracing-cpp-client
opentracing-cpp-devel-1.3.0 \
libopentracing-cpp1-1.3.0 \
jaegertracing-cpp-client-${JAEGERTRACING_CPP_CLIENT_RPM_VERSION}

RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log \
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NPROC ?= $(firstword $(shell nproc 2>/dev/null) 1)

SEPARATOR="\n=============================================\n"

DEVEL_IMAGE ?= quay.io/3scale/apicast-ci:openresty-1.19.3
DEVEL_IMAGE ?= quay.io/3scale/apicast-ci:openresty-1.19.3-23
DEVEL_DOCKERFILE ?= Dockerfile.devel

RUNTIME_IMAGE ?= quay.io/3scale/apicast:latest
Expand Down Expand Up @@ -63,9 +63,9 @@ export COMPOSE_PROJECT_NAME
# The development image is also used in CI (circleCI) as the 'openresty' executor
# When the development image changes, make sure to:
# * build a new development image:
# make dev-build IMAGE_NAME=quay.io/3scale/apicast-ci:openresty-1.19.3
# make dev-build IMAGE_NAME=quay.io/3scale/apicast-ci:openresty-X.Y.Z-{release_number}
# * push to quay.io/3scale/apicast-ci with a fixed tag (avoid floating tags)
# docker push quay.io/3scale/apicast-ci:openresty-1.19.3
# docker push quay.io/3scale/apicast-ci:openresty-X.Y.Z-{release_number}
# * update .circleci/config.yaml openresty executor with the image URL
.PHONY: dev-build
dev-build: export OPENRESTY_RPM_VERSION?=1.19.3
Expand Down
3 changes: 2 additions & 1 deletion docker-compose-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version: '2.2'
services:
development:
image: ${IMAGE:-quay.io/3scale/apicast-ci:openresty-1.19.3}
image: ${IMAGE:-quay.io/3scale/apicast-ci:openresty-1.19.3-23}
platform: "linux/amd64"
depends_on:
- redis
working_dir: /opt/app-root/src/
Expand Down