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
//! Inbound XRPC gateway (§F23 inbound surface, v1.7).
//!
//! Operator-config-gated HTTP listener for inbound moderation
//! traffic. v1.7 ships the structural foundation (#91 — config +
//! router skeleton + 501 catch-all) and defers auth (#93), replay
//! cache (#94), and per-NSID handlers (#95-#98) to subsequent
//! issues:
//!
//! - **#91 ([`config`], [`router`])** — `[xrpc_gateway]` config
//! block + router skeleton mounting at `/xrpc/<nsid>` and
//! returning 501 `MethodNotImplemented` for every NSID.
//! - **#92** — NSID allowlist enum (the four
//! `tools.ozone.moderation.*` shapes from §A6 plus
//! `com.atproto.moderation.createReport`); unrecognized NSIDs
//! keep returning 501 with the same envelope shape.
//! - **#93** — `XrpcAuthService`: ATProto service-auth JWT
//! verification per §A8. Uses cairn-mod's existing DID resolver
//! (extending it for service DIDs).
//! - **#94** — replay cache (in-memory, 90s window, jti dedupe)
//! + `xrpc_known_callers` / `xrpc_trusted_pdses` tables.
//! - **#95-#98** — per-NSID handler bodies. `emitEvent` lands
//! first since it exercises the full inbound→recordAction
//! integration (§A14).
//!
//! See `.design-notes/v1_7-architectural-decisions.md` §A6 / §A7
//! / §A8 / §A14 for the inbound-direction architecture rationale.
/// Shared test fixtures for the xrpc_gateway module's auth +
/// middleware tests. `pub(crate)` so the router's integration
/// tests can construct valid JWTs and an [`auth::XrpcAuthService`]
/// with a deterministic clock without duplicating the key /
/// resolver / JWT-builder boilerplate from
/// [`auth::tests`].
pub
pub use ;
pub use ;
pub use ;
pub use XrpcGatewayState;
pub use XRPC_GATEWAY_DEFAULT_REASON_CODE;
pub use ;
pub use ;
pub use ;
pub use build_router;