背景
裸金属云环境,增加可信计算功能,使用了Host/BMC通信独立通道。裸金属场景作为业务面与管理面隔离的场景,需要保证带内外的通道隔离,防止Host侧基于此通道,发送管理命令来攻击并控制BMC。需要BMC支持通道使用黑白名单的方式控制数据流量, 仅处理Host侧过来的可信计算业务数据,丢弃其他访问数据
关联ISSUE
整体方案
评审点
新增Redfish属性以及资源协助接口属性,增强裸金属场景带内外通道数据保护能力
详细描述
评审点1:/redfish/v1/Managers/{manager_id}/SmsService 资源新增属性
资源URI:/redfish/v1/Managers/{manager_id}/SmsService
资源版本:hwsmsservice.v1_0_0.json
属性列表:
注1 :列表内属性默认均支持GET 操作。
注2: 若属性在Schema中未显式定义 readonly 关键字,则默认为只读 。
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| VethFirewall | Object | 带内Host与BMC间存在的Veth虚拟网卡防火墙配置策略 | |||||
| Mode | String | Host可以对BMC的Veth网卡通信模式,枚举值:WhiteList / BlackList WhiteList:仅允许WhiteListPorts中配置的端口访问 BlackList:允许不在BlackListPorts中配置的端口访问 |
false | 否 | 是 | 读:ReadOnly 写:SecurityMgmt |
用于设置Veth通道访问模式配置,默认为黑名单,且端口为空,表示默认放行所有veth端口的通信数据 |
| WhiteListPorts | array(元素类型:integer) | 举例:[22,80,443]端口号的列表,取值范围1~65535,最多50个元素 为空时,所有端口禁止访问 |
false | 否 | 是 | 读:ReadOnly 写:SecurityMgmt |
用于设置Veth通道端口的白名单策略下,Host允许访问的BMC端口 |
| BlackListPorts | array(元素类型:integer) | 举例:[22,80,443]端口号的列表,取值范围1~65535,最多50个元素 为空时,所有端口均可访问 |
false | 否 | 是 | 读:ReadOnly 写:SecurityMgmt |
用于设置Veth通道端口的黑名单策略下,Host禁止访问的BMC端口 |
配置样例:
{
"VethFirewall": {
"Mode": "WhiteList",
"WhiteListPorts": [22, 23, 443],
"BlackListPorts": []
}
}
Schema定义:
{
"VethFirewall": {
"type": "object",
"properties": {
"Mode": {
"type": "string",
"enum": [
"WhiteList",
"BlackList"
],
"readonly": false,
"description": "The mode of the veth channel firewall."
},
"WhiteListPorts": {
"type": "array",
"items": {
"type": "integer"
},
"readonly": false,
"description": "List of whitelist ports for the veth."
},
"BlackListPorts": {
"type": "array",
"items": {
"type": "integer"
},
"readonly": false,
"description": "List of blacklist ports for the veth."
}
},
"additionalProperties": false,
"description": "Veth channel firewall config.",
"longDescription": "Veth channel firewall config."
}
}
可信计算通道加固配置示例:
裸金属场景,保证带内与BMC隔离,且同时需要保证可信计算通信能力:
-
IPMI的BT通道使用白名单配置加固
-
带内网管工具的防护使用如下Redfish设置:
SecurityService下设置:
"IPMIChannelAccess": {
"SMSAccessRole": "NoAccess"
}
SmsService下设置:
"CdevChannelEnabled": false
"ChannelType": "PCIe-Veth"
"VethDriverEnabled": true
"VethFirewall":
{
"Mode": "WhiteList",
"WhiteListPorts": [6666]
}
评审结论
同意在 redfish接口/redfish/v1/Managers/{manager_id}/SmsService 下新增属性 VethFirewall(Object类型)及其子属性 Mode、WhiteListPorts、BlackListPorts,用于通过黑白名单的方式控制数据流量,其中Mode为String类型,表示防火墙模式;WhiteListPorts和BlackListPorts均为array类型(元素为integer类型),表示白名单策略下允许访问的端口号和黑名单策略下禁止访问的端口号。
遗留问题
1、HostCdevAllowedChannels增加枚举值定义,string类型,取值 TPCM、ALL、NONE
结论:经评估,该字段被IPMIChannelAccess功能覆盖,不需要增加