History log of /openbmc/bmcweb/http/ (Results 126 – 150 of 446)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
61e349ac31-May-2023 Ed Tanous <edtanous@google.com>

Break out serializer into its own cpp file

This commit is entirely just moving code, such that not all compile
units need to pull in the full html serializer.

Tested: Unit tests pass. Pretty good

Break out serializer into its own cpp file

This commit is entirely just moving code, such that not all compile
units need to pull in the full html serializer.

Tested: Unit tests pass. Pretty good coverage.

Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ifaebe9534c0693dc678fd994517563b89aca0cc5

show more ...

5e44e3d816-Mar-2021 AppaRao Puli <apparao.puli@linux.intel.com>

Add SSE style subscription support to eventservice

This commit adds the SSE style eventservice subscription style event
Using this, end user can subscribe for Redfish event logs using GET
on SSE uri

Add SSE style subscription support to eventservice

This commit adds the SSE style eventservice subscription style event
Using this, end user can subscribe for Redfish event logs using GET
on SSE uris from browser.

Tested:
- From Browser did GET on above SSE URI and
generated some Redfish event logs(power cycle)
and saw redfish event logs streaming on browser.
- After SSE registration, Check Subscription collections
and GET on individual subscription and saw desired
response.
- Ran RedfishValidation and its passed.

Change-Id: I7f4b7a34974080739c4ba968ed570489af0474de
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

6fde95fa01-Jun-2023 Ed Tanous <edtanous@google.com>

Server-sent-event fixes

This makes several changes to server-sent events to allow it to merge
to master. The routing system has been removed in leiu of using
content-type eventstream detection. Ti

Server-sent-event fixes

This makes several changes to server-sent events to allow it to merge
to master. The routing system has been removed in leiu of using
content-type eventstream detection. Timers have been added to the
sse connections, and sse connections now rely on async_wait, rather
than a full read.

Tested: WIP

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id0ff0ebc2b3a795b3dba008e440556a9fdd882c2

show more ...

88ada3bc13-Apr-2023 V-Sanjana <sanjana.v@intel.com>

Add Server-Sent-Event support

Server-Sent-Event is a standard describing how servers can initiate
data transmission towards clients once an initial client connection has
been established. Unlike web

Add Server-Sent-Event support

Server-Sent-Event is a standard describing how servers can initiate
data transmission towards clients once an initial client connection has
been established. Unlike websockets (which are bidirectional),
Server-Sent-Events(SSE) are unidirectional and commonly used to send
message updates or continuous data streams to a browser client.

This is base patch for adding Server-Sent-Events routing support to
bmcweb. Redfish EventService SSE style subscription uses SSE route for
sending the Events/MetricReports to client which establishes the
connection.

Tested this patch with along with EventService SSE support patches and
verified the functionalty on browser.

Tested:
- Tested using follow-up patches on top which adds
support for Redfish EventService SSE style subscription
and observed events are getting sent periodically.
- Created SSE subscription from the browser by visiting
https://<BMC IP>/redfish/v1/EventService/SSE

Change-Id: I36956565cbba30c2007852c9471f477f6d1736e9
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Signed-off-by: V-Sanjana <sanjana.v@intel.com>

show more ...

f8ca6d7928-Jun-2022 Ed Tanous <edtanous@google.com>

Allow async resolver to be optional

This commit adds a meson option to allow selecting which dns resolver
bmcweb uses. There are use cases, like Open Compute Project Inband
Management Agent, that w

Allow async resolver to be optional

This commit adds a meson option to allow selecting which dns resolver
bmcweb uses. There are use cases, like Open Compute Project Inband
Management Agent, that would require not using dbus, which would require
us to fall back to the asio resolver. This commit makes the existing
asio resolver constructor, and async_resolve methods match the
equivalents in asio (which we intended to do anyway), then adds a macro
and configure option for being able to select which resolver backend to
rely on.

Tested: Code can now compile without sdbusplus.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3220214367179f131a60082bdfaf7e725d35c125

show more ...

faf100f925-May-2023 Ed Tanous <edtanous@google.com>

Fix some includes

System includes should be included with <>, in-tree includes should be
included with "". This was found manually, with the help of the
following grep statement[1].

git grep -o -h

Fix some includes

System includes should be included with <>, in-tree includes should be
included with "". This was found manually, with the help of the
following grep statement[1].

git grep -o -h "#include .*" | sort | uniq

Tested:
Code compiles

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1a6b2a5ba35ccbbb61c67b7c4b036a2d7b3a36a3

show more ...


