summaryrefslogtreecommitdiff
path: root/Redfish.md
diff options
context:
space:
mode:
authorAbhishek Patel <Abhishek.Patel@ibm.com>2022-02-02 17:54:25 +0300
committerEd Tanous <ed@tanous.net>2023-06-07 01:33:02 +0300
commit583458567282adc738ce937fe956c1fb54ed7987 (patch)
treed9953e29156c5243f2365264ba0937784adac41d /Redfish.md
parentfc903b3d9b6b61a6b215aabf4ae68408c04787ef (diff)
downloadbmcweb-583458567282adc738ce937fe956c1fb54ed7987.tar.xz
PATCH userGroups Information ("AccountTypes")
This commit enhances the redfish API to set and unset userGroups information for each user account. Users with ConfigureUsers level privilege can patch (Set and Unset) AccountTypes of each user role. In addition, a user with "ConfigureSelf" level privilege can only set or Update their password. "Redfish" is always enabled in each user role. However, "ConfigureUsers" can disable other user redfish services. But if "ConfigureUsers" try to disable its redfish service, that generates an error. In this commit, users can enable and disable "redfish", "ssh", "hostconsole" and "ipmi" services from each user where ssh is a special case. The 'web' group does not control access to the web interface, and doesn't appear to do anything. The 'redfish' in the UserGroups is mapped to both Redfish and WebUI AccountTypes. To enable redfish User Group both of these account types should be specified, and none to disable it. Tested: Testing was done using curl command with ConfigureUsers and ConfigureSelf. $ curl -k -X PATCH https://$bmc:18080/redfish/v1/AccountService/Accounts/webuser -d '{"AccountTypes": ["Redfish", "WebUI", "ManagerConsole", "HostConsole"]}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.13.0.Success", "MessageSeverity": "OK", "Resolution": "None" } ] } Also ran following cases: $ curl -k -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user99 -d '{"AccountTypes": ["HostConsole"]}' $ curl -k -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user99 -d '{"AccountTypes": ["IPMI"]}' $ curl -k -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user99 -d '{"AccountTypes": ["Redfish", "WebUI"]}' $ curl -k -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user99 -d '{"AccountTypes": ["ManagerConsole"]}' $ curl -k -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user99 -d '{"AccountTypes": ["Redfish", "IPMI", "HostConsole", "ManagerConsole", "WebUI"]}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "There are insufficient privileges for the account or credentials associated with the current session to perform the requested operation.", "MessageArgs": [], "MessageId": "Base.1.13.0.InsufficientPrivilege", "MessageSeverity": "Critical", "Resolution": "Either abandon the operation or change the associated access rights and resubmit the request if the operation failed." } ], "code": "Base.1.13.0.InsufficientPrivilege", "message": "There are insufficient privileges for the account or credentials associated with the current session to perform the requested operation." } $ curl -k -H 'X-Auth-Token: IpnCBj1Lozh53Jhzxu7T' -X PATCH https://${bmc}/redfish/v1/AccountService/Accounts/user999 -d '{"Password":"0penBmc123"}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.13.0.Success", "MessageSeverity": "OK", "Resolution": "None" } ] Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com> Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com> Change-Id: I1a0344ca45556b820bb77c3dcb459f27eb032501 Signed-off-by: Shantappa Teekappanavar <shantappa.teekappanavar@ibm.com>
Diffstat (limited to 'Redfish.md')
-rw-r--r--Redfish.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/Redfish.md b/Redfish.md
index 4e5a19b5af..9cd7a106da 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -111,6 +111,7 @@ Fields common to all schemas
- Password
- PasswordChangeRequired
- RoleId
+- StrictAccountTypes
- UserName
### /redfish/v1/AccountService/LDAP/Certificates/