#
58d3aabc |
| 19-Feb-2025 |
Janet Adkins <janeta@us.ibm.com> |
Enable port 18080
The commit [1] altered how sockets are created and inadvertently removed the default port 18080. We use this port extensively in development. The bmcweb documentation describes the
Enable port 18080
The commit [1] altered how sockets are created and inadvertently removed the default port 18080. We use this port extensively in development. The bmcweb documentation describes the port 18080 for this use. [2] Adding back the default port 18080.
The commit [1] added meson build options for adding additional ports. In attempting to enable port 18080 using that mechanism I ran into various build errors when additional-ports has a value. I've corrected the config/meson.build file to address those errors. These changes are not necessary to re-enable port 18080 but worth fixing anyway.
Note: Meson defines arrays as containing strings so there is no to_string() method for the array member. [3] ``` ../../../../../../workspace/sources/bmcweb/config/meson.build:137:39: ERROR: Unknown method "to_string" in object <[StringHolder] holds [str]: '18080'> of type StringHolder. ```
Tested: - Started bmcweb from /tmp and was able to connect through port 18080. Log shows: ``` [DEBUG app.hpp:111] Got 0 sockets to open [INFO app.hpp:150] Starting webserver on port 18080 ```
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/35265 [2] https://github.com/openbmc/bmcweb/blob/cc67d0a0fed101c930b334a583d9ca9b222ceb77/TESTING.md?plain=1#L57 [3] https://mesonbuild.com/Build-options.html#arrays
Change-Id: Ia1b326bedca808e43e73ce2b241178bc4bfab23c Signed-off-by: Janet Adkins <janeta@us.ibm.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
46f780f7 |
| 09-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Move chassis and trigger to dbus utility
Using the utility classes reduces compile times and reduces the number of template specializations that get generated. These are the last two left in the co
Move chassis and trigger to dbus utility
Using the utility classes reduces compile times and reduces the number of template specializations that get generated. These are the last two left in the codebase for getProperty, so fix them.
Tested: On Last commit.
Change-Id: I0ca8411b74b58dbeb42587b88cfd66c0e674b8c8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
796ba93b |
| 01-Aug-2020 |
Ed Tanous <ed@tanous.net> |
Enable HTTP additional sockets
This commit attempts to add the concept of an SSL detector from beast, and add the capability into bmcweb. This allows directing multiple socket files to the bmcweb i
Enable HTTP additional sockets
This commit attempts to add the concept of an SSL detector from beast, and add the capability into bmcweb. This allows directing multiple socket files to the bmcweb instance, and bmcweb will automatically sort out whether or not they're SSL, and give the correct response. This allows users to plug in erroneous urls like "https://mybmc:80" and they will forward and work correctly.
Some key design points: The HTTP side of bmcweb implements the exact same http headers as the HTTPS side, with the exception of HSTS, which is explicitly disallowed. This is for consistency and security.
The above allows bmcweb builds to "select" the appropriate security posture (http, https, or both) for a given channel using the FileDescriptorName field within a socket file. Items ending in: both: Will support both HTTPS and HTTP redirect to HTTPS https: Will support HTTPS only http: will support HTTP only
Given the flexibility in bind statements, this allows administrators to support essentially any security posture they like. The openbmc defaults are: HTTPS + Redirect on both ports 443 and port 80 if http-redirect is enabled
And HTTPS only if http-redirect is disabled.
This commit adds the following meson options that each take an array of strings, indexex on the port. additional-ports Adds additional ports that bmcweb should listen to. This is always required when adding new ports.
additional-protocol Specifies 'http', 'https', or 'both' for whether or not tls is enfoced on this socket. 'both' allows bmcweb to detect whether a user has specified tls or not on a given connection and give the correct response.
additional-bind-to-device Accepts values that fill the SO_BINDTODEVICE flag in systemd/linux, and allows binding to a specific device
additional-auth Accepts values of 'auth' or 'noauth' that determines whether this socket should apply the normal authentication routines, or treat the socket as unauthenticated.
Tested: Previous commits ran the below tests. Ran the server with options enabled. Tried: ``` curl -vvvv --insecure --user root:0penBmc http://192.168.7.2/redfish/v1/Managers/bmc * Trying 192.168.7.2:80... * Connected to 192.168.7.2 (192.168.7.2) port 80 (#0) * Server auth using Basic with user 'root' > GET /redfish/v1/Managers/bmc HTTP/1.1 > Host: 192.168.7.2 > Authorization: Basic cm9vdDowcGVuQm1j > User-Agent: curl/7.72.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 301 Moved Permanently < Location: https://192.168.7.2 < X-Frame-Options: DENY < Pragma: no-cache < Cache-Control: no-Store,no-Cache < X-XSS-Protection: 1; mode=block < X-Content-Type-Options: nosniff < Content-Security-Policy: default-src 'none'; img-src 'self' data:; font-src 'self'; style-src 'self'; script-src 'self'; connect-src 'self' wss: < Date: Fri, 08 Jan 2021 01:43:49 GMT < Connection: close < Content-Length: 0 < * Closing connection 0 ```
Observe above: webserver returned 301 redirect. webserver returned the appropriate security headers webserver immediately closed the connection.
The same test above over https:// returns the values as expected
Loaded the webui to test static file hosting. Webui logs in and works as expected.
Used the scripts/websocket_test.py to verify that websockets work. Sensors report as expected.
Change-Id: Ib5733bbe5473fed6e0e27c56cdead0bffedf2993 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
9838eb20 |
| 29-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can control this (context link lost years ago).
The new version of clang claims the singleton pattern of passing in an io_context pattern is a potential nullptr dereference. It's technically correct, as calling the singleton without immediately initializing the io context will lead to a crash.
This commit implements what the boost maintainers suggested, having a single method that returns "the context" that should be used. This also helps to maintain isolation, as some pieces are no longer tied directly to dbus to get their reactor.
Tested: WIP
Change-Id: Ifaa11335ae00a3d092ecfdfb26a38380227e8576 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
d7857201 |
| 28-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is largely just taking the clang-recommended fixes and checking them in. Subsequent patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file. These can be cleaned up over time as they're understood. The majority are places where boost includes a impl/x.hpp and x.hpp, but expects you to use the later. include-cleaner opts for the impl, but it isn't clear why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
40e9b92e |
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
38afdb91 |
| 12-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Clean up static analysis
Coverity marks some minor things as improvements we can make. Clean up the code to silence the errors.
Tested: Unit tests coverage for http core is sufficient.
Change-Id:
Clean up static analysis
Coverity marks some minor things as improvements we can make. Clean up the code to silence the errors.
Tested: Unit tests coverage for http core is sufficient.
Change-Id: If4efb359792bfdfe3866e843b4bbdb3f83fec0c5 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
3281bcf1 |
| 25-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Support RespondToUnauthenticatedClients PATCH
RespondToUnauthenticatedClients allows users to explicitly select mTLS as their only authentication mechanism, thus significantly reducing their code ex
Support RespondToUnauthenticatedClients PATCH
RespondToUnauthenticatedClients allows users to explicitly select mTLS as their only authentication mechanism, thus significantly reducing their code exposure to unauthenticated clients.
From the Redfish specification
``` The RespondToUnauthenticatedClients property within the ClientCertificate property within the MFA property of the AccountService resource controls the response behavior when an invalid certificate is provided by the client. • If the property contains true or is not supported by the service, the service shall not fail the TLS handshake. This is to allow the service to send error messages or unauthenticated resources to the client. • If the property contains false , the service shall fail the TLS handshake. ```
This commit implements that behavior.
This also has some added benefits in that we no longer have to check the filesystem for every connection, as TLS is controlled explicitly, and not whether or not a root cert is in place.
Note, this also implements a TODO to disable cookie auth when using mTLS. Clients can still use IsAuthenticated to determine if they are authenticated on request.
Tested: Run scripts/generate_auth_certs.py to set up a root certificate and client certificate. This verifies that mTLS as optional has not been broken. Script succeeds.
``` PATCH /redfish/v1/AccountService {"MultiFactorAuth": {"ClientCertificate": {"RespondToUnauthenticatedClients": false}}} ```
GET /redfish/v1 without a client certificate now fails with an ssl verification error
GET /redfish/v1 with a client certificate returns the result
``` PATCH /redfish/v1/AccountService {"MultiFactorAuth": {"ClientCertificate": {"RespondToUnauthenticatedClients": false}}} With certificate returns non mTLS functionality. ```
Change-Id: I5a9d6d6b1698bff83ab62b1f760afed6555849c9 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
102a4cda |
| 15-Apr-2024 |
Jonathan Doman <jonathan.doman@intel.com> |
Manage Request with shared_ptr
This is an attempt to solve a class of use-after-move bugs on the Request objects which have popped up several times. This more clearly identifies code which owns the
Manage Request with shared_ptr
This is an attempt to solve a class of use-after-move bugs on the Request objects which have popped up several times. This more clearly identifies code which owns the Request objects and has a need to keep it alive. Currently it's just the `Connection` (or `HTTP2Connection`) (which needs to access Request headers while sending the response), and the `validatePrivilege()` function (which needs to temporarily own the Request while doing an asynchronous D-Bus call). Route handlers are provided a non-owning `Request&` for immediate use and required to not hold the `Request&` for future use.
Tested: Redfish validator passes (with a few unrelated fails). Redfish URLs are sent to a browser as HTML instead of raw JSON.
Change-Id: Id581fda90b6bceddd08a5dc7ff0a04b91e7394bf Signed-off-by: Jonathan Doman <jonathan.doman@intel.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
25b54dba |
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
003301a2 |
| 16-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Change ssl stream implementations
Boost beast ssl_stream is just a wrapper around asio ssl_stream, and aims to optimize the case where we're writing small payloads (one or two bytes.) which needs to
Change ssl stream implementations
Boost beast ssl_stream is just a wrapper around asio ssl_stream, and aims to optimize the case where we're writing small payloads (one or two bytes.) which needs to be optimized in SSL.
bmcweb never writes one or two bytes, we almost always write the full payload of what we received, so there's no reason to take the binary size overhead, and additional boost headers that this implementation requires.
Tested: This drops the on-target binary size by 2.6%
Redfish service validator passes.
Change-Id: Ie1ae6f197f8e5ed70cf4abc6be9b1b382c42d64d Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
8db83747 |
| 13-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Clean up BMCWEB_ENABLE_SSL
This macro came originally from CROW_ENABLE_SSL, and was used as a macro to optionally compile without openssl being required.
OpenSSL has been pulled into many other dep
Clean up BMCWEB_ENABLE_SSL
This macro came originally from CROW_ENABLE_SSL, and was used as a macro to optionally compile without openssl being required.
OpenSSL has been pulled into many other dependencies, and has been functionally required to be included for a long time, so there's no reason to hold onto this macro.
Remove most uses of the macro, and for the couple functional places the macro is used, transition to a constexpr if to enable the TLS paths.
This allows a large simplification of code in some places.
Tested: Redfish service validator passes.
Change-Id: Iebd46a68e5e417b6031479e24be3c21bef782f4c Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
8cb2c024 |
| 27-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Fix moves/forward
Clang has new checks for std::move/std::forward correctness, which catches quite a few "wrong" things where we were making copies of callback handlers.
Unfortunately, the lambda s
Fix moves/forward
Clang has new checks for std::move/std::forward correctness, which catches quite a few "wrong" things where we were making copies of callback handlers.
Unfortunately, the lambda syntax of
callback{std::forward<Callback>(callback)}
in a capture confuses it, so change usages to callback = std::forward<Callback>(callback)
to be consistent.
Tested: Redfish service validator passes.
Change-Id: I7a111ec00cf78ecb7d5f5b102c786c1c14d74384 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
4fa45dff |
| 01-Sep-2023 |
Ed Tanous <edtanous@google.com> |
Unit test Connection
Boost asio provides a test stream object that we can use to begin unit testing the connection object. This patchset uses it to re-enable some simple http1.1 tests. There's som
Unit test Connection
Boost asio provides a test stream object that we can use to begin unit testing the connection object. This patchset uses it to re-enable some simple http1.1 tests. There's some features that have snuck into the connection class that aren't compatible with a stream (like ip address getting), so unfortunately we do need the connection class to be aware if it's in test mode, but that tradeoff seems worthwhile.
Tested: Unit test pass.
Change-Id: Id8b1f8866582b58502dbafe6139f841bf64b8ef3 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
62598e31 |
| 17-Jul-2023 |
Ed Tanous <ed@tanous.net> |
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level of compile time checks, it needs to be a method, instead of the stream style logging we had before. This requires a pretty substantial change. Fortunately, this change can be largely automated, via the script included in this commit under scripts/replace_logs.py. This is to aid people in moving their patchsets over to the new form in the short period where old patches will be based on the old logging. The intention is that this script eventually goes away.
The old style logging (stream based) looked like.
BMCWEB_LOG_DEBUG << "Foo " << foo;
The new equivalent of the above would be: BMCWEB_LOG_DEBUG("Foo {}", foo);
In the course of doing this, this also cleans up several ignored linter errors, including macro usage, and array to pointer deconstruction.
Note, This patchset does remove the timestamp from the log message. In practice, this was duplicated between journald and bmcweb, and there's no need for both to exist.
One design decision of note is the addition of logPtr. Because the compiler can't disambiguate between const char* and const MyThing*, it's necessary to add an explicit cast to void*. This is identical to how fmt handled it.
Tested: compiled with logging meson_option enabled, and launched bmcweb
Saw the usual logging, similar to what was present before: ``` [Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled [Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800 [Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist [Info src/webserver_main.cpp:59] Starting webserver on port 18080 [Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file. [Info src/webserver_main.cpp:137] Start Hostname Monitor Service... ``` Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8
show more ...
|
#
47488a98 |
| 26-Jun-2023 |
Ed Tanous <edtanous@google.com> |
Remove the black_magic namespace
The black_magic namespace has been eradicated of what most would call "black magic" and while there's some non-trivial stuff in there, it's far from the most complic
Remove the black_magic namespace
The black_magic namespace has been eradicated of what most would call "black magic" and while there's some non-trivial stuff in there, it's far from the most complicated part of this stack.
This commit takes the two remaining things in the black_magic namespace, namely the parameter tagging functionality, and moves them into the utility namespace.
Tested: Redfish service validator passes
Change-Id: I9e2686fff5ef498cafc4cb83d4d808ea849f7737 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
21b4aba4 |
| 05-Jun-2023 |
Ed Tanous <edtanous@google.com> |
Remove this->
this-> is redundant when operating within a class member scope. We should aim to be consistent.
This change was done automatically with sed replace
Tested: Code compiles
Signed-off
Remove this->
this-> is redundant when operating within a class member scope. We should aim to be consistent.
This change was done automatically with sed replace
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If791e83e0bd5f84031e65156b7ea082ded8e158c
show more ...
|
#
6fde95fa |
| 01-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 ...
|
#
88ada3bc |
| 13-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 ...
|
#
f8ca6d79 |
| 28-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 ...
|
#
a232343d |
| 12-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 ...
|
#
89492a15 |
| 10-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 ...
|
#
7e9093e6 |
| 17-Sep-2021 |
P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> |
Add Support for privilege check in handleUpgrade
This commit enables privilege check for user(s) in case of upgraded connections. Currently users with no privileges will also be able to access Webso
Add Support for privilege check in handleUpgrade
This commit enables privilege check for user(s) in case of upgraded connections. Currently users with no privileges will also be able to access Websockets connections (Ex: KVM).
The privilege check was already in place for normal connections (i.e. router->handle()). This commit lifts off the privilege check code and moves it into a common function (validatePrivilege()), which can be used both by handle() and handleUpgrade() and register required callback to be called.
Also, the const qualifier for Request in the handleUpgrade() function's signature is removed to enable setting "isConfigureSelf" field of request. The signature of handleUpgrade() is made identical to handle()
Tested: - websocket_test.py Passed - Admin and Operator users are able to access KVM on WebUI - Readonly User was unable to access KVM on WebUI
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> Change-Id: I6f743c27e7e6077f1c6c56e6958922027e4404e8
show more ...
|
#
a9f076e5 |
| 18-Oct-2021 |
P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> |
Add asyncResp support to handleUpgrade
This commit enables passing down the asyncResp (of the connection) to the handler of upgraded connections. This is already in place for normal requests (i.e. C
Add asyncResp support to handleUpgrade
This commit enables passing down the asyncResp (of the connection) to the handler of upgraded connections. This is already in place for normal requests (i.e. Class Router -> handle())
This change would enable any async calls that would be required before upgrade of the connection. For example, as on today, we have only Authentication of user in place for upgraded connection, but not Authorization. So, this asyncResp could further be used for such dbus calls to return informative response.
This commit updates the signature of all the handleUpgrade() functions present in router.hpp to take in asyncResp object instead of normal response.
Tested : - websocket_test.py Passed - KVM was functional in WebUI.
Change-Id: I1c6c91f126b734e1b5573d5ef204fe2bf6ed6c26 Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
show more ...
|
#
d9049df1 |
| 02-Aug-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
app: fix -Wpessimizing-move
clang14 doesn't compile because of "moving a temporary object prevents copy elision".
This also alligns the plaintext socket with style of SSL socket.
Tested: trivial c
app: fix -Wpessimizing-move
clang14 doesn't compile because of "moving a temporary object prevents copy elision".
This also alligns the plaintext socket with style of SSL socket.
Tested: trivial change. It builds.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I9203cf162d738290306f9ba73ec0ab8f2ca5033c
show more ...
|