commit | b477fd4408bc0602cc86147121f03791d3f4824a | [log] [tgz] |
---|---|---|
author | P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> | Thu Dec 16 07:17:51 2021 +0530 |
committer | P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> | Fri Dec 24 10:58:23 2021 +0000 |
tree | c67956a1eea672824d6676ec6df5feba883f0c4d | |
parent | d1a648140e3cadd0ea6b0014c4d61ec880742000 [diff] |
Enable encoding/decoding object paths of User Name Any string used to form a Dbus object path needs to be encoded. This commit enables encoding the User Name before it is used as Object path and decodes the object path to get the user readable text. The encoding is essemtial while getting details of a user, deleting user and modifying properties of user as we need the object path for these actions. Decoding and getting the User name using object_path.filename() is essential to display the user name in human readable format. Tested: - Successfully created new user using POST to /redfish/v1/AccountService/Accounts with body { "UserName": "_test_6566", "Password": "openbmc123", "RoleId": "NoAccess", "Enabled": true } and it created a Dbus Object: /xyz/openbmc_project/user/_5ftest_5f6566 - GET on displayed all user names in correct human redable format. Example: The user name for /xyz/openbmc_project/user/_5ftest_5f6566 was displayed as "_test_6566" - Successfully fetched user Detais by GET to /redfish/v1/AccountService/Accounts/<UserName> - Successfully modified user details by PATCH to /redfish/v1/AccountService/Accounts/<UserName> Example body: { Enabled: false } - Successfully removed user by DELETE to /redfish/v1/AccountService/Accounts/<UserName> removed the user with given name Example: Deleting _test_6566 actually removed /xyz/openbmc_project/user/_5ftest_5f6566 object path successfully. Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> Change-Id: I6e7559f7543ee504e2f8c137911f42887eb4cf16
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.