Library For Http Client /Server Application Development
Abhilash Raju
Abhilash.Raju at ibm.com
Mon Nov 11 23:18:20 AEDT 2024
Hi
I would like to gather some feedback about having a library for BMC to add HTTPs features to BMC services.
I could see following use case that demand such a library in BMC
1. Auth Server
Transfer the authentication /authorization responsibility from Bmcweb to auth server. Currently it is spread between Bmcweb and Phosphor User Manager(PUM).
We can simplify the BMC web implementation by delegating the task to PUM. To achieve that we need a secure encrypted communication channel between Bmcweb and PUM
Since the communication needs to happen before the user is authenticated, giving Dbus access to the user may not be a good idea. But HTTPs over Unix domain socket looks like a viable alternative.
1. Redfish client
There may be cases where services in BMC wanted to make Redfish/ Rest request to service in other BMC (Aggregation and other communication needs between peer BMCs)
1. Redfish event
Transfer the responsibility of redfish event from Bmcweb to separate dedicated service.
1. Offloading logs and Telemetry data
Logs can be periodically offloaded to external telemetry servers.
I developed a library with no reliance on any external libraries unsupported by OpenBMC, resulting in the creation of The Reactor Library<https://github.com/abhilashraju/coroserver>
Features:
* No external dependency on any new tools.
* Based on Boost Asio and C++ 20 coroutines
* Asynchronous APIs using coroutine
* Easy to use and easily composable Web-Client API. See example<https://github.com/abhilashraju/coroserver?tab=readme-ov-file#example-web-crawler-to-extract-links-from-a-web-page>
* ?when_all? implementation for fork-join pattern. See example<https://github.com/abhilashraju/coroserver?tab=readme-ov-file#example-concurrent-downloads-using-when_all>
* Support for HTTPs over TCP and Unix Domain sockets. See example<https://github.com/abhilashraju/coroserver?tab=readme-ov-file#example-web-client-to-download-content-from-local-unix-domain-socket-server>
* Easy to use Sever APIs for fast development of HTTPs server services See example<https://github.com/abhilashraju/coroserver?tab=readme-ov-file#example-simple-http-server>
* Works well with sdbusplus coroutine APIs
You're welcome to experiment with it and share your valuable feedback.
Regards
Abhilash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20241111/c2dfa145/attachment.htm>
More information about the openbmc
mailing list