559e59ae7b
【修改说明 Modification】AIDR Protobuf初始版本提交。 【修改人 Modifier】qiaonaiqiang 00505699 【评审人 Reviewer】micro 00184944
84 lines
2.7 KiB
Protocol Buffer
84 lines
2.7 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
package AIAgentIdentify;
|
||
|
||
|
||
// AI Agent识别粒度:NAC用户名+终端AI Agent类别,AIDR-CLI 尽力而为,提供终端+AI Agent类型
|
||
// 不支持版本信息,例如, Claude Code v1.1和Claude Code v1.2 agent name均为Claude Code
|
||
// 不支持多实例信息,例如,不同的安装位置,不同的进程等
|
||
message AIAgentKey {
|
||
string device_id = 1; // key字段,参考 HuaweiSdpGrpc.proto::IamSdpMessageHeader::device_id
|
||
//
|
||
//
|
||
//
|
||
//
|
||
//
|
||
|
||
string agent_name = 2; // Key字段,Agent的名字或类别,典型的例如 Claude Code
|
||
// 安全产品R26.1对应的变量名称时name,Agent Nac中命名为Agent Type
|
||
}
|
||
|
||
message AIAgent {
|
||
AIAgentKey Key = 1; // Key字段
|
||
string host_name = 2; // windows on pc参考: Windows主机名 DESKTOP-PRNHF35.china.huawei.com还是DESKTOP-PRNHF35?
|
||
//
|
||
//
|
||
//
|
||
string user_name_os = 3; // os用户名;
|
||
//
|
||
//
|
||
//
|
||
|
||
string IP = 4; // 属性字段 ip地址
|
||
string MAC = 5; // 属性字段 MAC地址
|
||
//
|
||
optional string user_name_iam = 6; // IAM使用的用户名
|
||
optional string iam_token = 7; // IAM使用的用户名
|
||
|
||
optional string user_name_nac = 8; // 终端协议认证使用的用户名
|
||
//
|
||
//
|
||
//
|
||
//
|
||
optional string nac_token = 9; // IAM使用的用户名
|
||
}
|
||
|
||
// 单个AI Agent同步操作(新增、删除、更新),请求消息结构
|
||
message AIAgentSyncReq {
|
||
// 操作类型枚举:新增/删除/更新
|
||
enum AIAgentSyncOpType {
|
||
OPERATE_UNKNOWN = 0;
|
||
OPERATE_ADD = 1; // 添加 AI Agent
|
||
OPERATE_DELETE = 2; // 删除 AI Agent
|
||
OPERATE_UPDATE = 3; // 更新 AI Agent相关信息
|
||
}
|
||
AIAgentSyncOpType op_type = 1;
|
||
AIAgent agent_info = 2;
|
||
optional string agent_id = 3; // Agent身份化的ID。
|
||
}
|
||
|
||
// 操作返回操作
|
||
message AIAgentSyncRsp {
|
||
int32 code = 1; // 0成功,非0错误码
|
||
string msg = 2; // 提示成功
|
||
AIAgentKey key = 3; // Key字段
|
||
int32 agent_type_id = 4; // Agent对应的TypeID
|
||
}
|
||
|
||
//批量AI Agent同步操作(新增/删除/更新),请求消息结构
|
||
message AIAgentSyncReqBatch{
|
||
repeated AIAgentSyncReq req = 1;
|
||
}
|
||
|
||
//批量操作返回
|
||
message AIAgentSyncRspBatch {
|
||
repeated AIAgentSyncRsp rsp = 1; // 每一条AI Agent对应的结果
|
||
}
|
||
|
||
//AI Agent同步服务,AIDR-CLI ---> AAM同步AI Agent信息。
|
||
service AIAgentSyncService {
|
||
// 单个新增/删除
|
||
rpc AIAgentSyncOper(AIAgentSyncReq)returns(AIAgentSyncRsp);
|
||
// 批量操作
|
||
rpc AIAgentSyncOperBatch(AIAgentSyncReqBatch)returns(AIAgentSyncRspBatch);
|
||
} |