mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-12 20:19:51 +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:
@@ -18,6 +18,7 @@ use crate::ai_serving::{
|
||||
};
|
||||
use crate::control::GatewayControlDecision;
|
||||
use crate::orchestration::release_pool_key_lease_from_report_context;
|
||||
use crate::plan_usage_policy::PlanUsagePolicySnapshot;
|
||||
use crate::{AppState, GatewayError};
|
||||
|
||||
/// Owns a selected pool-key lease until the attempt lifecycle has taken over
|
||||
@@ -149,6 +150,7 @@ pub(super) async fn begin_responses_websocket_turn_with_planned_lease(
|
||||
control_decision: &GatewayControlDecision,
|
||||
decision: AiExecutionDecision,
|
||||
client_event: &Value,
|
||||
plan_usage_policy_snapshot: Option<PlanUsagePolicySnapshot>,
|
||||
mut planned_lease: PlannedPoolKeyLeaseGuard,
|
||||
) -> Result<ActiveProviderAttempt, GatewayError> {
|
||||
let state = state.clone();
|
||||
@@ -163,6 +165,7 @@ pub(super) async fn begin_responses_websocket_turn_with_planned_lease(
|
||||
&control_decision,
|
||||
decision,
|
||||
&client_event,
|
||||
plan_usage_policy_snapshot,
|
||||
)
|
||||
.await?;
|
||||
// ActiveProviderAttempt now owns the report context containing the
|
||||
|
||||
Reference in New Issue
Block a user