[control] Fix round 1: changes apply while Caddy serves (admin socket, watch through Caddy), revocations that fail are errors and catch up, proof only on the forward-auth UI host, root keys found by content, intermediates checked before install, stale SNI cleared before each handshake

This commit is contained in:
2026-11-08 10:49:31 +01:00
parent 0749119f19
commit e84eb1ba74
36 changed files with 934 additions and 131 deletions
+7
View File
@@ -97,6 +97,9 @@ pub struct HostRt {
pub response_ops: Vec<Op>,
/// Values of the secrets this host injects; a response header containing one is dropped.
pub secret_values: Vec<Vec<u8>>,
/// The host sends control's UI proof upstream: whatever the client says about who it is
/// (Remote-*) or about the proof is dropped first, with or without forward-auth.
pub sends_proof: bool,
}
pub struct ForwardAuthRt {
@@ -378,6 +381,9 @@ pub fn build(cfg: EdgeConfig, credentials_dir: Option<&Path>) -> Result<Runtime,
let mut secret_values = Vec::new();
let request_ops = ops(&h.request_headers, &secrets, &mut secret_values)?;
let response_ops = ops(&h.response_headers, &secrets, &mut secret_values)?;
let sends_proof = h.request_headers.iter().any(|op| {
matches!(op, EdgeHeaderOp::Set { value: EdgeValue::Secret { name }, .. } if name == ianitor_core::UI_PROOF_SECRET)
});
let upstreams = h
.upstreams
.iter()
@@ -398,6 +404,7 @@ pub fn build(cfg: EdgeConfig, credentials_dir: Option<&Path>) -> Result<Runtime,
request_ops,
response_ops,
secret_values,
sends_proof,
}),
);
}