[tests] Tests first, fix round 1: proof only on the forward-auth UI host, revocations that cannot be written, root key files by content, intermediates that cannot issue, stale SNI after a failed or resumed handshake, edge re-reads the allow list, changes apply while Caddy serves, Hostname focus (red)

This commit is contained in:
2026-11-08 10:26:31 +01:00
parent e2a777882c
commit 0749119f19
6 changed files with 690 additions and 11 deletions
+28
View File
@@ -236,4 +236,32 @@ mod unix {
e.stderr()
);
}
/// QC M2: a revocation must not depend on control's nudge reaching edge. Edge re-reads the
/// allow list by itself (like the share deny list), within 5 s.
#[tokio::test(flavor = "multi_thread")]
async fn edge_rereads_the_allow_list_by_itself() {
let echo = Echo::start("app").await;
let p = pki();
let (phone, phone_pem) = device(&p, "phone");
let edge = setup(&echo, &p, &[&phone_pem]).await;
let req = Req::get("locked.test", "/");
let r =
client::https_with_cert(edge.https, "locked.test", edge.roots(), &phone, &req).await;
assert_eq!(r.unwrap().status, 200);
std::fs::write(edge.dir.join("certs/domi-devices.pem"), "").unwrap();
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(8);
loop {
let r = client::https_with_cert(edge.https, "locked.test", edge.roots(), &phone, &req)
.await;
if r.is_err() {
break;
}
assert!(
std::time::Instant::now() < deadline,
"edge still accepts a revoked device"
);
tokio::time::sleep(std::time::Duration::from_millis(250)).await;
}
}
}