Code Monkey home page Code Monkey logo

bmcweb's Introduction

OpenBMC webserver

This component attempts to be a "do everything" embedded webserver for OpenBMC.

Features

The webserver implements a few distinct interfaces:

  • DBus event websocket. Allows registering on changes to specific dbus paths, properties, and will send an event from the websocket if those filters match.
  • OpenBMC DBus REST api. Allows direct, low interference, high fidelity access to dbus and the objects it represents.
  • Serial: A serial websocket for interacting with the host serial console through websockets.
  • Redfish: A protocol compliant, DBus to Redfish translator.
  • KVM: A websocket based implementation of the RFB (VNC) frame buffer protocol intended to mate to webui-vue to provide a complete KVM implementation.

Protocols

bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.

AuthX

Authentication

Bmcweb supports multiple authentication protocols:

  • Basic authentication per RFC7617
  • Cookie based authentication for authenticating against webui-vue
  • Mutual TLS authentication based on OpenSSL
  • Session authentication through webui-vue
  • XToken based authentication conformant to Redfish DSP0266

Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.

Authorization

All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.

*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.

Configuration

bmcweb is configured per the meson build files. Available options are documented in meson_options.txt

Compile bmcweb with default options

meson builddir
ninja -C builddir

If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects.

Debug logging

bmcweb by default is compiled with runtime logging disabled, as a performance consideration. To enable it in a standalone build, add the

-Dlogging='enabled'

option to your configure flags. If building within Yocto, add the following to your local.conf.

EXTRA_OEMESON:pn-bmcweb:append = "-Dbmcweb-logging='enabled'"

Use of persistent data

bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.

TLS certificate generation

When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.

bmcweb's People

Contributors

aahmed-2 avatar apuli1 avatar asmithakarun avatar baemyung avatar carsonlab avatar chicagoduan avatar deepakala-k avatar edtanous avatar feistjj avatar fighternan avatar geissonator avatar gtmills avatar howitzer105mm avatar jayaprakashmutyala avatar jebr224 avatar jiaqingz-intel avatar jmbills avatar jonathan-doman avatar kamkowalski avatar krzysztof-i avatar lxwinspur avatar manojkiraneda avatar rameshiyyar avatar ratagupt avatar raviteja-b avatar rfrandse avatar spinler avatar sunharis avatar sunnysrivastava1984 avatar williamspatrick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmcweb's Issues

redfish/v1/JsonSchemas does not show OEM schemas

Get on redfish/v1/JsonSchema only returns DMTF redfish schemas. No OEM schema are listed.

To reproduce:
Curl -k -H "X-Auth-Token: $token" -X GET "https://$bmc/redfish/v1/JsonSchemas"
Look at output, see if OEMAssembly or other OEM schemas are there.

Note:
Curl -k -H "X-Auth-Token: $token" -X GET "https://$bmc/redfish/v1/JsonSchemas/<OemSchema_Name>" returns valid output.

Failed to get FiremwareVersion property via `redfish/v1/Chassis/chassis`

Unable to get FiremwareVersion attribute using redfish/v1/Chassis/chassis command.
Because when the GetSubTree method is called, the interface parameter passed in is xyz.openbmc_project.Inventory.Item.Chassis, so the service name that can only be obtained is xzy.openbmc_project.Inventory.Manager, but there is no xyz.openbmc_project.Software.Version interface here, so this judgment will never enter.

https://github.com/ibm-openbmc/bmcweb/blob/1020/redfish-core/lib/chassis.hpp#L416-L454

Update Assembly Schema To Populate Status::State

Similar to how we look at Operational Status to set the Status::Health Redfish property (See #202), we can look at the Present property on D-Bus to set the Status::State property

If Present is true, set Status::State to Enabled, else set it to Absent.

Excess traces in the ThermalMetrics Query

ThermalMetrics works but see excess traces in the Journal

curl -k https://$mybmc/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics/
{
  "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics",
  "@odata.type": "#ThermalMetrics.v1_0_0.ThermalMetrics",
  "Id": "ThermalMetrics",
  "Name": "Chassis Thermal Metrics",
  "TemperatureReadingsCelsius": [
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/PCIE_1_Temp",
      "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/PCIE_1_Temp",
      "DeviceName": "PCIE_1_Temp",
      "Reading": 29.0
    },
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/NVMe_JBOF_Card_1_Temp",
      "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/NVMe_JBOF_Card_1_Temp",
      "DeviceName": "NVMe_JBOF_Card_1_Temp",
      "Reading": 46.563
    },
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/NVMe_JBOF_Card_1_Local_Temp",

(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach
(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach
(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach
(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach
(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach
(2022-01-27 02:44:35) [ERROR "sensors.hpp":3290] Unsure how to handle sensorType fan_tach

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.