mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 02:47:45 +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:
@@ -1163,7 +1163,8 @@ fn admin_provider_write_uses_specific_local_owners() {
|
||||
"crate::handlers::admin::provider::write::normalize::{",
|
||||
"normalize_auth_type,",
|
||||
"validate_vertex_api_formats,",
|
||||
"encrypt_catalog_secret_with_fallbacks, json_string_list,",
|
||||
".seal_provider_catalog_key_api_key(",
|
||||
".seal_provider_catalog_key_auth_config(",
|
||||
"normalize_json_object, normalize_string_list,",
|
||||
] {
|
||||
assert!(
|
||||
@@ -1243,7 +1244,6 @@ fn admin_provider_ops_providers_mod_stays_thin() {
|
||||
"apps/aether-gateway/src/handlers/admin/provider/ops/providers/support.rs",
|
||||
);
|
||||
for pattern in [
|
||||
"pub(super) const ADMIN_PROVIDER_OPS_SENSITIVE_FIELDS:",
|
||||
"pub(super) const ADMIN_PROVIDER_OPS_CONNECT_RUST_ONLY_MESSAGE:",
|
||||
"pub(super) const ADMIN_PROVIDER_OPS_ACTION_RUST_ONLY_MESSAGE:",
|
||||
"pub(super) const ADMIN_PROVIDER_OPS_VERIFY_RUST_ONLY_MESSAGE:",
|
||||
@@ -1257,6 +1257,30 @@ fn admin_provider_ops_providers_mod_stays_thin() {
|
||||
"handlers/admin/provider/ops/providers/support.rs should own {pattern}"
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
!providers_support.contains("ADMIN_PROVIDER_OPS_SENSITIVE_FIELDS"),
|
||||
"provider ops support should not duplicate the shared credential sensitivity policy"
|
||||
);
|
||||
|
||||
let provider_ops_credentials =
|
||||
read_workspace_file("apps/aether-gateway/src/handlers/shared/provider_ops_credential.rs");
|
||||
for pattern in [
|
||||
"pub(crate) const PROVIDER_OPS_PERSISTENT_SECRET_FIELDS:",
|
||||
"pub(crate) const PROVIDER_OPS_TRANSIENT_SECRET_FIELDS:",
|
||||
"pub(crate) fn provider_ops_credential_field_is_secret(",
|
||||
] {
|
||||
assert!(
|
||||
provider_ops_credentials.contains(pattern),
|
||||
"handlers/shared/provider_ops_credential.rs should own provider credential sensitivity policy {pattern}"
|
||||
);
|
||||
}
|
||||
let providers_config = read_workspace_file(
|
||||
"apps/aether-gateway/src/handlers/admin/provider/ops/providers/config.rs",
|
||||
);
|
||||
assert!(
|
||||
providers_config.contains("provider_ops_credential_field_is_secret"),
|
||||
"provider ops config should consume the shared credential sensitivity policy"
|
||||
);
|
||||
|
||||
for path in [
|
||||
"apps/aether-gateway/src/maintenance/runtime.rs",
|
||||
|
||||
Reference in New Issue
Block a user