跳到主要内容

aidy.v2.plugin.egress_policy

Messages

message EgressPolicy

message EgressPolicy {
string id = 1;
string name = 2;
int32 priority = 3;
bool enabled = 4;
repeated EgressPolicyMatch matches = 5;
EgressPolicyAction action = 6;
}

message EgressPolicyAction

message EgressPolicyAction {
string type = 1;
int32 status_code = 2;
string message = 3;
}

message EgressPolicyLog

请求日志中的 egress_policy 扩展字段。

message EgressPolicyLog {
// 本次请求的生效动作:pass / block / bypass。
// bypass 表示 CyberGuard 不可用或未拿到有效结果,直接放行。
string effect_action = 1;
// 命中的策略 ID;未命中任何策略时为空。
string matched_policy_id = 2;
// CyberGuard 返回的 status:safe / unsafe;bypass 时为空。
string guard_status = 3;
// CyberGuard 返回的 action:pass / alert / block / override;bypass 时为空。
string guard_action = 4;
}

message EgressPolicyMatch

message EgressPolicyMatch {
string source = 1;
string key = 2;
string operator = 3;
string value = 4;
repeated string values = 5;
}

message EgressPolicyPluginConfig

message EgressPolicyPluginConfig {
string check_service_url = 1;
int64 timeout_ms = 2;
string policy_chain_json = 3;
repeated EgressPolicy policies = 4;
}