commit | 9f217c26f58c0a99c18e7cac7b095dcf6068562d | [log] [tgz] |
---|---|---|
author | Ed Tanous <ed@tanous.net> | Fri Apr 19 17:22:43 2024 -0700 |
committer | Ed Tanous <ed@tanous.net> | Fri Apr 26 06:06:39 2024 +0000 |
tree | 8fa60e8efd6d70d2efefd5399862a1f5d914e232 | |
parent | 98df875b683ef4bc3b1be46300db67f35d11bac3 [diff] |
Make cookie auth check all headers Currently, the Cookie auth only checks the first cookie header in a request. This works fine for most things, because a lot of implementations (browsers) seem to either put the Cookie headers in alphabetical order, or put them in the order in which they were stored which in the case of bmcweb, is also alphabetical. Well, http2 blows this up, because cookies could potentially be in any order, given the hpack compression techniques, so there's no promise that Cookie[0] is the Session cookie. This commit reworks the authentication code to call beasts "equal_range" getter, which returns the range of all headers that matched. This allows us to attempt to parse the cookies in whatever order they might have been received. The auth routine only tries to log in the first cookie matching SESSION=, and do not try to handle duplicates, as this might allow attackers to negate the anti brute force measures by testing multiple passwords at once Tested: With http2 enabled, the UI can now log in more consistently, and in addition, the HTML redfish pages function more consistently when using cookie auth. Redfish service validator passes. Change-Id: I3a61a5a654f62096ff19cfbfaf0a10f30a1a3605 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.