/openbmc/bmcweb/Redfish.md
http_response.hpp
/openbmc/bmcweb/include/dbus_monitor.hpp
/openbmc/bmcweb/include/dbus_utility.hpp
/openbmc/bmcweb/include/kvm_websocket.hpp
/openbmc/bmcweb/include/nbd_proxy.hpp
/openbmc/bmcweb/include/obmc_console.hpp
/openbmc/bmcweb/include/vm_websocket.hpp
/openbmc/bmcweb/redfish-core/include/aggregation_utils.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/chassis.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/control.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/coolant_connector.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/cooling_loop.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/cooling_unit.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/event.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/leak_detector.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/outlet.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/outlet_group.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/port.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/processor.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/pump.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/reservoir.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/sensor.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/storage.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/triggers.hpp
/openbmc/bmcweb/redfish-core/include/generated/enums/volume.hpp
/openbmc/bmcweb/redfish-core/include/utils/json_utils.hpp
/openbmc/bmcweb/redfish-core/include/utils/telemetry_utils.hpp
/openbmc/bmcweb/redfish-core/lib/ethernet.hpp
/openbmc/bmcweb/redfish-core/lib/managers.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report_definition.hpp
/openbmc/bmcweb/redfish-core/lib/processor.hpp
/openbmc/bmcweb/redfish-core/lib/storage.hpp
/openbmc/bmcweb/redfish-core/lib/systems.hpp
/openbmc/bmcweb/redfish-core/lib/telemetry_service.hpp
/openbmc/bmcweb/redfish-core/src/error_messages.cpp
/openbmc/bmcweb/scripts/update_schemas.py
/openbmc/bmcweb/src/webserver_main.cpp
/openbmc/bmcweb/static/redfish/v1/$metadata/index.xml
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/AccountService/AccountService.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/AggregationService/AggregationService.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/AggregationSource/AggregationSource.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Bios/Bios.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Cable/Cable.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/CableCollection/CableCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Certificate/Certificate.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/CertificateCollection/CertificateCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Chassis/Chassis.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ChassisCollection/ChassisCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ComponentIntegrity/ComponentIntegrity.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ComponentIntegrityCollection/ComponentIntegrityCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ComputerSystemCollection/ComputerSystemCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Drive/Drive.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/DriveCollection/DriveCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/EthernetInterface/EthernetInterface.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/EthernetInterfaceCollection/EthernetInterfaceCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Event/Event.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/EventDestination/EventDestination.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/EventDestinationCollection/EventDestinationCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/EventService/EventService.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/FabricAdapter/FabricAdapter.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/FabricAdapterCollection/FabricAdapterCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Fan/Fan.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/FanCollection/FanCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/JsonSchemaFileCollection/JsonSchemaFileCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/LogEntry/LogEntry.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/LogEntryCollection/LogEntryCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/LogServiceCollection/LogServiceCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Manager/Manager.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ManagerAccount/ManagerAccount.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ManagerAccountCollection/ManagerAccountCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ManagerCollection/ManagerCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ManagerNetworkProtocol/ManagerNetworkProtocol.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Memory/Memory.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MemoryCollection/MemoryCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MessageRegistryCollection/MessageRegistryCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MessageRegistryFileCollection/MessageRegistryFileCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MetricDefinition/MetricDefinition.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MetricDefinitionCollection/MetricDefinitionCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MetricReportCollection/MetricReportCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MetricReportDefinition/MetricReportDefinition.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/MetricReportDefinitionCollection/MetricReportDefinitionCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/OperatingConfigCollection/OperatingConfigCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PCIeDevice/PCIeDevice.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PCIeDeviceCollection/PCIeDeviceCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PCIeFunctionCollection/PCIeFunctionCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PhysicalContext/PhysicalContext.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Port/Port.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PortCollection/PortCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PowerSupply/PowerSupply.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/PowerSupplyCollection/PowerSupplyCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Processor/Processor.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ProcessorCollection/ProcessorCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Resource/Resource.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/RoleCollection/RoleCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Sensor/Sensor.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/SensorCollection/SensorCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ServiceRoot/ServiceRoot.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Session/Session.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/SessionCollection/SessionCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/SoftwareInventoryCollection/SoftwareInventoryCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Storage/Storage.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/StorageCollection/StorageCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/StorageController/StorageController.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/StorageControllerCollection/StorageControllerCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Task/Task.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/TaskCollection/TaskCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/TelemetryService/TelemetryService.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ThermalMetrics/ThermalMetrics.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/ThermalSubsystem/ThermalSubsystem.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/Triggers/Triggers.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/TriggersCollection/TriggersCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/UpdateService/UpdateService.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/VLanNetworkInterfaceCollection/VLanNetworkInterfaceCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/VirtualMedia/VirtualMedia.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/VirtualMediaCollection/VirtualMediaCollection.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/redfish-payload-annotations/redfish-payload-annotations.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/redfish-schema-v1/redfish-schema-v1.json
/openbmc/bmcweb/static/redfish/v1/JsonSchemas/redfish-schema/redfish-schema.json
/openbmc/bmcweb/static/redfish/v1/schema/AccountService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ActionInfo_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/AggregationService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/AggregationSourceCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/AggregationSource_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Assembly_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/AttributeRegistry_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Bios_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/CableCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Cable_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/CertificateCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/CertificateLocations_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/CertificateService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Certificate_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ChassisCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Chassis_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ComponentIntegrityCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ComponentIntegrity_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ComputerSystemCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ComputerSystem_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/DriveCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Drive_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EnvironmentMetrics_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EthernetInterfaceCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EthernetInterface_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EventDestinationCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EventDestination_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/EventService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Event_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/FabricAdapterCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/FabricAdapter_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/FanCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Fan_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/IPAddresses_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/JsonSchemaFileCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/JsonSchemaFile_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/LogEntryCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/LogEntry_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/LogServiceCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/LogService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ManagerAccountCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ManagerAccount_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ManagerCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ManagerDiagnosticData_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ManagerNetworkProtocol_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Manager_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MemoryCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Memory_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MessageRegistryCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MessageRegistryFileCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MessageRegistryFile_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MessageRegistry_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Message_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricDefinitionCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricDefinition_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricReportCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricReportDefinitionCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricReportDefinition_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/MetricReport_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/OperatingConfigCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/OperatingConfig_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PCIeDeviceCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PCIeDevice_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PCIeFunctionCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PCIeFunction_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PCIeSlots_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PhysicalContext_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PortCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Port_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PowerSubsystem_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PowerSupplyCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/PowerSupply_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Power_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Privileges_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ProcessorCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Processor_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/RedfishError_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/RedfishExtensions_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Redundancy_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Resource_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/RoleCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Role_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/SensorCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Sensor_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ServiceRoot_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/SessionCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/SessionService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Session_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Settings_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/SoftwareInventoryCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/SoftwareInventory_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/StorageCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/StorageControllerCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/StorageController_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Storage_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/TaskCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/TaskService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Task_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/TelemetryService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ThermalMetrics_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/ThermalSubsystem_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Thermal_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/TriggersCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/Triggers_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/UpdateService_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/VLanNetworkInterfaceCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/VLanNetworkInterface_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/VirtualMediaCollection_v1.xml
/openbmc/bmcweb/static/redfish/v1/schema/VirtualMedia_v1.xml
/openbmc/bmcweb/subprojects/nlohmann.wrap
/openbmc/bmcweb/test/include/google/google_service_root_test.cpp
/openbmc/bmcweb/test/redfish-core/lib/service_root_test.cpp
3e72c20227-Mar-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Added new pre-defined usergroup called hostconsole

