Skip to content

Commit

Permalink
feat: drop support for overriding USER
Browse files Browse the repository at this point in the history
Overrideing the USER only makes sense if it can be configured at build
time, as that user needs to exist on the system. For containers, this
functionality doesn't make much sense anyway.

Fixes #184
  • Loading branch information
theseion committed Jan 24, 2024
1 parent ac16622 commit de08b3b
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions README-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ All these variables impact in configuration directives in the modsecurity engine

| Name | Description|
| -- | -- |
| USER | Name (or #number) of the user to run httpd or nginx as (Default: `www-data` (httpd), `nginx` (nginx)) |
| GROUP | Name (or #number) of the group to run httpd as (Default: `www-data`) |
| BACKEND | Backend address (and optional port) of the backend server. (Default: the container's default router, port 81) (Examples: 192.0.2.2, 192.0.2.2:80, <http://172.17.0.1:8000>) |

### CRS specific
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ All these variables impact in configuration directives in the modsecurity engine

| Name | Description|
| -------- | ------------------------------------------------------------------- |
| USER | A string value indicating the name (or #number) of the user to run httpd or nginx as (Default: `www-data` (httpd), `nginx` (nginx)) |
| GROUP | A string value indicating the name (or #number) of the group to run httpd as (Default: `www-data`) |
| BACKEND | The backend address (and optional port) of the backend server. (Default: the container's default router, port 81) (Examples: 192.0.2.2, 192.0.2.2:80, <http://172.17.0.1:8000>) |

### CRS specific
Expand Down Expand Up @@ -359,8 +357,6 @@ docker run -dti -p 80:80 --rm \
-e TIMEOUT=60 \
-e LOGLEVEL=warn \
-e ERRORLOG='/proc/self/fd/2' \
-e USER=daemon \
-e GROUP=daemon \
-e SERVER_ADMIN=root@localhost \
-e SERVER_NAME=localhost \
-e PORT=80 \
Expand Down
2 changes: 0 additions & 2 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ ENV APACHE_ALWAYS_TLS_REDIRECT=off \
SSL_USE_STAPLING=On \
TIMEOUT=60 \
WORKER_CONNECTIONS=400 \
USER=www-data \
GROUP=www-data \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
Expand Down
3 changes: 0 additions & 3 deletions apache/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ ENV APACHE_ALWAYS_TLS_REDIRECT=off \
SSL_USE_STAPLING=On \
TIMEOUT=60 \
WORKER_CONNECTIONS=400 \
# overridden variables
USER=www-data \
GROUP=www-data \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
Expand Down
5 changes: 0 additions & 5 deletions apache/conf/extra/httpd-modsecurity.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ ErrorLog ${ERRORLOG}
# https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v2.x)#secserversignature
SecServerSignature ${MODSEC_SERVER_SIGNATURE}

<IfModule unixd_module>
User ${USER}
Group ${GROUP}
</IfModule>

<IfModule reqtimeout_module>
RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
</IfModule>
Expand Down
2 changes: 0 additions & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ ENV ACCESSLOG=/var/log/nginx/access.log \
WORKER_CONNECTIONS=1024 \
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib \
NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx \
# overridden variables
USER=nginx \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
Expand Down
2 changes: 0 additions & 2 deletions nginx/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ ENV ACCESSLOG=/var/log/nginx/access.log \
WORKER_CONNECTIONS=1024 \
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib \
NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx \
# overridden variables
USER=nginx \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
Expand Down

0 comments on commit de08b3b

Please sign in to comment.