【已评审】新增资源协作接口和redfish Oem接口以支持校验Bios密码

背景

现网进行客户定制时可能设置密码等敏感信息,设置完成后需要校验敏感信息是否与之前设置的一致

关联ISSUE

支持校验BIOS密码

整体方案

Bios对象新增资源协作接口校验Bios密码,新增Redfish接口调用对应的资源协作接口以支持校验Bios密码。

评审点

评审点1: 新增Bios资源协作接口校验Bios密码

评审点2: 新增Redfish Oem接口支持校验Bios密码

详细描述

评审点1 : 变更资源协作接口bmc.kepler.Systems.Bios

变更描述 :用于校验Bios密码
接口链接bmc.kepler.Systems.Bios

变更方法

变更类型 方法名称 请求签名 请求参数描述 响应签名 响应参数描述 方法描述 访问权限 变更影响
新增 VerifyPassword ss Param1: 表示用户密码类型,例如AdminPassword(BIOS管理员密码)、UserPassword(BIOS普通用户密码),Param2: 表示待验证密码 / / 校验Bios密码 UserMgmt 新增方法,无影响

评审点2 : 新增OEM Action资源 VerifyPassword用于校验Bios密码

资源URI:/redfish/v1/Systems/{SystemId}/Bios/Actions/Oem/{OemIdentifier}/Bios.VerifyPassword
资源版本#Bios.v1_2_3.Bios
操作权限:UserMgmt
输入参数

参数名 类型 必填 示例/取值约束 描述
PasswordName string 示例:AdminPassword(BIOS管理员密码)、UserPassword(BIOS普通用户密码) 校验对应用户密码
Password string \ 待校验的Bios密码
SessionAccountPassword string \ 当前会话用户密码

ActionInfo: /redfish/v1/Systems/{SystemId}/Bios/VerifyPasswordActionInfo

{
    "@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
    "@odata.id": "/redfish/v1/Systems/{SystemId}/Bios/VerifyPasswordActionInfo",
    "@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
    "Id": "VerifyPasswordActionInfo",
    "Name": "Verify Password Action Info",
    "Parameters": [
        {
            "Name": "PasswordName",
            "Required": true,
            "DataType": "String"
        },
        {
            "Name": "Password",
            "Required": true,
            "DataType": "String",
            "Sensitive": true
        },
        {
            "Name": "SessionAccountPassword",
            "Required": true,
            "DataType": "String",
            "Sensitive": true
        }
    ]
}

校验成功响应体

{
    "error": {
        "code": "Base.1.0.GeneralError",
        "message": "A general error has occurred. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#Message.v1_0_0.Message",
                "MessageId": "iBMC.1.0.VerifyPasswordSuccess",
                "RelatedProperties": [
                       ""#/Bios.VerifyPassword"
                 ],
                "Message": "Password Verify successfully",
                "MessageArgs": [],
                "Severity": "OK",
                "Resolution": "None"
            }
        ]
    }
} 

新增校验密码不一致响应体

{
    "error": {
        "code": "Base.1.0.GeneralError",
        "message": "A general error has occurred. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#Message.v1_0_0.Message",
                "MessageId": “iBMC.1.0.PasswordVerifyFailed",
                "RelatedProperties": [],
                "Message": "Failed to verify the password.",
                "MessageArgs": [],
                "Severity": "Critical",
                "Resolution":  "Try again using a correct password."
            }
        ]
    }
}

Schema定义


