Closed thangqn-ampere closed 1 year ago
bmcweb implements the Redfish base privilege registry from DMTF. Can you please quote where in the privilge registry you believe we've implemented it incorrectly?
I am not aware of privilege derived from DMTF registry. However, I check the user privilege roles at https://github.com/openbmc/docs/blob/master/architecture/user-management.md#supported-privilege-roles:
Operator: Users are allowed to view and control basic operations. This includes reboot of the host, etc.
But users are not allowed to change other configuration like user, network, etc.
Having firmware update privilege can destroy current setting from administrators and I think is outside above operator privilege definition
Like I said, the permissions are governed by the base privilege registry published by DMTF. If you believe that the permissions should be different, feel free to take it up with Redfish, but unless we’re not implementing the privileges they publish correctly, this is not a bug.
Can you give me some information to check on bmcweb codes that derived from DMTF registries? I will check more on it. Do you think we need to update our documents about operator user privilege to match bmcweb and DMTF registries?
Can you give me some information to check on bmcweb codes that derived from DMTF registries?
Check out the scripts directory that builds the internal data structures we use for privilege registry.
Do you think we need to update our documents about operator user privilege to match bmcweb and DMTF registries?
Possibly, or if the DMTF registries don't meet the intent, have them changed, but it's not clear yet if this is something that openbmc implemented incorrectly, or DMTF specified incorrectly.
@thangqn-ampere have you determined if this is a bug in bmcweb? Or in the privilege registry.
I am sorry, we have just been back from Lunar New Year holiday. I have asked Hieu (hieuhuynh-ampere) to help me check and will update you soon.
Hi @edtanous,
OpenBMC uses the POST method for Firmware updates [1]. Based on the DMTF registries, the UpdateService's POST method has 'ConfigureComponents' privilege [2]. BMCWeb defined Operator with 'ConfigureComponents' privilege [3]. And implement Firmware update POST method with 'ConfigureComponents' privilege [4] [5].
According to my understanding, there is no issue with DMTF registries. The question is: why BMCWeb defined the Operator has 'ConfigureComponents' privilege [3]?
[1] https://github.com/openbmc/docs/blob/master/architecture/code-update/firmware-update-over-redfish.md#update-an-image [2] https://redfish.dmtf.org/registries/Redfish_1.3.1_PrivilegeRegistry.json#UpdateService [3] https://github.com/openbmc/bmcweb/blob/master/redfish-core/include/privileges.hpp#L229 [4] https://github.com/openbmc/bmcweb/blob/master/redfish-core/include/registries/privilege_registry.hpp#L1508 [5] https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp#L733
why BMCWeb defined the Operator has 'ConfigureComponents' privilege [3]?
Please reference Table 41 — Required standard roles in the redfish specification, which specifies Operator should have ConfigureComponents privilege. To my reading of the above, this is a DMTF issue, and bmcweb implements to the specification; Please file it with them and work there.
Describe the bug Operator user can login to WebUI and start firmware update. It can also flash new firmware via Redfish.
Environment Tested on Ampere Mt.Jade and Mt.Mitchell platform with OpenBMC firmware compiled from commit d4f5137e4e0ef00870b8f1e9d19125272cfe0784.
To Reproduce Steps to reproduce the behavior:
usertest
from WebUI with Operator privilege.usertest
.Operators -> Firmware
. InUpdate firmware
->Image file
, clickAdd file
to select new firmware. Then selectStart update
to start update process.