commit | 3648c8be1c03c8ebe099185bc651613862fc0027 | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Mon Jul 25 13:39:59 2022 -0700 |
committer | Ed Tanous <ed@tanous.net> | Wed Jul 27 17:36:20 2022 +0000 |
tree | f0710221ce85754f91462ad8ff7e4b07a4feaa4e | |
parent | 3acced2ce93ab735f147ba8204afcc18bdc0c3ea [diff] |
Query param: fix regression in top parameters With the inclusion of ce8ea743055f1b82c60790db40aa3295e03bdf9c it looks like we're now returning 400 error codes, with a response error of QueryNotSupportedOnResource for resources which don't support top and skip (like RegistryFile). This would imply that the Query object NEEDS a way to represent "user didn't provide us a skip/top parameter" which arguably means this needs to go back to a std::optional<size_t>. The error gets added from: https://github.com/openbmc/bmcweb/blob/d5c80ad9c07b94465d8ea62d2b6f87c30cac765e/redfish-core/include/utils/query_param.hpp#L304 and appears to be a basic logic error in that now all queries assume that the user provided top and skip, which fails for non-collections. This commit moves that direction, changing the Query object back to std::optional<size_t>. This has the unintended consequence of now putting the idea of "defaults" back into the per-delegated handlers. This seems reasonable, as arguably the defaults for each individual collection are going to be different, and at some point we might want to take advant age of that. Tested: 1. Tested on Romulus QEMU. All passed. 2. Tested on s7106, Validator passed. Signed-off-by: Ed Tanous <edtanous@google.com> Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I9f912957d130694b281c6e391602de158eaddcb3
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.