commit | db18fc98241b4fc9a4274f45c1d6b07d7bd1b93d | [log] [tgz] |
---|---|---|
author | Carson Labrado <clabrado@google.com> | Tue Aug 23 23:48:44 2022 +0000 |
committer | Ed Tanous <ed@tanous.net> | Tue Aug 30 02:25:01 2022 +0000 |
tree | 5d6092140a5c52eaf782c1ae4ba912604b491dd8 | |
parent | 84825f708e0bbd66e5bdf527970c1231aa219dfa [diff] |
Aggregation: Improve handling of certain requests This patch cleans up a few edge cases that aren't handled properly. We need to break out of the aggregation code earlier when there are no satellite configs. The logs are showing mixed messages of Aggregation not being enabled due to no found satellite configs followed by processing the request anyway until we fail to actually find a satellite BMC to forward the request to. When we don't have any satellite configs, but a request is sent to what should be a valid satellite URI such as /redfish/v1/Chassis/5B247A_ChassisID then we need to make sure we return a 404 within the aggregation code since we won't locally handle the request. We don't have to worry about collection requests since by design we will also locally handle the request. This patch is also prep to allow forwarding non-GET requests to resources that are not supported by BMCWeb. The aggregation code will get to handle all such requests and we need to make sure that we do not forward non-GET requests to top level collections. Tested: Without any satellite configs the aggregation code exited before it began trying to send a request to all satellites for /redfish/v1/Chassis. The same occurred for a request for a satellite resource. In the latter case the aggregation code also returned a 404. Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: Idd1a71ebb485a77795ba47b873624c8e53c36a4c
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 by default is compiled with runtime logging disabled, as a performance consideration. To enable it in a standalone build, add the
-Dlogging='enabled'
option to your configure flags. If building within Yocto, add the following to your local.conf.
EXTRA_OEMESON:pn-bmcweb:append = "-Dbmcweb-logging='enabled'"
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.