Commit 098741c
committed
fix(dstack-ingress): reject tls-alpn-01 wildcards at startup, not per pass
A wildcard under tls-alpn-01 can never succeed -- RFC 8737 forbids the
challenge for wildcard identifiers -- so it is a configuration error, not
a runtime failure. process_domain did reject it, but only once the
certificate loop reached that domain, by which point the container had
generated a placeholder certificate for a name that will never get a real
one, started haproxy serving it, and settled into retrying an
unsatisfiable config every 60s to 1800s forever.
Check it once at the top of tlsalpn.sh, before the startup sequence that
does all of the above. It belongs to tls-alpn-01, not to entrypoint.sh:
that file validates what both modes share and dispatches, and putting a
CHALLENGE_TYPE branch back in it is the mode-specific logic the split was
meant to remove -- HTTP-01 would then add a third.
Deliberately fatal for the container rather than skipping the one domain.
A mixed config did already contain the damage -- the other domains were
issued normally -- but it left a self-signed certificate served for the
wildcard indefinitely and a permanently failing loop, which reads as a
TLS bug rather than a typo.
The per-domain check is gone with it: the domain list comes from env vars
fixed for the container's lifetime, so it saw exactly what the startup
check saw and could not fire. legoman.py keeps its own check, which is a
real boundary -- it guards the ACME call and can be invoked standalone.
dns-01 wildcards are unaffected.1 parent 4d54843 commit 098741c
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
| |||
190 | 210 | | |
191 | 211 | | |
192 | 212 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
198 | 216 | | |
199 | 217 | | |
200 | 218 | | |
| |||
303 | 321 | | |
304 | 322 | | |
305 | 323 | | |
| 324 | + | |
306 | 325 | | |
307 | 326 | | |
308 | 327 | | |
| |||
0 commit comments