From ead7bed341662059e3fd8edf39f0803bab553031 Mon Sep 17 00:00:00 2001 From: vasyukova Date: Fri, 6 Nov 2026 13:45:38 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20compose.yaml=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=81=D0=B5=D1=80=D0=B2=D0=B8=D1=81=D0=B0=20security=5Finit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 6d9ae4c..e971f59 100644 --- a/compose.yaml +++ b/compose.yaml @@ -33,7 +33,9 @@ services: if [ ! -f /certs/ca.crt ]; then openssl genrsa -out /certs/ca.key 4096 openssl req -x509 -new -nodes -key /certs/ca.key -sha256 -days 3650 \ - -subj "$${CA_SUBJECT}" -out /certs/ca.crt + -subj "$${CA_SUBJECT}" -out /certs/ca.crt \ + -addext "keyUsage=critical,keyCertSign,cRLSign" \ + -addext "basicConstraints=critical,CA:TRUE" fi # --- LB external server cert --- if [ ! -f /certs/server.crt ]; then @@ -656,6 +658,12 @@ services: cap_add: - NET_BIND_SERVICE - CHOWN + # lab7 fix: nginx master стартует от root и сбрасывает привилегии + # воркеров до пользователя nginx (UID 101). Для setgid/setuid нужны + # соответствующие capabilities, иначе воркеры падают с + # "setgid(101) failed (1: Operation not permitted)". + - SETGID + - SETUID restart: unless-stopped deploy: resources: