commit | e155ab54ec5ad4c31937f4d7de8b502e91468e43 | [log] [tgz] |
---|---|---|
author | Nan Zhou <nanzhoumails@gmail.com> | Fri Jun 10 00:03:45 2022 +0000 |
committer | Ed Tanous <ed@tanous.net> | Mon Aug 01 23:33:39 2022 +0000 |
tree | 711c0ba67ce638b09f424a4b5101508e1a152568 | |
parent | 85e6471b5e526c2f752623a01c14c09c7cf8c9cd [diff] |
query: implement generic $select This commits implement the generic handler for the $select query in the Redfish Spec, section 7.3.3. $select takes a comma separated list of properties, and only these properties will be returned in the response. As a first iteration, this commits doesn't handle $select combined with $expand. It returns an unimplemented error in that case. I am currently working with DMTF and getting their clarification. See this issue for details: https://github.com/DMTF/Redfish/issues/5058. It also leaves other TODOs in the comment of |processSelect|. Today, $select is put behind the insecure-query flag. Tested: 0. No $select is performed when the flag is disabled. 1. The core codes are just JSON manipulation. Tested in unit tests. 2. On hardware, URL: /redfish/v1/Systems/system/ResetActionInfo?$expand=.&$select=Id 400 Bad Request URL: /redfish/v1/Systems/system?$select=ProcessorSummary/Status { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", "ProcessorSummary": { "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" } } } Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I5c570e3a0a37cbab160aafb8107ff8a5cc99a6c1
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.