commit | 1530261b40a9cbe77f349e4b4ddff427cf626b66 | [log] [tgz] |
---|---|---|
author | Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> | Thu Jul 16 11:24:47 2020 +0200 |
committer | Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> | Fri Jul 17 13:28:28 2020 +0200 |
tree | a604de1e9a2a44617c4eaed0b0563c1cfbba10f8 | |
parent | b41187fac9d82be2ea26bd8695f2beba135e80f1 [diff] |
Make default PUT handling return 403 for unpriviledged user Default implementation for GET, POST, PATCH and DELETE returns 403 if user does not have right to perform action on a resource. Access right was verified even if method was not implemented (which is good). PUT was lacking this behavior, and returned 405 (method not allowed) for unpriviledged user if it was not supported by resource. This change makes PUT method behaving the same way as the other in this scenario, making behavior of all basic REST methods consistent. Testing: - verified that calling PUT for unpriviledged user on resource, that doesn't implement it, returns 403 instead of 405 Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> Change-Id: I91ffb88755093b2d5d19f073407df6ede026d720
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.