History log of /openbmc/bmcweb/include/ (Results 151 – 175 of 694)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a115d87f12-Jun-2023 Ed Tanous <edtanous@google.com>

Add missing pragma once

This header didn't include a pragma once. Fix it.

Tested: Code compiles

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

994fd86a06-Jun-2023 Ed Tanous <edtanous@google.com>

Fix hack on Set-Cookie

This is one that I couldn't figure out for a while. Turns out that
fields has both a set() and an insert() method. Whereas set() replaces,
insert() appends, which is what we

Fix hack on Set-Cookie

This is one that I couldn't figure out for a while. Turns out that
fields has both a set() and an insert() method. Whereas set() replaces,
insert() appends, which is what we want in this case.

This allows us to call the actual methods several times, instead of
essentially string injecting our own code, which should make it clearer.

At the same time, there was one unit test that was structured such that
it was using addHeader to clear a header, so this commit adds an
explicit "clearHeader()" method, so we can be explicit.

Tested:
Logging into the webui in chrome (which uses POST /login) shows:
401 with no cookie header if the incorrect password is used
200 with 2 Set-Cookie headers set:
Set-Cookie:
SESSION=<session tag>; SameSite=Strict; Secure; HttpOnly
Set-Cookie:
XSRF-TOKEN=<token tag>; SameSite=Strict; Secure

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

show more ...

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

Break up router into separate files

The router is a giant behemoth. Start breaking it down into pieces.

Tested: Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Ch

Break up router into separate files

The router is a giant behemoth. Start breaking it down into pieces.

Tested: Redfish service validator passes.

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

show more ...


/openbmc/bmcweb/Redfish.md
/openbmc/bmcweb/http/routing.hpp
/openbmc/bmcweb/http/routing/baserule.hpp
/openbmc/bmcweb/http/routing/dynamicrule.hpp
/openbmc/bmcweb/http/routing/ruleparametertraits.hpp
/openbmc/bmcweb/http/routing/sserule.hpp
/openbmc/bmcweb/http/routing/taggedrule.hpp
/openbmc/bmcweb/http/routing/websocketrule.hpp
dbus_privileges.hpp
/openbmc/bmcweb/redfish-core/include/redfish.hpp
/openbmc/bmcweb/redfish-core/include/schemas.hpp
/openbmc/bmcweb/redfish-core/include/server_sent_events.hpp
/openbmc/bmcweb/redfish-core/include/utils/collection.hpp
/openbmc/bmcweb/redfish-core/include/utils/hex_utils.hpp
/openbmc/bmcweb/redfish-core/include/utils/pcie_util.hpp
/openbmc/bmcweb/redfish-core/include/utils/sw_utils.hpp
/openbmc/bmcweb/redfish-core/lib/chassis.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/led.hpp
/openbmc/bmcweb/redfish-core/lib/log_services.hpp
/openbmc/bmcweb/redfish-core/lib/manager_diagnostic_data.hpp
/openbmc/bmcweb/redfish-core/lib/managers.hpp
/openbmc/bmcweb/redfish-core/lib/memory.hpp
/openbmc/bmcweb/redfish-core/lib/pcie.hpp
/openbmc/bmcweb/redfish-core/lib/processor.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/update_service.hpp
/openbmc/bmcweb/redfish-core/lib/virtual_media.hpp
/openbmc/bmcweb/scripts/update_schemas.py
/openbmc/bmcweb/static/redfish/v1/$metadata/index.xml
/openbmc/bmcweb/test/redfish-core/include/utils/hex_utils_test.cpp
c51a58ee27-Mar-2023 Ed Tanous <edtanous@google.com>

Remove urlEncode

All new uses should be using boost::urls::url now. This was the last
usage.

Tested: Logged into webui, and observed the correct URL behavior.
In browser window /foobar
Forwarded t

Remove urlEncode

All new uses should be using boost::urls::url now. This was the last
usage.

Tested: Logged into webui, and observed the correct URL behavior.
In browser window /foobar
Forwarded to /?next=/foobar#/login

Which is correct.

Note, this is different behavior slightly than before. It was found
that the URI precedence goes query string THEN fragment, rather than the
other way around that we had it. This was flagged when moving over to
boost url structures.

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

