1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! The `http-01` responder: serving the challenge file an *upstream* CA
//! fetches, when the `relay` signer backend is proving domain control to
//! it over HTTP.
//!
//! This is the only route in the server that is not an ACME resource and not a
//! health probe, and it is the inverse of everything else here: the rest of
//! `handlers/` answers clients asking *this* server for certificates, while
//! this one answers the CA *this* server is asking for one. See
//! [`crate::signer::relay::http01`] for why the key authorization can only
//! come from this server and not from the original client.
use Arc;
use ;
use ;
use ;
use debug;
use crateHttp01TokenStore;
/// The stores `GET /.well-known/acme-challenge/{token}` answers from.
///
/// A `Vec` rather than one store because two profiles may relay to two
/// different upstreams and so carry two backends; see
/// `crate::http01_stores`, which builds it.
;
/// Serves the key authorization the upstream CA is about to fetch
/// (RFC 8555 §8.3).
///
/// Mounted on the **root** router, outside every profile — so it is
/// unauthenticated and unfiltered, mints no `Replay-Nonce` and carries no
/// `Link: rel="index"`, exactly like `GET /health`. That is correct rather than
/// an oversight: the fetcher is a CA that holds no account here, and the path
/// is fixed by the RFC rather than by this server's URL namespace.
///
/// Deliberately ignores `Host`. The request arrives through whatever forwarder
/// or redirect the operator put in front of it, so its authority is not
/// something this server can predict — and §8.3 makes the token, not the name,
/// the secret.
pub async