commit | fc5ae94d7037b35b28b8ee3c1eda1a07ff62d857 | [log] [tgz] |
---|---|---|
author | Oliver Brewka <mox669.dev@gmail.com> | Mon Aug 12 15:04:41 2024 +0200 |
committer | Ed Tanous <ed@tanous.net> | Mon May 12 20:20:33 2025 +0000 |
tree | 81abed5e52071bdde50255e6b299379b67a5d675 | |
parent | 86e41a896f12b6dd3bc93fd6aa34ea60444ef27a [diff] |
Introducing systems_utils.hpp and getSystemCollectionMembers This change introduces a new a function similar to getCollectionMembers but specific to computerSystem discovery. Since more functionality will be added soon to support multi host redfish and in general request handling with the long term goal not using hardcoded URIs anymore, a new utility header for systems.hpp is being introduced in this patch that will hold the rest of the incoming definitions. getSystemCollectionMembers supports multi-host platforms like yosemite4. Currently we have to distinguish between single- and multi-host platforms and handle both separate from each other, thus cannot use the generic getCollectionMembers from collection.hpp. However, this should change sometime in the future. It should be mentioned, that functionalitywise the newly introduced function shares almost all of the code used in getCollectionMembers from collection.hpp. Only simplification has been done, since this function only serves a single usecase. In order to create the collection for a multi-host platform, the collection handler looks for the ManagedHost dbus interface via the ObjectMapper and adds everything it gets from a getSubTree call to the collection. Single-host systems do not populate this interface, so an empty result from the ObjectMapper is treated as the request came from a single-host system. Testing: Full redfish service validator has been ran on a romulus image with and without the changes, representative for a single-host system. No regression has been observed. A yosemite4 image has been validated constraining the validator to only check the collection url without following sub uris. Validation also succeeded. In addition, the collection url has been curled manually on both images to check the correct members are added to the collection. curl -w "@curl-format.txt" -c cjar -b cjar -k -X GET \ 'https://'"${BMC}"':4443/redfish/v1/Systems \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' romulus output: { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "Members@odata.count": 1, "Name": "Computer System Collection" } yosemite4 output: { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_1_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_2_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_3_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_4_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_5_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_6_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_7_Chassis" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_Slot_8_Chassis" } ], "Members@odata.count": 8, "Name": "Computer System Collection" } Change-Id: I82d59487b7c17b22cd638acd8f687f31c96ca156 Signed-off-by: Oliver Brewka <mox669.dev@gmail.com>
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 setup 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.