show more ...

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

Remove unused const-cast

std::string::data now has a non-const variation in c++20. This allows
us to remove a NOLINT and follow the standard.

Tested: Login succeeds.

Change-Id: Ie49932fae8efa90af

Remove unused const-cast

std::string::data now has a non-const variation in c++20. This allows
us to remove a NOLINT and follow the standard.

Tested: Login succeeds.

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

show more ...

7b8270cd06-Jun-2023 Ed Tanous <edtanous@google.com>

Remove extra character

This extra quote snuch into the comment somehow. Fix it.

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

052bcbf430-May-2023 Ninad Palsule <ninad@linux.ibm.com>

Add support for multiple consoles

This drop adds support for multiple consoles. The following changes are
made to achieve this.
- Kept the "/console0" route for backward compatibility
- Added a new

Add support for multiple consoles

This drop adds support for multiple consoles. The following changes are
made to achieve this.
- Kept the "/console0" route for backward compatibility
- Added a new route "/console/<str>" to support multiple consoles. All
new consoles must use this route string.

Testing:
- Make sure that old console path /console0 is working.
[INFO "http_connection.hpp":209] Request: 0x1bc2e60 HTTP/1.1
GET /console0 ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "obmc_console.hpp":212] Connection 0x1bdb67c opened
[DEBUG "obmc_console.hpp":241] Console Object path =
/xyz/openbmc_project/console/default service =
xyz.openbmc_project.Console.default Request target = /console0
[DEBUG "obmc_console.hpp":198] Console web socket path: /console0
Console unix FD: 12 duped FD: 13
[DEBUG "obmc_console.hpp":82] Reading from socket
[DEBUG "obmc_console.hpp":162] Remove connection 0x1bdb67c from
obmc console

- Make sure that new path for default console working
[INFO "http_connection.hpp":209] Request: 0x1bd76a8 HTTP/1.1
GET /console/default ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console/<str>'
1 / 2
[DEBUG "obmc_console.hpp":212] Connection 0x1baf82c opened
[DEBUG "obmc_console.hpp":241] Console Object path =
/xyz/openbmc_project/console/default service =
xyz.openbmc_project.Console.default Request
target = /console/default
[DEBUG "obmc_console.hpp":198] Console web socket path:
/console/default Console unix FD: 12 duped FD: 13
[DEBUG "obmc_console.hpp":82] Reading from socket
[INFO "obmc_console.hpp":154] Closing websocket. Reason:
[DEBUG "obmc_console.hpp":162] Remove connection 0x1baf82c from
obmc console

- Make sure that path for hypervisor console is working.
[INFO "http_connection.hpp":209] Request: 0x1bc2e60 HTTP/1.1
GET /console/hypervisor ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console/<str>'
1 / 2
[DEBUG "obmc_console.hpp":212] Connection 0x1bc5234 opened
[DEBUG "obmc_console.hpp":241] Console Object path =
/xyz/openbmc_project/console/hypervisor service =
xyz.openbmc_project.Console.hypervisor Request
target = /console/hypervisor
[DEBUG "obmc_console.hpp":198] Console web socket path:
/console/hypervisor Console unix FD: 12 duped FD: 13
[DEBUG "obmc_console.hpp":82] Reading from socket
[INFO "obmc_console.hpp":154] Closing websocket. Reason:
[DEBUG "obmc_console.hpp":162] Remove connection 0x1bc5234 from
obmc console

- Make sure that bad console path is failing properly due to DBUS error.
[INFO "http_connection.hpp":209] Request: 0x1bd76a8 HTTP/1.1
GET /console/badconsoleid ::ffff:x.x.xx.xxx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console/<str>'
1 / 2
[DEBUG "obmc_console.hpp":212] Connection 0x1bdb67c opened
[DEBUG "obmc_console.hpp":241] Console Object path =
/xyz/openbmc_project/console/badconsoleid service =
xyz.openbmc_project.Console.badconsoleid Request
target = /console/badconsoleid
[ERROR "obmc_console.hpp":174] Failed to call console Connect()
method DBUS error: No route to host

Change-Id: I9b617bc51e3ddc605dd7f4d213c805d05d2cfead
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

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 ...

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 ...

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

