commit | 4d1db045ef30d0b717220d2ef61530c2b1fb0bb1 | [log] [tgz] |
---|---|---|
author | Ed Tanous <ed@tanous.net> | Fri Feb 16 13:08:34 2024 -0800 |
committer | Ed Tanous <ed@tanous.net> | Wed Mar 20 21:39:32 2024 +0000 |
tree | dcb7822e70b7c14c9047af758493c085999e8105 | |
parent | b6164cbec4dd7f5c4e6e7667b203874e11cd8b3c [diff] |
Change logging to default to Error/Critical Historically, logging has been disabled in bmcweb for two reasons. First, the crow logging handler used iostreams, which can bloat binary sizes if there are lots of logging call sites. Second, the amount of logging and the levels at which is was performed were not very carefully selected by either crow, or the follow on bmcweb. A number of log calls logged at Error or Critical level that are fully expected to occur in a normally operating service. The first was corrected with commit 62598e3, which replaced the iostreams logger with c++20 compliant std::format. The second was corrected by Gunnar, documenting when and where to log different levels in commit 0e88cb3, and a series of commits after making the levels usage more consistent. With those two changes in place and showing the appearance of being functional, this patchset is recommending that we change the default error level to log Critical and Error levels by default. A number of organizations have already made this change to their local systems [1], opting for varying levels. Given that we're now internally consistent, this is going to request that we modify those systems to accept defaults once again. There are two negatives to this being the default. 1. We take a 2.7% increase (about 27KB) in binary size. Given the last couple years of reductions in the default binary size, this shouldn't cause any platforms to go over their flash limit, and we're still well within the documented size targets. 2. Error paths now log, which slows down the result, and increases the potential that a DOS attack or test will slow down real results. This concern is hypothetical at best, but we will have to watch for repeated patterns emerging and evaluate if this is a potential problem. Please comment. [1] https://github.com/search?q=repo%3Aopenbmc%2Fopenbmc%20bmcweb-logging&type=code Change-Id: Ib32654c3bcbcbee567f3bd7abd003411dd9e489a Signed-off-by: Ed Tanous <ed@tanous.net>
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.