commit | 142ec9aeb70c23a1aa98aa90d472ff11a76529ee | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Thu Mar 24 18:20:45 2022 -0700 |
committer | Ed Tanous <ed@tanous.net> | Tue Apr 05 18:52:20 2022 +0000 |
tree | 45eee07091c0654cfcc2328dd4bd4e6ae790d48b | |
parent | 7cf436c913a109c0d3ebf7e696970966500bc6b6 [diff] |
Implement odata-version checks The redfish protocol validator is a cruel.... cruel test. In it, it attempts to send odata-version headers that are not supported by the spec. bmcweb has never had a use for those headers, and they are optional to send, so bmcweb ignored them. This patchset fixes that. The exact wording of the standard is in the patch. Tested: curl --insecure --user root:0penBmc https://192.168.7.2/redfish/v1 Returns service root curl --insecure --user root:0penBmc -H "Odata-version: 4.0" https://192.168.7.2/redfish/v1 returns service root curl --insecure --user root:0penBmc -H "Odata-version: 4.1" https://192.168.7.2/redfish/v1 returns precondition failed message from base registry, and 501 code. Redfish protocol validator now shows REQ_HEADERS_ODATA_VERSION test passing. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7d2f4bd9f6b7f03655d7e169ee20f45f9aaa73e3
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.