Simplify obmc console buffers

Backpressure on incoming bytes helps both to simplify the layering of
the console, as well as prevent some cases of OOM crashes.

Similar to what we did with nbd_proxy,

Simplify obmc console buffers

Backpressure on incoming bytes helps both to simplify the layering of
the console, as well as prevent some cases of OOM crashes.

Similar to what we did with nbd_proxy, move obmc console over to the new
sendEx interface, allowing for backpressure, and fixed size std::array
buffers.

Tested:
Made sure single console can see the data.
Made sure two consoles can see the data.

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

show more ...

f948d81025-May-2023 Ninad Palsule <ninad@linux.ibm.com>

Introduce ConsoleHandler class under obmc_console

Added new ConsoleHandler class to prepare for the multiple consoles
support. All global fields are moved to the ConsoleHandler class and a
new globa

Introduce ConsoleHandler class under obmc_console

Added new ConsoleHandler class to prepare for the multiple consoles
support. All global fields are moved to the ConsoleHandler class and a
new global map added to remember the ConsoleHandler for each console
path. There is single ConsoleHandler per connection so we don't need
session map per route. There is a limit added for max number of
connection allowed to avoid any service attacks.

Testing:
- Make sure that single console works fine and data is seen on the
console.
- Make sure that multiple consoles of type host console are created
and data is seen on all consoles. Also using traces made sure
that new handlers are destroyed.

Traces: Traces shows that multiple consoles active and later destroyed.
[INFO "http_connection.hpp":209] Request: 0x24bb790 HTTP/1.1 GET
/console0 ::ffff:x.xx.xxx.xx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "obmc_console.hpp":238] Connection 0x24eb424 opened
[DEBUG "obmc_console.hpp":150] Obmc handler 0x24c18fc added 1 for path
0x24eb424
[DEBUG "obmc_console.hpp":257] Console Object path =
/xyz/openbmc_project/console/default service =
xyz.openbmc_project.Console.default Request target = /console0
[DEBUG "obmc_console.hpp":224] Console web socket path: /console0
Console unix FD: 13 duped FD: 14
[DEBUG "obmc_console.hpp":44] Outbuffer empty. Bailing out
[INFO "http_connection.hpp":209] Request: 0x265d740 HTTP/1.1 GET
/console0 ::ffff:x.xx.xxx.xx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "obmc_console.hpp":238] Connection 0x2661de4 opened
[DEBUG "obmc_console.hpp":150] Obmc handler 0x25e69ac added 1 for path
0x2661de4
[DEBUG "obmc_console.hpp":257] Console Object path =
/xyz/openbmc_project/console/default service =
xyz.openbmc_project.Console.default Request target = /console0
[DEBUG "obmc_console.hpp":224] Console web socket path: /console0
Console unix FD: 19 duped FD: 20
[DEBUG "obmc_console.hpp":44] Outbuffer empty. Bailing out
[INFO "http_connection.hpp":209] Request: 0x265d740 HTTP/1.1 GET
/console0 ::ffff:x.xx.xxx.xx
[DEBUG "routing.hpp":1240] Matched rule (upgrade) '/console0' 1 / 2
[DEBUG "obmc_console.hpp":238] Connection 0x25f1fdc opened
[DEBUG "obmc_console.hpp":150] Obmc handler 0x26ff22c added 1 for path
0x25f1fdc
[DEBUG "obmc_console.hpp":257] Console Object path =
/xyz/openbmc_project/console/default service =
xyz.openbmc_project.Console.default Request target = /console0
[DEBUG "obmc_console.hpp":224] Console web socket path: /console0
Console unix FD: 19 duped FD: 21
[DEBUG "obmc_console.hpp":44] Outbuffer empty. Bailing out
[INFO "obmc_console.hpp":177] Closing websocket. Reason:
[DEBUG "obmc_console.hpp":184] Remove connection 0x25f1fdc from obmc
handler 0x26ff22c for path /console0
[INFO "obmc_console.hpp":177] Closing websocket. Reason:
[DEBUG "obmc_console.hpp":184] Remove connection 0x2661de4 from obmc
handler 0x25e69ac for path /console0
[INFO "obmc_console.hpp":177] Closing websocket. Reason:
[DEBUG "obmc_console.hpp":184] Remove connection 0x24eb424 from obmc
handler 0x24c18fc for path /console0

