xref: /openbmc/bmcweb/README.md (revision f4f2643a)
1# OpenBMC webserver
2
3This component attempts to be a "do everything" embedded webserver for OpenBMC.
4
5## Features
6
7The webserver implements a few distinct interfaces:
8
9- DBus event websocket. Allows registering on changes to specific dbus paths,
10  properties, and will send an event from the websocket if those filters match.
11- OpenBMC DBus REST api. Allows direct, low interference, high fidelity access
12  to dbus and the objects it represents.
13- Serial: A serial websocket for interacting with the host serial console
14  through websockets.
15- Redfish: A protocol compliant, [DBus to Redfish translator](Redfish.md).
16- KVM: A websocket based implementation of the RFB (VNC) frame buffer protocol
17  intended to mate to webui-vue to provide a complete KVM implementation.
18
19## Protocols
20
21bmcweb at a protocol level supports http and https. TLS is supported through
22OpenSSL.
23
24## AuthX
25
26### Authentication
27
28Bmcweb supports multiple authentication protocols:
29
30- Basic authentication per RFC7617
31- Cookie based authentication for authenticating against webui-vue
32- Mutual TLS authentication based on OpenSSL
33- Session authentication through webui-vue
34- XToken based authentication conformant to Redfish DSP0266
35
36Each of these types of authentication is able to be enabled or disabled both via
37runtime policy changes (through the relevant Redfish APIs) or via configure time
38options. All authentication mechanisms supporting username/password are routed
39to libpam, to allow for customization in authentication implementations.
40
41### Authorization
42
43All authorization in bmcweb is determined at routing time, and per route, and
44conform to the Redfish PrivilegeRegistry.
45
46\*Note: Non-Redfish functions are mapped to the closest equivalent Redfish
47privilege level.
48
49## Configuration
50
51bmcweb is configured per the
52[meson build files](https://mesonbuild.com/Build-options.html). Available
53options are documented in `meson_options.txt`
54
55## Compile bmcweb with default options
56
57```ascii
58meson builddir
59ninja -C builddir
60```
61
62If any of the dependencies are not found on the host system during
63configuration, meson will automatically download them via its wrap dependencies
64mentioned in `bmcweb/subprojects`.
65
66## Debug logging
67
68bmcweb by default is compiled with runtime logging disabled, as a performance
69consideration. To enable it in a standalone build, add the
70
71```ascii
72-Dlogging='enabled'
73```
74
75option to your configure flags. If building within Yocto, add the following to
76your local.conf.
77
78```bash
79EXTRA_OEMESON:pn-bmcweb:append = "-Dbmcweb-logging='enabled'"
80```
81
82## Use of persistent data
83
84bmcweb relies on some on-system data for storage of persistent data that is
85internal to the process. Details on the exact data stored and when it is
86read/written can seen from the `persistent_data` namespace.
87
88## TLS certificate generation
89
90When SSL support is enabled and a usable certificate is not found, bmcweb will
91generate a self-signed a certificate before launching the server. Please see the
92bmcweb source code for details on the parameters this certificate is built with.
93