commit | 80f595e7c00dc5b82e1aba8828c3a8205f9a4332 | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Mon Feb 14 09:32:05 2022 -0800 |
committer | Ed Tanous <ed@tanous.net> | Tue Aug 02 04:07:07 2022 +0000 |
tree | a2cdd7a257753d87de520bb01d712a55dd11254a | |
parent | e155ab54ec5ad4c31937f4d7de8b502e91468e43 [diff] |
Simplify fillMessageArgs The aforementioned function does a lot of reconstruction of strings as args are filled in. This results in the end of the string being copied many times (N). Replace the algorithm with one that builds a new string, using reserve (which is good practice) and is also capable of returning errors in the case of bad entries. fillMessageArgs now returns a string instead of trying to do things in place, which avoids the initial std::string construction, so we should be net the same here. Given this new algorithm can now detect failures in parsing (ie, trying to parse %1 with no arguments) add unit tests for coverage of that, and modify event manager slightly to handle errors. Tested: Unit tests pass. Pretty good coverage of this stuff. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I16f28a2ac78580fb35266561f5ae38078b471989
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.