summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>2019-12-13 13:26:54 +0300
committerT Rajeswaran <rajeswgo@in.ibm.com>2019-12-17 08:06:45 +0300
commit61dbeef97168db1a1f7a351c5f95e09afd361e48 (patch)
tree2a3d9db1a6029998451f7c15d67ded5d398fb3ef /src
parent1e2cec30813560f17b2d214b81a579b68bd37256 (diff)
downloadbmcweb-61dbeef97168db1a1f7a351c5f95e09afd361e48.tar.xz
Fix authorization for LDAP users
Modified the code to make an asynchronous call to GetUserInfo to get the user role for authorization. For local users, DBus matches are used to store user role map hot in memory. Hence, bmcweb has to know whether a user is a local user or LDAP user to get the role. To avoid this, removed the existing DBus matches and modified the code to call GetUserInfo to get the role of local users as well as LDAP users. Tested: - Created a local user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a local user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Tested Redfish ConfigureSelf privilege Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: Ic3e46a0c0aff2cf456c98048350e58e302011c57
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index a2da120188..901c180366 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -108,10 +108,6 @@ int main(int argc, char** argv)
redfish::RedfishService redfish(app);
- // Keep the user role map hot in memory and
- // track the changes using match object
- crow::persistent_data::UserRoleMap::getInstance();
-
app.run();
io->run();