{
    "definitions": {
        "VerifyPassword": {
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "type": [
                        "array",
                        "boolean",
                        "number",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "type": "object",
            "parameters": {
                "PasswordName": {
                    "requiredParameter": true,
                    "type": "string"
                },
                "Password": {
                    "requiredParameter": true,
                    "type": "string"
                },
                "SessionAccountPassword":{
                    "requiredParameter": true,
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "properties": {
                "title": {
                    "type": "string",
                    "description": "Friendly action name"
                },
                "target": {
                    "type": "string",
                    "format": "uri",
                    "description": "Link to invoke action"
                },
                "@Redfish.ActionInfo": {
                    "description": "The term can be applied to an action to specify a URI to an ActionInfo resource that describes the parameters supported by this instance of the action.",
                    "type": "string",
                    "format": "uri-reference",
                    "readonly": true
                }
            },
            "description": "This action is used to verify Bios password.",
            "longDescription": "This action is used to verify Bios password."

        },
        "{{OemIdentifier}}Actions": {
            "type": "object",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "type": [
                        "array",
                        "boolean",
                        "number",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "additionalProperties": false,
            "properties": {
                "#Bios.VerifyPassword": {
                    "$ref": "#/definitions/VerifyPassword"
                }
            },
            "readonly": true
        }
    }
}

Bios下新增OEM接口
URI: /redfish/v1/Systems/{SystemId}/Bios
操作类型:GET
响应:

{    
    "@odata.context": "/redfish/v1/$metadata#Bios.Bios",
    "Id": "Bios",
    "Actions": {
        "Oem": {
            "Huawei": {
                "#Bios.VerifyPassword": {
                    "target": "/redfish/v1/Systems/{SystemId}/Bios/Actions/Oem/{OemIdentifier}/Bios.VerifyPassword",
                    "@Redfish.ActionInfo": "/redfish/v1/Systems/{SystemId}/Bios/VerifyPasswordActionInfo“
                }
            }
        }
    }
}

是否准备好AI预审

评审结论

1、同意新增Bios资源协作接口校验Bios密码

变更类型 方法名称 请求签名 请求参数描述 响应签名 响应参数描述 方法描述 访问权限 变更影响
新增 VerifyPassword ss Param1: 表示用户密码类型,例如AdminPassword(BIOS管理员密码)、UserPassword(BIOS普通用户密码),Param2: 表示待验证密码 / / 校验Bios密码 UserMgmt 新增方法,无影响

2、同意新增Redfish Oem接口支持校验Bios密码
资源URI:/redfish/v1/Systems/{SystemId}/Bios/Actions/Oem/{OemIdentifier}/Bios.VerifyPassword
资源版本#Bios.v1_2_3.Bios
操作权限:UserMgmt
输入参数

参数名 类型 必填 示例/取值约束 描述
PasswordName string 示例:AdminPassword(BIOS管理员密码)、UserPassword(BIOS普通用户密码) 校验对应用户密码
Password string \ 待校验的Bios密码
SessionAccountPassword string \ 当前会话用户密码

遗留问题

1、错误引擎、接口风格与议题保持一致:【待评审】redfish接口支持支持用户或VNC密码校验
已闭环,和议题使用相同的错误引擎、接口风格

2、文档说明防撞库攻击机制
已闭环,在详设中说明防撞库攻击机制

预审答案内容由AI生成,仅供参考:

帖子评审结论:【待评审】新增资源协作接口和redfish Oem接口以支持校验Bios密码

帖子相关性:相关(MDB 相关: 标题含强特征: 资源协作)

  • 总评审点数:2
  • MDB 资源协作接口评审点:1
  • Redfish 相关评审点:1
  • 其他评审点:0

总体结果:通过(2/2 个评审点通过)

评审点 1:新增Bios资源协作接口校验Bios密码【MDB】

结果:通过

  • 规则合规性检查:通过(26 项检查全部通过)
    • 警告项(建议性)
      规则ID:MDB-RISK-004
      级别:建议性
      问题描述:方法 VerifyPassword 涉及 BIOS 密码凭据校验,属于强触发安全场景,但未说明审计日志记录策略及防暴力破解等风险控制措施。
      处理建议:severity=‘should’ 建议性规则,建议修改以提升规范符合性

评审点 2:新增Redfish Oem接口支持校验Bios密码【Redfish】

结果:通过

  • URI 示例生成:通过
  • Schema 验证:通过(4 项通过,1 项警告)
    • Schema 来源:DMTF ✓,OEM ✗(实际参与校验:DMTF)
    • 入口 schema 文件:dmtf/Bios.v1_2_3.json(DMTF 官方 schema(SchemaFiles/dmtf))
    • Schema 依据:静态校验直接依据:DMTF 官方 schema(SchemaFiles/dmtf)(dmtf/Bios.v1_2_3.json)
  • 规则合规性检查:通过(18 项检查全部通过)