mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 19:59:50 +08:00
feat(security): harden gateway boundaries and usage policies
Consolidate subscription usage policy enforcement, privacy-safe persistence, and gateway security hardening into one reviewable change. Includes bounded HTTP and execution envelopes, header and protocol guards, DNS and relay validation, authentication and secret projection hardening, secure backup/install paths, and regression coverage.
This commit is contained in:
@@ -283,4 +283,28 @@ mod tests {
|
||||
// 投递失败不是供应商的错误,摘要不该因此补 parser_error。
|
||||
assert_eq!(facts.forced_error(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plan_permit_loss_is_gateway_cancellation_not_provider_failure() {
|
||||
let facts = attempt_facts_for_outcome(
|
||||
None,
|
||||
AttemptClientDelivery::Complete,
|
||||
ResponsesWebSocketTurnOutcome::connection_admission_lost(),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
facts.provider,
|
||||
aborted(
|
||||
499,
|
||||
"gateway WebSocket connection admission became unhealthy"
|
||||
)
|
||||
);
|
||||
assert_eq!(
|
||||
facts.delivery,
|
||||
AttemptClientDelivery::Aborted {
|
||||
reason: "gateway WebSocket connection admission became unhealthy"
|
||||
}
|
||||
);
|
||||
assert_eq!(facts.forced_error(), None);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user