The new pre-defined usergroup named "hostconsole" is added to
differentiate access between host console and manager console.
The only users allowed

Added new pre-defined usergroup called hostconsole

The new pre-defined usergroup named "hostconsole" is added to
differentiate access between host console and manager console.
The only users allowed to interact with host console are part of the
"hostconsole" group and they are in an administrator role.

Note: The changes are spread across multiple repositories listed under
"Related commits:"

The bmcweb changes to incorporate new group are as follows:
- The new user is added in the hostconsole group only if it has an
administrative role.
- The ssh usergroup is only translated to ManagerConsole redfish group
and hostconsole usergroup is translated to HostConsole redfish group.
- The following changes are made to check the privileges for host console
access
- The new OEM privilege "OpenBMCHostConsole" added for host console
access. This privilege is not shared externally hence it is not
documented.
- Updated obmc_console BMCWEB_ROUTE to use the new privilege.
- Router functions now save user role and user groups in the session
- getUserPrivileges() function now takes session reference instead
of user role. This function now also checks for the user group
"hostconsole" and add the new privilege if user is member of this
group.
- Updated all callers of the getUserPrivileges to pass session
reference.
- Added test to validate that new privilege is set correctly.

Tested:
Loaded code on the system and validated that;
- New user gets added in hostconsole group. NOTE: Prior to this commit
all groups are assigned to new user. This drop does not change that
behavior.
- Access from the web gui is only available for users in hostconsole
group. Used IBM internal simulator called simics to test this. This
simulator allows accessing openbmc from GUI.
- Checked the role collection and there is no change.
$ curl -k -H "X-Auth-Token: $TOKEN" -X GET \
https://${bmc}/redfish/v1/AccountService/Roles
$ curl -k -H "X-Auth-Token: $TOKEN" -X GET \
https://${bmc}/redfish/v1/AccountService/Roles/Administrator
$ curl -k -H "X-Auth-Token: $TOKEN" -X GET \
https://${bmc}/redfish/v1/AccountService/Roles/ReadOnly
$ curl -k -H "X-Auth-Token: $TOKEN" -X GET \
https://${bmc}/redfish/v1/AccountService/Roles/Operator

- HostConsole is in AccountType when hostconsole group is present in
UserGroups D-Bus property

$ id user99
uid=1006(user99) gid=100(users) groups=1000(priv-admin),1005(web),\
1006(redfish),1013(hostconsole),100(users)

$ curl -k https://${bmc}/redfish/v1/AccountService/Accounts/user99
{
"@odata.id": "/redfish/v1/AccountService/Accounts/user99",
"@odata.type": "#ManagerAccount.v1_4_0.ManagerAccount",
"AccountTypes": [
"HostConsole",
"Redfish",
"WebUI",
"ManagerConsole"
],
"Description": "User Account",
"Enabled": true,
"Id": "user99",
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
},
"Locked": false,
"Locked@Redfish.AllowableValues": [
"false"
],
"Name": "User Account",
"Password": null,
"PasswordChangeRequired": false,
"RoleId": "Administrator",
"UserName": "user99"

- The hostconsole group is not present for readonly or operator users
and also made sure that console access is not provided. This testing
is done one the system and console access was tried by modifying the
https://github.com/openbmc/bmcweb/blob/master/scripts/websocket_test.py

