summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>2019-07-15 07:51:33 -0500
committerT Rajeswaran <rajeswgo@in.ibm.com>2019-12-09 15:17:13 +0000
commit5e931ae994307babe6c3520cbaca6a7139acc81d (patch)
treeebb94b4413c011603e49e2db4b1153299d74a3d7 /src
parent91fe97c521d323fb5dfecade77a8548f7d1a01c1 (diff)
downloadbmcweb-5e931ae994307babe6c3520cbaca6a7139acc81d.tar.gz
bmcweb-5e931ae994307babe6c3520cbaca6a7139acc81d.zip
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"}' Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: Ifd813e1af4dfcb7aeaba18e04b6c9767d2a5e95a
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 a2da120..901c180 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();
OpenPOWER on IntegriCloud