Restrict access to business roles in Web UI
Scenario
A user can set the parameter CRM_UI_PROFILE to a specific value or even * .
It’s a security risk, because a user could use a standard business role instead of the customer configured role.
The user parameter overrules any other role assignments (via the organizational management or pfcg-role),
CRM 7.0 / PFCG Roles and Authorization Concept, page 28:
Requirement
Even if the parameter is set to * only allowed business roles are displayed in the pick list of the logon screen.
Solution
The enhancement spot WCF_RESTRICT_ACCESS (note 1566074) and an own defined authorization object is used to
restrict the business roles.
Implementation
1. Create authorization object ZUI_PROFIL
Create the authorization field ZUI_PROFIL in transaction SU21:
Create the authorization object ZUI_PROFIL with field ZUI_PROFIL and don’t forget to re-generate SAP_ALL
2. Implement the enhancement spot WCF_RESTRICT_ACCESS
In the next step you have to implement the enhancement spot WCF_RESTRICT_ACCESS in transaction SE18.
Add the following code in method get_business_role_white_list
method if_wcf_restrict_access_badi~get_business_role_white_list. ** Data field-symbols <fs_role> type crmc_ui_profile. * * Get all CRM-web-UI business roles * authority check authority-check object ‘ZUI_PROFIL’ if sy-subrc = 0. endloop.
|
3. Apply authorization object to user
In the last step you only add the new authorization object with the allowed roles in pfcg role.
Result
In the logon screen only the allowed roles are shown:
Hi Monika,
thank you for sharing this information. It never occured to me by now, but it is absolutely correct that there is a hole in security.
When setting up authorization I tend to advice to authorize the navigational links inside WebClient one by one. This way the security issue should not be that bad. Even if the user logs on with a different Business Role he or she would not be able to see any links where there is no authorization.
cheers Carsten
Hello Carsten,
the restriction in UIU_COMP doesn't close the security hole totaly. If a user can use a different business role all customer specific restrictions (e.g. disabled fields or assigment blocks) are not considered.
Regards,
Monika
Good point. Totally agree with you there. It could be partly handled by making configurations not role specific, but sometimes that is exactly what you want. Thus you need something else.
Now I am wondering, why SAP did not encapsulate the CRM_UI_PROFIL parameter in an S_DEVELOP authorization. In my eyes it is clearly meant for developers only.
I totally agree, this shoudn't be a user parameter ... and there are many other critical parameters. Just think about WCF_IGNORE_ENHANCEMT: with the value A the user can deactivate the existing UI Enhancement Sets.
The best protection is that most of the users do not know these parameters ...