+ curl -k https://${bmc}/redfish/v1/AccountService/Accounts/user99
{
"@odata.id": "/redfish/v1/AccountService/Accounts/user99",
"@odata.type": "#ManagerAccount.v1_4_0.ManagerAccount",
"AccountTypes": [
"IPMI",
"Redfish",
"WebUI",
"ManagerConsole"
],
"Description": "User Account",
"Enabled": true,
"Id": "user99",
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/ReadOnly"
}
},
"Locked": false,
"Locked@Redfish.AllowableValues": [
"false"
],
"Name": "User Account",
"Password": null,
"PasswordChangeRequired": false,
"RoleId": "ReadOnly",
"UserName": "user99"

[INFO "http_connection.hpp":209] Request: 0x150ac38 HTTP/1.1 GET /console0 ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1265] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "routing.hpp":1084] userName = user99 userRole = priv-user
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=ipmi
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=redfish
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=ssh
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=web
[DEBUG "routing.hpp":93] checkPrivileges: BASE USER: Login
[DEBUG "routing.hpp":93] checkPrivileges: BASE USER: ConfigureSelf
[DEBUG "routing.hpp":113] checkPrivileges: OEM REQUIRED: OpenBMCHostConsole
[ERROR "routing.hpp":1192] Insufficient Privilege

+ curl -k https://${bmc}/redfish/v1/AccountService/Accounts/user99
{
"@odata.id": "/redfish/v1/AccountService/Accounts/user99",
"@odata.type": "#ManagerAccount.v1_4_0.ManagerAccount",
"AccountTypes": [
"IPMI",
"Redfish",
"WebUI",
"ManagerConsole"
],
"Description": "User Account",
"Enabled": true,
"Id": "user99",
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Operator"
}
},
"Locked": false,
"Locked@Redfish.AllowableValues": [
"false"
],
"Name": "User Account",
"Password": null,
"PasswordChangeRequired": false,
"RoleId": "Operator",
"UserName": "user99"

[INFO "http_connection.hpp":209] Request: 0x21c7c38 HTTP/1.1 GET /console0 ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1265] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "routing.hpp":1084] userName = user99 userRole = priv-operator
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=ipmi
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=redfish
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=ssh
[DEBUG "routing.hpp":1123] IsUserPrivileged: group=web
[DEBUG "routing.hpp":93] checkPrivileges: BASE USER: Login
[DEBUG "routing.hpp":93] checkPrivileges: BASE USER: ConfigureComponents
[DEBUG "routing.hpp":93] checkPrivileges: BASE USER: ConfigureSelf
[DEBUG "routing.hpp":113] checkPrivileges: OEM REQUIRED: OpenBMCHostConsole
[ERROR "routing.hpp":1192] Insufficient Privilege

Related commits:
NOTE: docs, openbmc, obmc-console changes are already merged. bmcweb
and phosphor-user-manager will be merged together.
docs: https://gerrit.openbmc.org/c/openbmc/docs/+/60968
phosphor-user-manager: https://gerrit.openbmc.org/c/openbmc/phosphor-user-manager/+/61583
openbmc: https://gerrit.openbmc.org/c/openbmc/openbmc/+/61582
obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/61581
bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61580

Change-Id: Ia5a33dafc9a76444e6a8e74e752f0f90cb0a31c8
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...

81c4e33018-May-2023 Ed Tanous <edtanous@google.com>

Capture all boost::system::error_codes by ref

Capturing these possibly overloaded values by reference can avoid a copy
in some cases, and it's good to be consistent.

This change was made automatica

Capture all boost::system::error_codes by ref

Capturing these possibly overloaded values by reference can avoid a copy
in some cases, and it's good to be consistent.

This change was made automatically by grep/sed.

Tested: Code compiles.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iafeaca2a5dc52f39753b5a3880419d6bc943f81b

show more ...

a6695a8416-May-2023 Ed Tanous <edtanous@google.com>

Clear json object

nlohmann::json::clear() has different behavior dependent on what the
underlying object is, rather than doing the expected behavior of
completely clearing the json object. This did

Clear json object

nlohmann::json::clear() has different behavior dependent on what the
underlying object is, rather than doing the expected behavior of
completely clearing the json object. This didn't matter because of a
similar bug in http_connection that relied on nlohmann:json::empty()
which is ALSO type dependent, so these worked.

Unfortunately, in 02e01b5108d46720a0b438c0d79952464320d954 we wanted to
allow empty objects, and this bug was exposed.

There are two places where clear() is used, once in Response, which is
clearly not the intent, which is to reset the object to the original
constructed state. The other place we call clear is in Manager, where
we use it to clear incremental results. That was a previous best practice that has been eliminated everywhere else (now we return as
many results with the error as we are able). It has been removed.

Tested: Logging into the webui in firefox no longer core dumps.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic89a037b30fb40c0e6eaeb939cae6e006dd0ffac

show more ...

ad2b2eb916-May-2023 Ed Tanous <edtanous@google.com>

http_connection: Allow empty json objects

Currently http_connection will produce empty body in the response if the
res.jsonValue is empty, including empty array, object.

This makes the output confu

http_connection: Allow empty json objects

Currently http_connection will produce empty body in the response if the
res.jsonValue is empty, including empty array, object.

This makes the output confusing in case a response does contain an empty
object or array.

Change the code to print the json object even if it's empty object or
array.

This patchset was previously reverted because of a regression, but this
regression is fixed in 63529.

Tested on previous commit: With an OEM URL that returns empty array
depending on the system config, the response becomes `[]` instead of
empty.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1d1bf01a5277ff1bc953b15d9fc410e10f941e70

