Skip to content

Commit 73e8574

Browse files
authored
Merge branch 'internetstandards:main' into main
2 parents a712868 + d562e81 commit 73e8574

File tree

13 files changed

+63
-27
lines changed

13 files changed

+63
-27
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ jobs:
725725

726726
- name: Collect Docker Compose logs
727727
if: always()
728-
run: make logs-all-dump env=test > docker-compose.log
728+
run: make logs-all-dump env=batch-test > docker-compose.log
729729

730730
- uses: test-summary/action@v2.3
731731
with:

docker/compose.development.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
# terminate tls so we don't need to have exceptions in the nginx config file for development
33
port-expose:
4-
image: nginx:1.27.3-alpine
4+
image: nginx:1.29.1-alpine3.22
55
networks:
66
- public-internet
77
- internal

docker/compose.integration-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
# from the internal network to the outside
55
# also terminate tls so we don't need to have exceptions in the nginx config file for development
66
port-expose:
7-
image: nginx:1.27.3-alpine
7+
image: nginx:1.29.1-alpine3.22
88
networks:
99
- public-internet
1010
- port-expose
@@ -96,7 +96,7 @@ services:
9696
- $RABBITMQ_GUI
9797

9898
test-target:
99-
image: nginx:1.27.3-alpine
99+
image: nginx:1.29.1-alpine3.22
100100

101101
networks:
102102
public-internet:
@@ -137,7 +137,7 @@ services:
137137
MH_SMTP_BIND_ADDR: 0.0.0.0:25
138138

139139
static:
140-
image: nginx:1.27.3-alpine
140+
image: nginx:1.29.1-alpine3.22
141141

142142
restart: unless-stopped
143143

docker/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
- nginx-logs-exporter:/var/log/nginx/prometheus-nginxlog-exporter/
6060

6161
healthcheck:
62-
test: ["CMD", "service", "nginx", "status"]
62+
test: ["CMD", "curl", "-ksSo/dev/null", "https://$INTERNETNL_DOMAINNAME", "--resolve", "$INTERNETNL_DOMAINNAME:443:127.0.0.1"]
6363
interval: $HEALTHCHECK_INTERVAL
6464
start_interval: $HEALTHCHECK_START_INTERVAL
6565
start_period: 1m

docker/webserver.Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM nginx:1.27.3
1+
FROM nginx:1.29.1-alpine3.22
22

3-
RUN apt-get update && apt-get install -y \
3+
RUN apk add --no-cache \
4+
# for random quic host key
5+
openssl \
46
# for htpasswd
57
apache2-utils \
6-
# for gixy install
7-
python3-venv \
8-
&& rm -rf /var/lib/apt/lists/*
8+
# for gixy and certbot install
9+
python3
910

1011
# install nginx config static analysis tool
1112
RUN python3 -m venv /opt/gixy

docker/webserver/nginx_templates/app.conf.template renamed to docker/webserver/nginx_templates/default.conf.template

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ resolver 127.0.0.11 ipv6=off valid=5s;
3232

3333
root /var/www/internet.nl;
3434

35-
# enable OSCP stapling
36-
ssl_stapling on;
37-
ssl_stapling_verify on;
38-
ssl_protocols TLSv1.2 TLSv1.3;
39-
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
40-
4135
http2 on;
4236
http3 on;
4337
quic_gso on;

docker/webserver/nginx_templates/letsencrypt.conf.template

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# If certificate has OCSP, enable the ssl_stapling
2+
#ssl_stapling on;
3+
#ssl_stapling_verify on;
4+
ssl_protocols TLSv1.2 TLSv1.3;
5+
ssl_ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256;
6+
ssl_ecdh_curve SecP384r1MLKEM1024:X25519MLKEM768:SecP256r1MLKEM768:secp521r1:brainpoolP512r1:x448:brainpoolP384r1:secp384r1:x25519:secp256r1:brainpoolP256r1;
7+
ssl_certificate /etc/letsencrypt/live/${INTERNETNL_DOMAINNAME}/fullchain.pem;
8+
ssl_certificate_key /etc/letsencrypt/live/${INTERNETNL_DOMAINNAME}/privkey.pem;

integration_tests/batch/test_batch.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_batch_openapi(page):
6464
expect(response).to_be_ok()
6565

6666

67-
def test_batch_request(unique_id, register_test_user, test_domain):
67+
def test_batch_request(unique_id, register_test_user, test_domain, docker_compose_exec):
6868
"""A test via the Batch API should succeed."""
6969
request_data = {"type": "web", "domains": [test_domain], "name": unique_id}
7070

@@ -129,6 +129,24 @@ def test_batch_request(unique_id, register_test_user, test_domain):
129129
response = requests.get(report_url, verify=False)
130130
assert response.status_code == 200, "test results should be publicly accessible without authentication"
131131

132+
# delete result files (this can happen in production when cleanup is done by a cron job)
133+
docker_compose_exec("app", "sh -c 'rm -v /app/batch_results/*'")
134+
135+
# try to get batch results again after files have been deleted (this should trigger a new generation task)
136+
results_response = requests.get(INTERNETNL_API + "requests/" + test_id + "/results", auth=auth, verify=False)
137+
# expect error because result need to be generated again
138+
assert results_response.status_code == 400
139+
assert "Report is being generated." in results_response.text
140+
141+
# wait for report generation and batch to be done
142+
wait_for_request_status(INTERNETNL_API + "requests/" + test_id, "done", timeout=60, auth=auth)
143+
144+
# get batch results again after starting generation
145+
results_response = requests.get(INTERNETNL_API + "requests/" + test_id + "/results", auth=auth, verify=False)
146+
print(f"{results_response.text=}")
147+
results_response.raise_for_status()
148+
print("api results JSON:", results_response.text)
149+
132150

133151
def test_batch_static_requires_no_auth():
134152
"""Static files should be available without authentication for viewing batch results."""

integration_tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ def register_test_user(unique_id):
187187

188188
# reload nginx
189189
command = (
190-
f'docker compose --ansi=never --project-name "{COMPOSE_PROJECT_NAME}"'
191-
" exec webserver service nginx reload"
190+
f'docker compose --ansi=never --project-name "{COMPOSE_PROJECT_NAME}"' " exec webserver nginx -s reload"
192191
)
193192
subprocess.check_call(command, shell=True, universal_newlines=True)
194193

0 commit comments

Comments
 (0)