Commit 50443e2
committed
test: resolve the challenge through the authoritative nameservers
certbot reads challenge records straight from the zone's authoritative
servers, because a resolver that cached NXDOMAIN moments before the
record was written answers from that cache for the whole wait. It gets
there by asking NS for the zone and then A for each answer -- and the
mock served neither, so `authoritative_resolver` bailed on the first
question of every issuance and fell back to the system resolver.
The fallback is deliberate and issuance still worked, which is exactly
why nothing noticed the path was dead -- including this branch's own
change to it, generalizing the stripped label from `_acme-challenge` to
any challenge prefix, which had only unit coverage.
The mock now answers NS at a zone apex and A for the name it gives.
Only at the apex: a name below it must stay NODATA or the walk up
looking for the zone cut stops in the wrong place, and walking up is
what it does against a real zone. Both are gated on MOCK_CF_NS_ADDR, so
a mock that is not told where it can be reached advertises nothing.
The new assertion reads the mock's own query log, so it observes that
both questions were asked and answered rather than inferring it.1 parent 05f76c1 commit 50443e2
3 files changed
Lines changed: 72 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
386 | 402 | | |
387 | 403 | | |
388 | 404 | | |
| |||
792 | 808 | | |
793 | 809 | | |
794 | 810 | | |
| 811 | + | |
| 812 | + | |
795 | 813 | | |
796 | 814 | | |
797 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
297 | 338 | | |
298 | 339 | | |
299 | 340 | | |
| |||
371 | 412 | | |
372 | 413 | | |
373 | 414 | | |
374 | | - | |
| 415 | + | |
375 | 416 | | |
376 | 417 | | |
377 | 418 | | |
378 | 419 | | |
379 | | - | |
380 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
381 | 425 | | |
382 | 426 | | |
383 | 427 | | |
384 | | - | |
385 | | - | |
| 428 | + | |
386 | 429 | | |
387 | 430 | | |
388 | | - | |
| 431 | + | |
389 | 432 | | |
390 | 433 | | |
391 | 434 | | |
| |||
0 commit comments