show more ...

eea9c97915-May-2023 Ed Tanous <edtanous@google.com>

Clean up preparePayload

boost::beast::http::message::prepare_payload [1] can throw, which isn't
really the behavior we want (as it throws to the io_context). Luckily,
every part of that function is

Clean up preparePayload

boost::beast::http::message::prepare_payload [1] can throw, which isn't
really the behavior we want (as it throws to the io_context). Luckily,
every part of that function is using public methods, and we can simplify
it.

In past commits, we've worked around this issue:
6295becabb9edba2edb53a3c0dddc13d2ffac8dd

This is an attempt to fix it properly.

[1] https://github.com/boostorg/beast/blob/ae01f0201dbf940cbc32d96d7a78dc584a02ab26/include/boost/beast/http/impl/message.hpp#L398

Redfish service validator passes

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie88ddeecfd226bba75a7659cfb7ddddd38eb27cb

show more ...

ef4c65b724-Apr-2023 Ed Tanous <edtanous@google.com>

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows d

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows doing things like fragments in a single
line instead of multiple. We should prefer it in some cases.

Tested:
Redfish service validator passes.
Spot checks of URLs work as expected.
Unit tests pass.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c

show more ...


/openbmc/bmcweb/README.md
/openbmc/bmcweb/Redfish.md
routing.hpp
utility.hpp
/openbmc/bmcweb/include/google/google_service_root.hpp
/openbmc/bmcweb/redfish-core/include/event_service_manager.hpp
/openbmc/bmcweb/redfish-core/include/utils/sw_utils.hpp
/openbmc/bmcweb/redfish-core/lib/aggregation_service.hpp
/openbmc/bmcweb/redfish-core/lib/cable.hpp
/openbmc/bmcweb/redfish-core/lib/certificate_service.hpp
/openbmc/bmcweb/redfish-core/lib/chassis.hpp
/openbmc/bmcweb/redfish-core/lib/environment_metrics.hpp
/openbmc/bmcweb/redfish-core/lib/ethernet.hpp
/openbmc/bmcweb/redfish-core/lib/fabric_adapters.hpp
/openbmc/bmcweb/redfish-core/lib/hypervisor_system.hpp
/openbmc/bmcweb/redfish-core/lib/log_services.hpp
/openbmc/bmcweb/redfish-core/lib/managers.hpp
/openbmc/bmcweb/redfish-core/lib/memory.hpp
/openbmc/bmcweb/redfish-core/lib/message_registries.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report_definition.hpp
/openbmc/bmcweb/redfish-core/lib/pcie.hpp
/openbmc/bmcweb/redfish-core/lib/pcie_slots.hpp
/openbmc/bmcweb/redfish-core/lib/power_subsystem.hpp
/openbmc/bmcweb/redfish-core/lib/power_supply.hpp
/openbmc/bmcweb/redfish-core/lib/processor.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_sessions.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_v1.hpp
/openbmc/bmcweb/redfish-core/lib/roles.hpp
/openbmc/bmcweb/redfish-core/lib/sensors.hpp
/openbmc/bmcweb/redfish-core/lib/storage.hpp
/openbmc/bmcweb/redfish-core/lib/systems.hpp
/openbmc/bmcweb/redfish-core/lib/task.hpp
/openbmc/bmcweb/redfish-core/lib/thermal_subsystem.hpp
/openbmc/bmcweb/redfish-core/lib/trigger.hpp
/openbmc/bmcweb/redfish-core/lib/update_service.hpp
/openbmc/bmcweb/redfish-core/lib/virtual_media.hpp
/openbmc/bmcweb/subprojects/boost.wrap
/openbmc/bmcweb/test/http/utility_test.cpp
b84e729d11-May-2023 Ed Tanous <edtanous@google.com>

Revert "http_connection: Allow empty json objects"

This reverts commit 02e01b5108d46720a0b438c0d79952464320d954.

This commit is being reverted because it causes login failures on
Firefox browsers.

Revert "http_connection: Allow empty json objects"

This reverts commit 02e01b5108d46720a0b438c0d79952464320d954.

This commit is being reverted because it causes login failures on
Firefox browsers. This commit originally was added with the idea that
it did not fix anything on upstream, but made some peoples forks better.

It appears to have broken some upstream things, so the right thing to do
is to revert it until those breakages can be understood.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I04de84fca1a8de657f6941653f2a3e595ee725d5

show more ...


