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:
elky
2026-09-04 03:45:52 +08:00
parent ddcbeb3ae9
commit 579f2c7cc1
1019 changed files with 190437 additions and 26080 deletions
+9 -1
View File
@@ -6,6 +6,8 @@ mod app;
mod bootstrap_admin;
mod cache;
mod catalog;
mod catalog_credentials;
mod catalog_proxy;
mod core;
mod cors;
mod integrations;
@@ -23,7 +25,8 @@ pub(crate) use self::admin_types::{
AdminBillingPresetApplyResult, AdminBillingRuleRecord, AdminBillingRuleWriteInput,
AdminPaymentCallbackRecord, AdminSecurityBlacklistEntry, AdminWalletPaymentOrderRecord,
AdminWalletRefundRecord, AdminWalletTransactionRecord, BillingPlanRecord,
BillingPlanWriteInput, PaymentGatewayConfigRecord, PaymentGatewayConfigWriteInput,
BillingPlanWriteInput, PaymentGatewayConfigCasWriteInput, PaymentGatewayConfigRecord,
PaymentGatewayConfigWriteInput, PaymentGatewaySecretCasUpdate,
UserDailyQuotaAvailabilityRecord, UserPlanEntitlementRecord,
};
pub use self::app::AppState;
@@ -42,10 +45,15 @@ pub(crate) use self::oauth::{
provider_transport_context_allows_credential_rotation, AgentIdentityAuthConfigFence,
CodexRuntimeOAuthObservation, ProviderTransportCredentialFence,
};
pub(crate) use self::proxy::{
decrypt_or_migrate_proxy_tunnel_psk, decrypt_or_migrate_proxy_tunnel_psk_binding,
unavailable_proxy_snapshot,
};
pub(crate) use self::types::{
AdminWalletMutationOutcome, GatewayAdminPaymentCallbackView, GatewayUserPreferenceView,
GatewayUserSessionView, LocalExecutionRuntimeMissDiagnostic, LocalMutationOutcome,
LocalProviderDeleteTaskState,
};
pub(crate) use self::video::VideoTaskRouteAccess;
use super::provider_transport::provider_transport_snapshot_looks_refreshed;
pub(crate) use super::provider_transport::ProviderTransportSnapshotCacheKey;