背景
基于DICE协议的远程证明能力,BMC侧提供同步接口,支持在一次redfish接口请求中完成DICE的挑战响应过程。
使得远程证明工具能够通过redfish接口发起挑战请求,并从接口响应中直接获取BMC生成的挑战响应。
但当前已实现的DICE接口为创建对应处理任务,并将对应业务内容导出到指定路径的文件,接口仅返回任务ID,无法满足接口直接返回业务内容的诉求
关联ISSUE
暂无
整体方案
- DICE证书导入接口 ImportDiceCertificate 做兼容处理,入参Type新增可选值
- 导出接口(
ExportDiceCSR、ExportDiceCertificateChain、ExportHardwareComponentsCertificateChain)均为原有创建任务导出文件能力,保留原有能力并新增同步请求接口
评审点
- DICE证书导入Redfish接口
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.ImportDiceCertificate入参Type新增可选值 - 新增Redfish接口(生成DICE证书签名请求CSR)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCSR - 新增Redfish接口(生成DICE挑战响应证书链)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCertificates - 新增Redfish接口(生成融合身份认证证书链)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateHardwareComponentsCertificates - 资源协作接口新增方法:①导入DICE的PEM格式证书、②生成DICE证书签名请求CSR、③生成DICE挑战响应证书链、④生成融合身份认证证书链
详细描述
评审点1:变更Redfish接口 - 导入DICE证书接口请求参数Type新增可选值
资源URI: /redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.ImportDiceCertificate
资源版本: openUBMCDiceCert.v1_0_0
操作类型: POST
变化类型: 入参Type新增可选值text,以支持字符串格式证书内容导入
应用场景: DICE证书导入
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现patch | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Type | string | URI, 本地路径或远程路径 text, 字符串格式证书内容 |
否 | 否 | 否 | SecurityMgmt | 导入证书类型 |
| Certificate | string | Type为URI时: 1.证书文件支持后缀为:.der、.crt、.cer、.pem 2.支持导出到本地路径和远程路径(本地路径必须在tmp目录下) 2.1 本地导入:“/tmp/文件名” 2.2 远程导入:“文件传输协议://用户名:密码@ip地址/目录/文件名” 2.3 文件传输协议包括五种:sftp、https、nfs、cifs、scp Type为text时: Certificate传参为pem格式证书的字符串内容 如: Certificate: “-----BEGIN CERTIFICATE-----\nMIIFsTCC [*truncated*] GXG5zljlu\n-----END CERTIFICATE-----” |
否 | 否 | 否 | SecurityMgmt | DICE证书导入时证书内容或证书文件路径 |
评审点2:新增Redfish接口 - 生成DICE证书签名请求CSR
资源URI: /redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCSR
资源版本: openUBMCDiceCert.v1_0_0
操作类型: POST
变化类型: 新增接口
应用场景: 生成并返回DICE证书签名请求CSR的内容
ActionInfo:/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCSR
{
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/Managers/1/SecurityService/DiceCert/GenerateDiceCSR",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Parameters": [],
"Oem": {}
}
Schema:
"GenerateDiceCSR": {
"type": "object",
"actionResponse": {
"$ref": "#/definitions/GenerateDiceCSRResponse"
},
"parameters": {},
"description": "Generate DICE certificate CSR.",
"longDescription": "This action shall generate the DICE certificate CSR and return it as PEM-encoded CSR string."
},
"GenerateDiceCSRResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"CSRString": {
"description": "The string for the DICE certificate signing request.",
"longDescription": "This property shall contain the DICE certificate signing request as a PEM-encoded string, containing structures specified by RFC2986. The private key should not be part of the string.",
"readonly": true,
"type": "string",
},
},
"required": ["CSRString"],
"description": "Response body for GenerateDiceCSR action."
}
评审点3:新增Redfish接口 - 生成DICE挑战响应证书链
资源URI: /redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCertificates
资源版本: openUBMCDiceCert.v1_0_0
操作类型: POST
变化类型: 新增接口
应用场景: 生成并返回DICE挑战响应证书链的内容
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现patch | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Nonce | string | 长度限制:[15, 1024] 示例:0F12082A11121314 |
否 | 否 | 否 | SecurityMgmt | DICE请求挑战值nonce(number used once) |
ActionInfo:
{
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/Managers/1/SecurityService/DiceCert/GenerateDiceCertificates",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Parameters": [
{
"Name": "Nonce",
"Required": true,
"DataType": "String"
}
],
"Oem": {}
}
Schema:
"GenerateDiceCertificates": {
"type": "object",
"actionResponse": {
"$ref": "#/definitions/GenerateDiceCertificatesResponse"
},
"parameters": {
"Nonce": {
"type": "string",
"requiredParameter": true,
"description": "Nonce for certificate chain generation.",
"longDescription": "This parameter shall contain the nonce used for DICE certificate chain generation."
}
},
"description": "Generate DICE certificate chain and return directly.",
"longDescription": "This action shall generate the DICE certificate chain and return it as an array of PEM-encoded certificate strings."
},
"GenerateDiceCertificatesResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"CertificateChain": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"CertificateString": {
"description": "The string for the certificate.",
"longDescription": "This property shall contain the certificate, and the format shall follow the requirements specified by the `CertificateType` property value. If the certificate contains any private keys, they shall be removed from the string in responses. If the service does not know the private key for the certificate and is needed to use the certificate, the client shall provide the private key as part of the string in the `POST` request. For additional property requirements, see the corresponding definition in the Redfish Data Model Specification.",
"readonly": true,
"type": [
"string",
"null"
]
},
"CertificateType": {
"anyOf": [
{"$ref": "http://redfish.dmtf.org/schemas/v1/Certificate.json#/definitions/CertificateType"},
{"type": "null"}
],
"description": "The format of the certificate.",
"longDescription": "This property shall contain the format type for the certificate. For additional property requirements, see the corresponding definition in the Redfish Data Model Specification.",
"readonly": true
},
},
"required": ["CertificateString"]
},
"readonly": true,
"description": "Array of DIcE certificates in the chain.",
"longDescription": "This property shall contain an array of DIcE certificate objects, each containing a PEM-encoded certificate string."
}
},
"required": ["CertificateChain"],
"description": "Response body for GenerateDiceCertificateChain action."
}
评审点4:新增Redfish接口 - 生成融合身份认证证书链
资源URI: /redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateHardwareComponentsCertificates
资源版本: openUBMCDiceCert.v1_0_0
操作类型: POST
变化类型: 新增接口
应用场景: 生成并返回融合身份认证证书链的内容
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现patch | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Nonce | string | 长度限制:[15, 1024] 示例:0F12082A11121314 |
否 | 否 | 否 | SecurityMgmt | DICE请求挑战值nonce(number used once) |
ActionInfo:
{
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/Managers/1/SecurityService/DiceCert/GenerateHardwareComponentsCertificates",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Parameters": [
{
"Name": "Nonce",
"Required": true,
"DataType": "String"
}
],
"Oem": {}
}
Schema:
"GenerateHardwareComponentsCertificates": {
"type": "object",
"actionResponse": {
"$ref": "#/definitions/GenerateHardwareComponentsCertificatesResponse"
},
"parameters": {
"Nonce": {
"type": "string",
"requiredParameter": true,
"description": "Nonce for certificate chain generation.",
"longDescription": "This parameter shall contain the nonce used for DICE certificate chain generation."
}
},
"description": "Generate DICE certificate chain and return directly.",
"longDescription": "This action shall generate the DICE certificate chain and return it as an array of PEM-encoded certificate strings."
},
"GenerateHardwareComponentsCertificatesResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"CertificateChain": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"CertificateString": {
"description": "The string for the certificate.",
"longDescription": "This property shall contain the certificate, and the format shall follow the requirements specified by the `CertificateType` property value. If the certificate contains any private keys, they shall be removed from the string in responses. If the service does not know the private key for the certificate and is needed to use the certificate, the client shall provide the private key as part of the string in the `POST` request. For additional property requirements, see the corresponding definition in the Redfish Data Model Specification.",
"readonly": true,
"type": [
"string",
"null"
]
},
"CertificateType": {
"anyOf": [
{
"$ref": "http://redfish.dmtf.org/schemas/v1/Certificate.json#/definitions/CertificateType"
},
{
"type": "null"
}
],
"description": "The format of the certificate.",
"longDescription": "This property shall contain the format type for the certificate. For additional property requirements, see the corresponding definition in the Redfish Data Model Specification.",
"readonly": true
},
},
"required": [
"CertificateString"
]
},
"readonly": true,
"description": "Array of DICE certificates in the chain.",
"longDescription": "This property shall contain an array of DIcE certificate objects, each containing a PEM-encoded certificate string."
}
},
"required": [
"CertificateChain"
],
"description": "Response body for GenerateHardwareComponentsCertificates action."
}
评审点5:资源协作接口新增方法
资源路径: /bmc/kepler/Managers/:Id/Security/DICE
资源接口: bmc.kepler.Managers.Security.DICE
变化类型: 新增方法
方法描述: ①导入DICE的PEM格式证书、②生成DICE证书签名请求CSR、③生成DICE挑战响应证书链、④生成融合身份认证证书链
| 方法名称 | 请求签名 | 请求参数类型 | 请求参数描述 | 响应签名 | 响应参数描述 | 方法描述 | 访问权限 |
|---|---|---|---|---|---|---|---|
| GenerateCSR | - | - | - | s | PEM格式的证书签名请求CSR字符串 | 生成PEM格式DICE根证书的签名请求CSR内容 | SecurityMgmt |
| ImportDICECertificate | s | String | Certificate: PEM格式的DICE证书字符串 | - | 无 | 导入PEM格式的DICE证书 | SecurityMgmt |
| GenerateDICECertificates | s | String | Nonce: 挑战值字符串 | as | DICE挑战响应证书链字符串数组 | 生成DICE远程证明挑战相应证书链 | SecurityMgmt |
| GenerateHardwareComponentsCertificates | s | String | Nonce: 挑战值字符串 | as | 融合身份挑战相应证书链字符串数组 | 生成融合身份挑战相应证书链 | SecurityMgmt |
是否准备好AI预审
是
评审结论
-
同意DICE证书导入Redfish接口
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.ImportDiceCertificate入参Type新增可选值text -
同意新增接口:
- (生成DICE证书签名请求CSR)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCSR - (生成DICE挑战响应证书链)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateDiceCertificates - (生成融合身份认证证书链)
/redfish/v1/Managers/{ManagerId}/SecurityService/DiceCert/Actions/DiceCert.GenerateHardwareComponentsCertificates
- (生成DICE证书签名请求CSR)
-
资源协作接口
bmc.kepler.Managers.Security.DICE同意新增方法:(方法详细参数见评审点5)- ImportDICECertificate,导入DICE的PEM格式证书
- GenerateCSR,生成DICE证书签名请求CSR
- GenerateDICECertificates,生成DICE挑战响应证书链
- GenerateHardwareComponentsCertificates,生成融合身份认证证书链
遗留问题
评审点1:GenerateDiceCSR 出参描述 schema补充 – 已补充(参考redfish标准补充CSRString对应的schema描述)
评审点5:补充参数名称(仅类型的描述不够)-- 已补充(请求参数名称)
评审点5:方法名称和方法描述不一致;方法名称过长 – (已修正)