http_connection.hpp
/openbmc/bmcweb/include/ibm/locks.hpp
/openbmc/bmcweb/include/ibm/management_console_rest.hpp
/openbmc/bmcweb/include/openbmc_dbus_rest.hpp
/openbmc/bmcweb/include/persistent_data.hpp
/openbmc/bmcweb/redfish-core/include/redfish_aggregator.hpp
/openbmc/bmcweb/redfish-core/include/server_sent_events.hpp
/openbmc/bmcweb/redfish-core/include/utils/collection.hpp
/openbmc/bmcweb/redfish-core/include/utils/sw_utils.hpp
/openbmc/bmcweb/redfish-core/lib/account_service.hpp
/openbmc/bmcweb/redfish-core/lib/aggregation_service.hpp
/openbmc/bmcweb/redfish-core/lib/certificate_service.hpp
/openbmc/bmcweb/redfish-core/lib/chassis.hpp
/openbmc/bmcweb/redfish-core/lib/ethernet.hpp
/openbmc/bmcweb/redfish-core/lib/event_service.hpp
/openbmc/bmcweb/redfish-core/lib/hypervisor_system.hpp
/openbmc/bmcweb/redfish-core/lib/log_services.hpp
/openbmc/bmcweb/redfish-core/lib/managers.hpp
/openbmc/bmcweb/redfish-core/lib/message_registries.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report_definition.hpp
/openbmc/bmcweb/redfish-core/lib/pcie.hpp
/openbmc/bmcweb/redfish-core/lib/power.hpp
/openbmc/bmcweb/redfish-core/lib/processor.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_sessions.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_v1.hpp
/openbmc/bmcweb/redfish-core/lib/roles.hpp
/openbmc/bmcweb/redfish-core/lib/sensors.hpp
/openbmc/bmcweb/redfish-core/lib/service_root.hpp
/openbmc/bmcweb/redfish-core/lib/storage.hpp
/openbmc/bmcweb/redfish-core/lib/systems.hpp
/openbmc/bmcweb/redfish-core/lib/trigger.hpp
/openbmc/bmcweb/redfish-core/lib/update_service.hpp
/openbmc/bmcweb/redfish-core/src/error_messages.cpp
/openbmc/bmcweb/test/include/ibm/lock_test.cpp
/openbmc/bmcweb/test/redfish-core/lib/chassis_test.cpp
/openbmc/bmcweb/test/redfish-core/lib/service_root_test.cpp
65a176cd12-May-2023 Patrick Williams <patrick@stwcx.xyz>

fix clang-tidy warnings with unreachable returns

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/verb.hpp:51:12: error: 'return' will never be executed [clang-diagnostic-unreachable-c

fix clang-tidy warnings with unreachable returns

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/verb.hpp:51:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors]
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/utility.hpp:99:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors]
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/include/utils/query_param.hpp:272:13: error: 'break' will never be executed [clang-diagnostic-unreachable-code-break,-warnings-as-errors]
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia74f4fb4f34875097d1ef04b26e40908cc175088

show more ...

a232343d12-May-2023 Patrick Williams <patrick@stwcx.xyz>

http-app: fix unused macro clang-tidy warning

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/app.hpp:27:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-error

http-app: fix unused macro clang-tidy warning

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/app.hpp:27:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-errors]
#define BMCWEB_ROUTE(app, url)
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I49b6239d7d5f31c52af6f6e5b0bc57be22a299b5

show more ...

eb8a399812-May-2023 Patrick Williams <patrick@stwcx.xyz>

http-logging: fix clang-tidy warnings

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/logging.hpp:132:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-errors]

http-logging: fix clang-tidy warnings

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/logging.hpp:132:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-errors]
#define BMCWEB_LOG_CRITICAL
```

Add NOLINTBEGIN/NOLINTEND guards around the whole of the macro
definitions because there are now multiple clang-tidy warning types
that call out this behavior, but we want it in this case.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iac2ee839999f36424ca6dfed212d0bad0a2f3ae5

show more ...

3d7fc71e10-May-2023 Patrick Williams <patrick@stwcx.xyz>

mutual-tls: fix clang-tidy warning

```
../http/mutual_tls.hpp:77:35: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
unsigned char usageChar = usage->data[i];
```

Signed-off-by:

mutual-tls: fix clang-tidy warning

```
../http/mutual_tls.hpp:77:35: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
unsigned char usageChar = usage->data[i];
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icc6905f31fdd54b683fe7807eb72e9b78437b2d1

show more ...

