Redfish: Design User authorization.
Ratan Gupta
ratagupt at linux.vnet.ibm.com
Tue Feb 26 00:41:56 AEDT 2019
Hi Ed,
This mail is regarding the authorization support on Redfish.
In Redfish we have two types of privilege.
1) User Privilege
Redfish Authorization uses Roles and Privileges to control which users
have what access to
resources.
We can have static mapping of Roles and assigned privileges
Role = "Administrator"
Privileges = Login, ConfigureManager,
ConfigureUsers,ConfigureComponents, ConfigureSelf
Role = "Operator"
Privileges = Login, ConfigureComponents, ConfigureSelf
Role = "ReadOnly"
Privileges = Login, ConfigureSelf
Currently in phsophor-user-manager all the default Roles/Privileges is
hardcoded.
we need to map privilege name/Role to the RoleName of the Redfish.
Static mapping is needed in the Redfish code for the same.
eg priv-admin = Administrator.
Once we have the above mapping ready we will add the user role in the
session object itself during creation of the session.
we can get the user role/privilege by calling the D-bus method on
phosphor-user-manager.
Gerrit commit is up for the same.
2) Entity privilege =>(Operation to Privilege) mapping
Currently each redfish node have the entity privilege structure,
which is supposed to be consumed
when the redfish request is being recieved by the redfish node class.
In the dispatchRequest funtion of node.hpp
=> Check what is entity privilege
=> Check what is user privilege
=> If the user is having that privilege then allow the request
otherwise not.
Eg: If a PATCH operation is performed on the Account Service and
the entity privilege
for the Account service PATCH operation is "ConfigureUsers" and the
User Role which we get
From the session request have the same privilege then allow the
operation.
I can see that in current Redfish code User Privileges is hardcoded and
it is allowing all
users to do any operation.
Can I get your feedback on the same?
Ratan
More information about the openbmc
mailing list