Change-Id: I77a58a3a186e87611219aed90b221f9b8be7fa2f
Signed-off-by: Ninad Palsule <ninad@linux.ibm.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 ...

1d86960819-Dec-2022 Ed Tanous <edtanous@google.com>

Add maybe_unused to possibly unused argument

There are cases in this method where if CSRF protection is disabled,
this argument will not be used, and will trigger a compile error. This
commit fixes

Add maybe_unused to possibly unused argument

There are cases in this method where if CSRF protection is disabled,
this argument will not be used, and will trigger a compile error. This
commit fixes the compile error.

Tested: Code compiles with CSRF disabled option set.

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

show more ...

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

Make all std::regex instances static

Per [1] we really shouldn't be using regex. In the cases we do, it's a
HUUUUUGE performance benefit to be compiling the regex ONCE.

The only downside is a slig

Make all std::regex instances static

Per [1] we really shouldn't be using regex. In the cases we do, it's a
HUUUUUGE performance benefit to be compiling the regex ONCE.

The only downside is a slight increase in memory usage.

[1]: https://github.com/openbmc/bmcweb/issues/176

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

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 ...

a8d4b8e610-Apr-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Use console information from DBUS

This drop is a preparation of supporting multiple consoles in bmcweb.
In this drop we will hook up the new DBUS interface to get the unix
socket file descriptor for

Use console information from DBUS

This drop is a preparation of supporting multiple consoles in bmcweb.
In this drop we will hook up the new DBUS interface to get the unix
socket file descriptor for existing host console. At this time bmcweb
only allows host console.

This drop includes following bmcweb changes:
- The default console leaf node is set to "default" by the obmc-console
- Currently the URL is still maintained to /console0 for GUI
compatibility. In future, it will be changed to /console/<str>
where <str> could be any string which represents the console id.
- In the obmc routing function, query the console DBUS interface for
all available consoles. If the object leaf matches with the target
string, then create socket and assign the file descriptor returned
by the DBUS console.

[INFO "http_connection.hpp":209] Request: 0x1b8c608 HTTP/1.1 GET /console0
::ffff:x.xxx.xx.xxx
|
[DEBUG "routing.hpp":1440] Matched rule (upgrade) '/console0' 1 / 2
|
[DEBUG "obmc_console.hpp":247] Connection 0x13e3c8c opened
[DEBUG "obmc_console.hpp":268] Console Object path = \
/xyz/openbmc_project/console/default Request target = /console0
[DEBUG "obmc_console.hpp":230] Looking up unixFD for Service \
xyz.openbmc_project.Console.default Path /xyz/openbmc_project/console/default
[DEBUG "obmc_console.hpp":157] Console web socket path: /console0 Console\
unix FD: 12 duped FD: 13

Testing:
Make sure that console open is working for /console0 on rainier machine

Related commits:
1) phosphor-dbus-interface: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61486
2) obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/62496
3) bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62525

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

show more ...

f19ab44a07-Mar-2022 Szymon Dompke <szymon.dompke@intel.com>

Add Links/Triggers to MetricReportDefinition

This change is adding Triggers property to Links when GET is called on
MetricReportDefinition. It contains array of @odata.id pointing to
Trigger resourc

Add Links/Triggers to MetricReportDefinition

This change is adding Triggers property to Links when GET is called on
MetricReportDefinition. It contains array of @odata.id pointing to
Trigger resource if it is also linking to given MRD.

Testing done:
- Links/Trigger property is returned by GET request on
/redfish/v1/TelemetryService/MetricReportDefinitions/<str>/

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5accf4b50324437b0b185003200078ad2c7020b0

show more ...

479e899d17-Jun-2021 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Switched bmcweb to use new telemetry service API

Added support for multiple MetricProperties. Added support for new
parameters: CollectionTimeScope, CollectionDuration. ReadingParameters
was not yet

Switched bmcweb to use new telemetry service API

