commit | 3de8d8ba2880173fac03c949d9fae035442549ee | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@inspur.com> | Mon Mar 22 17:49:39 2021 +0800 |
committer | George Liu <liuxiwei@inspur.com> | Tue Mar 23 10:18:14 2021 +0800 |
tree | c602dab277dbd5af95f78588bd45b879049e43d2 | |
parent | 8f7e9c194f36a84f4e49ad142110f4f3d0f312be [diff] |
log-services: Error return 500(internal error) - If the server returns 500(internal error) to any of these requests, the security scanner logs it as an error for followup. - Sometimes, it is not a real 500(internal error), may be is a 404 (not found) error, and we think that the 404(not found) error is a benign error, and not actually a real security threat. - We should handle the 404(not found) error correctly and return it where appropriate. - Refer to: https://github.com/openbmc/bmcweb/blob/master/COMMON_ERRORS.md#11-not-responding-to-404 Tested: curl -k -X DELETE -v https://$bmc/redfish/v1/Systems/system/LogServices/Dump/Entries/198274391874 - Before: { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.8.1.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.8.1.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } } - After: { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type systemDumpEntry named 198274391874 was not found.", "MessageArgs": [ "LogEntry", "198274391874" ], "MessageId": "Base.1.8.1.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.8.1.ResourceNotFound", "message": "The requested resource of type systemDumpEntry named 198274391874 was not found." } } Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I84c14f0294cf84606c9850dc4bacbda16e8cfa8e
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 -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
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.