89492a1510-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/bmcweb/.clang-format
app.hpp
http_client.hpp
http_connection.hpp
http_response.hpp
http_server.hpp
logging.hpp
routing.hpp
utility.hpp
websocket.hpp
/openbmc/bmcweb/include/async_resp.hpp
/openbmc/bmcweb/include/authentication.hpp
/openbmc/bmcweb/include/dbus_utility.hpp
/openbmc/bmcweb/include/hostname_monitor.hpp
/openbmc/bmcweb/include/human_sort.hpp
/openbmc/bmcweb/include/ibm/locks.hpp
/openbmc/bmcweb/include/ibm/management_console_rest.hpp
/openbmc/bmcweb/include/login_routes.hpp
/openbmc/bmcweb/include/multipart_parser.hpp
/openbmc/bmcweb/include/openbmc_dbus_rest.hpp
/openbmc/bmcweb/include/sessions.hpp
/openbmc/bmcweb/include/ssl_key_handler.hpp
/openbmc/bmcweb/redfish-core/include/event_service_manager.hpp
/openbmc/bmcweb/redfish-core/include/gzfile.hpp
/openbmc/bmcweb/redfish-core/include/redfish_aggregator.hpp
/openbmc/bmcweb/redfish-core/include/utils/json_utils.hpp
/openbmc/bmcweb/redfish-core/include/utils/query_param.hpp
/openbmc/bmcweb/redfish-core/include/utils/sw_utils.hpp
/openbmc/bmcweb/redfish-core/include/utils/time_utils.hpp
/openbmc/bmcweb/redfish-core/lib/account_service.hpp
/openbmc/bmcweb/redfish-core/lib/certificate_service.hpp
/openbmc/bmcweb/redfish-core/lib/ethernet.hpp
/openbmc/bmcweb/redfish-core/lib/event_service.hpp
/openbmc/bmcweb/redfish-core/lib/fabric_adapters.hpp
/openbmc/bmcweb/redfish-core/lib/health.hpp
/openbmc/bmcweb/redfish-core/lib/hypervisor_system.hpp
/openbmc/bmcweb/redfish-core/lib/log_services.hpp
/openbmc/bmcweb/redfish-core/lib/managers.hpp
/openbmc/bmcweb/redfish-core/lib/memory.hpp
/openbmc/bmcweb/redfish-core/lib/message_registries.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report_definition.hpp
/openbmc/bmcweb/redfish-core/lib/network_protocol.hpp
/openbmc/bmcweb/redfish-core/lib/pcie.hpp
/openbmc/bmcweb/redfish-core/lib/pcie_slots.hpp
/openbmc/bmcweb/redfish-core/lib/power.hpp
/openbmc/bmcweb/redfish-core/lib/processor.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_sessions.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_util.hpp
/openbmc/bmcweb/redfish-core/lib/redfish_v1.hpp
/openbmc/bmcweb/redfish-core/lib/sensors.hpp
/openbmc/bmcweb/redfish-core/lib/storage.hpp
/openbmc/bmcweb/redfish-core/lib/systems.hpp
/openbmc/bmcweb/redfish-core/lib/task.hpp
/openbmc/bmcweb/redfish-core/lib/update_service.hpp
/openbmc/bmcweb/redfish-core/lib/virtual_media.hpp
/openbmc/bmcweb/src/boost_asio.cpp
/openbmc/bmcweb/src/boost_asio_ssl.cpp
/openbmc/bmcweb/src/boost_beast.cpp
/openbmc/bmcweb/src/boost_url.cpp
/openbmc/bmcweb/src/ssl_key_handler_test.cpp
/openbmc/bmcweb/test/http/verb_test.cpp
/openbmc/bmcweb/test/include/dbus_utility_test.cpp
/openbmc/bmcweb/test/include/google/google_service_root_test.cpp
/openbmc/bmcweb/test/include/human_sort_test.cpp
/openbmc/bmcweb/test/redfish-core/include/privileges_test.cpp
/openbmc/bmcweb/test/redfish-core/include/redfish_aggregator_test.cpp
/openbmc/bmcweb/test/redfish-core/include/utils/hex_utils_test.cpp
/openbmc/bmcweb/test/redfish-core/include/utils/query_param_test.cpp
/openbmc/bmcweb/test/redfish-core/lib/chassis_test.cpp
662aa6e310-Jan-2023 Myung Bae <myungbae@us.ibm.com>

Update Logging option for the setting log level

In order to be able to more easily debug bmcweb related issue,
a new meson option is added to set a specific logging level
Which generates the targete

Update Logging option for the setting log level

In order to be able to more easily debug bmcweb related issue,
a new meson option is added to set a specific logging level
Which generates the targeted logging traces rather than all of
debug traces.

The current option -Dbmcweb-logging which can be either
disabled or enabled is changed to allow to set the log level
for the specific level traces (e.g. error or critical traces)
to be written to the journal.

-Dbmcweb-logging=<log-level>

where <log-level> can be disabled, enabled, debug, info,
warning, error, or critical.

- `disabled`: Turns off all bmcweb log traces.
- `enabled` : treated as `debug`
- Other option can be described in
[Logging Levels](DEVELOPING.md).

For an example, to enable only 'error', 'critical' log
entries, bmcweb can be built with

-Dbmcweb-logging=error

Testing:
- Verified that only the specific logs (e.g. error and
critical logs) were displayed by compiling bmcweb with the
specific bmcweb-logging level.

Change-Id: I522ca26700ea420fee1a5cf688d3e8c6661f2f55
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

28f4b38710-Apr-2023 Ed Tanous <edtanous@google.com>

Remove nameStr from router

It isn't used anywhere in the code, so it can be removed, and the router
simplified. These common data structures have caused problems, in that
they're not copied to chil

Remove nameStr from router

It isn't used anywhere in the code, so it can be removed, and the router
simplified. These common data structures have caused problems, in that
they're not copied to child handlers, and cause bugs like #249.

Tested: Redfish service validator passes. Basic sanity tests of both
static file routes such as $metadata (which use DynamicRule) as well as
method routes, such as /redfish/v1, return valid data.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I93ad74581912e18ee5db9aaa9ecdaf08ed765418

show more ...

15a42df009-Feb-2023 Ed Tanous <edtanous@google.com>

Remove number support from the router

The router historically came from crow. Crow supported wildcards of
<int>, <float>, and <double>. bmcweb doesn't use them, nor should it in
basically any case

Remove number support from the router

The router historically came from crow. Crow supported wildcards of
<int>, <float>, and <double>. bmcweb doesn't use them, nor should it in
basically any case, as we now have explicit 404 handling.

This commit removes them. This amounts to about -450 lines of code, but
it's some of the scarier code we have, some of it existing in the
namespace "black_magic". Reducing the brain debt for people working in
this subsystem seems worthwhile. There is no case in the future where
we would use integer based url parameters.

