Commit f2940ab
authored
fix: address multi-dimensional review findings (nginx routing, hardening, CI) (#7)
* fix(nginx): stop blocking GLPI's legacy .php URLs (apirest.php, front/*, ajax/*)
The blanket `location ~ \.php$ { deny all; }` matched /apirest.php, /front/central.php,
/ajax/*.php etc. before try_files could route them through public/index.php — so the
REST API and the entire post-login UI returned 403 (the login page at / worked, which
is why the original smoke test missed it). Removed the block; GLPI 11 routes everything
through index.php and execution stays confined to it (the ^/index\.php$ location is the
only fastcgi pass). Verified: /apirest.php 403->400, /front/central.php 403->302.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
* fix(compose): decouple health from scheduler, cap_drop all services, socket-proxy
- app healthcheck is now php-fpm /ping only (was gated on a scheduler-touched cron
heartbeat, so a dead scheduler made app unhealthy and blocked web from starting);
dropped the now-unused glpi-heartbeat job.
- cap_drop: ALL on db, valkey, scheduler, backup, app-assets, socket-proxy (only app+web
had it) with minimal re-adds; verified every service still starts healthy.
- ofelia no longer mounts the raw host docker socket (== host root): a least-privilege
docker-socket-proxy (CONTAINERS+EXEC+POST only, healthchecked) sits in front; ofelia
reaches it over the internal network. Pinned ofelia by digest.
- forward GLPI_DEFAULT_LANGUAGE + SESSION_COOKIE_SECURE; add scheduler TZ; fix the
mem_limit/pm.max_children sizing comment.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
* fix(image): cache-marker hash, session-cookie toggle, pm sizing, version tracking
- entrypoint stores a SHA-256 of the cache DSN (not the cleartext DSN, which may carry a
Redis password) and no longer logs the raw DSN; writes a session.cookie_secure drop-in
from SESSION_COOKIE_SECURE so HTTPS deploys get the Secure flag.
- pm.max_children 25->10 to actually fit the 1.5g app cgroup; comment explains the math.
- docker-bake.hcl derives MINOR/MAJOR from GLPI_VERSION (no drift); dev target uses a
neutral cache so it builds locally. Renovate now tracks the base images (PHP/Alpine)
and the bake GLPI version too.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
* fix(ci+docs): manifest-aware GHCR cleanup, release make_latest, dedupe bots, dev override
- cleanup-packages: switch to dataaxiom/ghcr-cleanup-action — actions/delete-package-versions
is not manifest-list aware and could delete a live image's per-arch children or
cosign/SLSA referrers (the failure mode that bricked ghcr's phpbu-docker).
- release.yml: only the newest semver release moves the 'Latest' badge (make_latest gate).
- remove dependabot.yml — Renovate already manages actions + docker + versions (no dup PRs).
- compose.override.yml.example: GLPI_ENVIRONMENT_TYPE=development (GLPI has no APP_DEBUG),
loopback-bind db/valkey; caddy overlay logging; .env redis-auth note; README/Makefile
console + lint + backup-profile fixes.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
* ci(smoke-test): assert GLPI legacy .php entry points route (regression guard)
The serve check only hits / (the login page), which stayed 200 even while a blanket
nginx .php deny 403'd /apirest.php and /front/*.php. Add an explicit check that those
entry points are not forbidden so the nginx-routing regression can't recur.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
---------
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>1 parent 1b7d1a5 commit f2940ab
17 files changed
Lines changed: 271 additions & 135 deletions
File tree
- .github
- workflows
- config/nginx/conf.d
- examples
- rootfs/usr/local
- bin
- etc
- php-fpm.d
- php/conf.d
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
52 | | - | |
| 60 | + | |
53 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| 90 | + | |
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
| |||
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
144 | 160 | | |
145 | 161 | | |
146 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
134 | 154 | | |
135 | 155 | | |
136 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | | - | |
| 33 | + | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | | - | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
| 66 | + | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
0 commit comments