commit | e7d1a1cfd59ed69cd11d1db76e2ae4a9a8771407 | [log] [tgz] |
---|---|---|
author | Ed Tanous <ed@tanous.net> | Mon Sep 28 09:36:35 2020 -0700 |
committer | Ed Tanous <ed@tanous.net> | Tue Sep 29 21:56:23 2020 +0000 |
tree | 6ca5197b77e42bfcfa0607567fcdd5a988a9bf3e | |
parent | 2c70f8004afdc27bd42968b8bf7480f2e534974c [diff] |
Remove Server header from responses The HTTP Server header allows potential attackers to fingerprint the BMC much easier than they could otherwise, as the bmc essentially reports its name to requests. From section 7.4.2 of RFC7231: "An origin server MAY generate a Server field in its responses." This patchset moves bmcwebs position that it will not publish the server field, as it does not contain useful data for the client. It should be noted, it looks like OpenSSL was using the server name for its connection ID. It's not clear this is correct, or desired, but I've inlined the old value (to avoid changing behavior). Also, it was missing a return code check, so I added it. Tested: Will verify in the webui (TBD) Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ieee6f15d8299e76517952514ff196008a563b63c
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/CMakeLists.txt
and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ...
followed by make
. The option names become C++ preprocessor symbols that control which code is compiled into the program.
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.