Added support for multiple MetricProperties. Added support for new
parameters: CollectionTimeScope, CollectionDuration. ReadingParameters
was not yet changed in telemetry backend, instead temporary property
ReadingParametersFutureVersion was introduced. Once bmcweb is adapted to
use ReadingParametersFutureVersion this property will be renamed in
backend to ReadingParameters. Then bmcweb will change to use
ReadingParameters. Then ReadingParametersFutureVersion will be removed
from backend and everything will be exactly like described in
phosphor-dbus-interfaces without introducing breaking changes.

Related change in phosphor-dbus-interfaces [1], [2]. This change needs
to be bumped together with [3].

Tested:
- It is possible to create MetricReportDefinitions with multiple
MetricProperties.
- Stub values for new parameters are correctly passed to telemetry
service.
- All existing telemetry service functionalities remain unchanged.

[1]: https://github.com/openbmc/phosphor-dbus-interfaces/commit/4f9c09144b60edc015291d2c120fc5b33aa0bec2
[2]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/60750
[3]: https://gerrit.openbmc.org/c/openbmc/telemetry/+/58229

Change-Id: I2cd17069e3ea015c8f5571c29278f1d50536272a
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

show more ...


/openbmc/bmcweb/Redfish.md
dbus_utility.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/metric_report.hpp
/openbmc/bmcweb/redfish-core/lib/metric_report_definition.hpp
/openbmc/bmcweb/redfish-core/lib/telemetry_service.hpp
/openbmc/bmcweb/scripts/update_schemas.py
/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
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 ...

17b4d6b118-May-2023 Jason M. Bills <jason.m.bills@intel.com>

Fix integer display in HTML

When displaying an integer in HTML, the number of characters is off by 1
causing the numbers to display without the last digit.

This is because the pointer into numberbu

Fix integer display in HTML

When displaying an integer in HTML, the number of characters is off by 1
causing the numbers to display without the last digit.

This is because the pointer into numberbuffer gets initially advanced by
the number of characters which ends up being one too many.

For example, the buffer pointer is pointing at numberbuffer[0]. If we
display a 4 digit number, we advance by 4, so it ends up pointing at
numberbuffer[4] for the last digit. In the end, we return only the
number of characters which is numberbuffer[0-3] cutting off the last
digit.

This changes the pointer to advance by one less than the number of
digits, so the buffer fills from numberbuffer[3] and returns all 4
digits.

Tested:
Read redfish/v1/SessionService and confirmed that the "SessionTimeout"
value displays the full value of 1800.

Change-Id: Iaa974d7a41352fd9a15024ccf04c5926a4efe7a2
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>

show more ...

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

Remove bad include from dbus singleton

Neither of these files make use of io_context, so they shouldn't be here

Tested: Code compiles

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

Remove bad include from dbus singleton

Neither of these files make use of io_context, so they shouldn't be here

Tested: Code compiles

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

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
/openbmc/bmcweb/http/http_connection.hpp
/openbmc/bmcweb/http/routing.hpp
/openbmc/bmcweb/http/utility.hpp
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/service_root.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
/openbmc/bmcweb/test/redfish-core/lib/service_root_test.cpp
b2ba307212-May-2023 Patrick Williams <patrick@stwcx.xyz>

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

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

show more ...

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

ibm-locks: shut up clang-tidy by disabling code

There is code in ibm/locks that has had clang-tidy warnings disabled
for a while due to multiple safety and endianness issues. The code
has not been

ibm-locks: shut up clang-tidy by disabling code

There is code in ibm/locks that has had clang-tidy warnings disabled
for a while due to multiple safety and endianness issues. The code
has not been fixed in a while and with clang-16 it is unable to be
exempted further. Disable it until someone who cares can fix this
in the proper way.

```
../include/ibm/locks.hpp:522:14: error: 'p' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
uint8_t* p = reinterpret_cast<uint8_t*>(&resourceId1);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/ibm/locks.hpp:527:25: note: used in buffer access here
uint8_t pPosition = p[position];
^
../include/ibm/locks.hpp:524:14: error: 'q' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
uint8_t* q = reinterpret_cast<uint8_t*>(&resourceId2);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/ibm/locks.hpp:529:25: note: used in buffer access here
uint8_t qPosition = q[position];
```

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

show more ...

12345678910>>...28