commit | 3e35c761b7793696267870550bd6f0b0035f4110 | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@inspur.com> | Wed Mar 08 16:56:38 2023 +0800 |
committer | Ed Tanous <ed@tanous.net> | Mon Mar 13 19:22:55 2023 +0000 |
tree | d521a9bf22fd2cebfcc52f26a6b2e0481e68f604 | |
parent | 39662a3be1877afd893b70d78a449f91ba36c260 [diff] |
Fix `MemberId` value error causes Validator to fail The test using the latest Redfish verifier found the following errors ``` 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/ Temperatures/0 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/ Temperatures/1 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/ Temperatures/2 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/0 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/1 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/2 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/3 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/4 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/5 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/6 1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/7 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/0 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/1 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/2 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/3 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/4 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/5 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/6 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/7 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/8 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/9 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/ Voltages/10 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/ Voltages/11 1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/ Voltages/12 ``` Because the Redfish verifier checks whether the MemberId matches the last part of the URL [1] ``` Added validation of the last segment of the URI to ensure it matches the Id property or MemberId property where appropriate. ``` [1] https://github.com/DMTF/Redfish-Service-Validator/blob/master/CHANGELOG.md#224---2023-02-05 Tested: Validator passes curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Thermal { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal", "@odata.type": "#Thermal.v1_4_0.Thermal", "Fans": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/0", "@odata.type": "#Thermal.v1_3_0.Fan", "MemberId": "0", ... }, { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/1", "@odata.type": "#Thermal.v1_3_0.Fan", "MemberId": "1", ... }, { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/2", "@odata.type": "#Thermal.v1_3_0.Fan", "MemberId": "2", ... }, { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/3", "@odata.type": "#Thermal.v1_3_0.Fan", "MemberId": "3", ... }, ... Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I12151a2b20475071ea9b3ed3296754d56a0fed53
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.