Tested: Redfish service validator passes. Should be good enough
coverage for a code removal.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I34add8df7d3486952474ca7ec3dc6be990c50ed0

show more ...

02e01b5119-Apr-2023 Lei YU <yulei.sh@bytedance.com>

http_connection: Allow empty json objects

Currently http_connection will produce empty body in the response if the
res.jsonValue is empty, including empty array, object.

This makes the output confu

http_connection: Allow empty json objects

Currently http_connection will produce empty body in the response if the
res.jsonValue is empty, including empty array, object.

This makes the output confusing in case a response does contain an empty
object or array.

Change the code to print the json object even if it's empty object or
array, so that the output is consistent with the `res.jsonValue`.

Tested: With an OEM URL that returns empty array depending on the system
config, the response becomes `[]` instead of empty.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ie97378a2cffce7b1fd6586a56b6cfa7d5c476dc1

show more ...

9d192c7410-Apr-2023 Ed Tanous <edtanous@google.com>

Copy privilegeset into websocket rule

Resolves #249

Tested: Running websockets now shows rules being applied
```
Apr 10 20:26:35 p10bmc bmcweb[745]: (2023-04-10 20:26:35) [INFO "http_connection.hpp

Copy privilegeset into websocket rule

Resolves #249

Tested: Running websockets now shows rules being applied
```
Apr 10 20:26:35 p10bmc bmcweb[745]: (2023-04-10 20:26:35) [INFO "http_connection.hpp":209] Request: 0x11e3248 HTTP/1.1 GET /console0 ::ffff:X.XX.XX.XXX
|
Apr 10 20:26:35 p10bmc bmcweb[745]: (2023-04-10 20:26:35) [DEBUG "routing.hpp":1460] Matched rule (upgrade) '/console0' 1 / 2
Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":1299] userName = admin userRole = priv-admin
Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":101] checkPrivileges: Active BASE priv: ConfigureManager <<<<<<
Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":101] checkPrivileges: Active BASE priv: ConfigureComponents <<<<<<
Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [ERROR "routing.hpp":1361] isUserPrivileged: URL: /console0 IsPrivelegeSetEmpty: 0 Username: admin
```

Signed-off-by: Ed Tanous <edtanous@google.com>
Tested-by: Ninad Palsule <ninadpalsule@us.ibm.com>
Change-Id: Ia2eae1847822b50a425afd2e5e13b528393aa7ad

show more ...

e628df8604-Apr-2023 Gunnar Mills <gmills@us.ibm.com>

Fix websocket csrf checking

https://github.com/openbmc/bmcweb/commit/f8aa3d2704d3897eb724dab9ac596af8b1f0e33e
(4/15/20) added CSRF check into websockets but later setting cookieAuth
to true was remo

Fix websocket csrf checking

https://github.com/openbmc/bmcweb/commit/f8aa3d2704d3897eb724dab9ac596af8b1f0e33e
(4/15/20) added CSRF check into websockets but later setting cookieAuth
to true was removed so this session->cookieAuth is always false.
https://github.com/openbmc/bmcweb/commit/3909dc82a003893812f598434d6c4558107afa28
(7/15/20).

2 choices here add back this cookieAuth=true when cookie auth is used or
remove this "if cookieAuth" and do this check anytime
BMCWEB_INSECURE_DISABLE_CSRF_PREVENTION isn't enabled.

Really we shouldn't support any other auth on websockets so maybe
if (!session->cookieAuth){
unauthorized;
}
if go with the first choice. Went with the 2nd choice because cleaner.

This checking is a bit weird because it uses protocol for csrf checking.
https://github.com/openbmc/webui-vue/blob/b63e9d9a70dabc4c9a7038f7727fca6bd17d940a/src/views/Operations/SerialOverLan/SerialOverLanConsole.vue#L98

Tested: Before could log in to webui-vue, delete the XSRF-TOKEN but
still connect to the host console. After if deleted the XSRF-TOKEN
(browser dev tools), the websocket does not connect. Don't have a system
with KVM, VM enabled so wasn't able to check those but the webui-vue
code for them looks to pass the token. The webui-vue host console works
the same as before if you aren't messing with the XSRF-TOKEN.

Change-Id: Ibd5910587648f68809c7fd518bcf5a0bcf8cf329
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...

863c1c2e21-Feb-2022 Ed Tanous <edtanous@google.com>

nbd proxy and websocket cleanups

As-written, the nbd (and all websocket daemons) suffer from a problem
where there is no way to apply socket backpressure, so in certain
conditions, it's trivial to r

nbd proxy and websocket cleanups

As-written, the nbd (and all websocket daemons) suffer from a problem
where there is no way to apply socket backpressure, so in certain
conditions, it's trivial to run the BMC out of memory on a given
message. This is a problem.

This commit implements the idea of an incremental callback handler, that
accepts a callback function to be run when the processing of the message
is complete. This allows applying backpressure on the socket, which in
turn, should provide pressure back to the client, and prevent buffering
crashes on slow connections, or connections with high latency.

Tested: NBD proxy not upstream, no way to test. No changes made to
normal websocket flow.

Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3f116cc91eeadc949579deacbeb2d9f5e0f4fa53

show more ...

12345678910>>...18