Skip to Content
Product Information
Author's profile photo Amit Kumar Singh

UI Data Protection – Role based masking scenario in Manage Products app of SAPUI5 with Reveal on Demand

Introduction

In this blog post, we will learn how to mask “Price per Unit” field of Products in Manage Products application of SAPUI5.Price per Unit” field will be configured as Reveal on Demand which means when user will use Reveal on Demand feature, value of Price per Unit field will be revealed.

A PFCG Role will be used for the authorization check which will allow users with the specified role to view the field value. If a user does not have this role, it means the user is not authorized and data will be protected either through masking, clearing, or disabling the field.

The end result for unauthorized users will look like below:

Reveal on Demand

Reveal on demand provides additional data protection by masking the field value by default, even if the user is authorized to view the data. The authorized user then explicitly chooses the option to reveal the field value on the user interface.

When the authorized user reveals the data, a dialog box (which can be configured to display a confirmation message, reason code, and free text) is displayed. The user then has to specify, for example, a reason for revealing the data. The revealed data is masked again once the timeout takes effect or when the user switches off the reveal option.

  • To unmask the “Price per Unit” field information using Reveal on Demand feature, click on “Eye” icon and then click on “Reveal” option

  • On Reveal On Demand pop-up, select “Reason” as “DVA Data Verification”, enter “Comments for Reveal” as “Unmask to view values”, and click on “Submit” button

  • Field value will get unmasked for “Price per Unit” field

  • To again mask the “Price per Unit” field value, click on “Eye” icon and then click on “Mask” option

  • On Reveal On Demand pop-up, click on “OK” button

  • Price per Unit” field will again appear as masked

Prerequisite

UI Data Protection Masking for SAP S/4HANA is a solution that allows you to protect restricted and sensitive data values at field level by masking, clearing, or disabling fields for those users who are not authorized to view or edit this data.

Product “UI data protection masking for SAP S/4HANA” is used in this scenario to protect sensitive data at field level and must be installed in the S/4HANA system.

The product is a cross-application product which can be used to mask/protect any field in SAP GUISAPUI5/SAP FioriCRM Web Client UI, and Web Dynpro ABAP.

Let’s begin

Configuration to achieve masking

Logical Attribute is a functional modelling of how any attribute such as Social Security NumberBank Account NumberAmountsPricing informationQuantity etc. should behave with masking.

Configure Logical Attribute – Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Maintain Metadata Configuration -> Maintain Logical Attributes

Product Price per Unit

Maintain Field Level Security and Masking Configuration

Here, we will define how masking will behave with the logical attribute that we created in above step.

Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Data Protection Configuration -> Maintain Field Level Security and Masking Configuration

Follow below mentioned steps:
  • Click on “New Entries” button
  • Enter “Sensitive Entity” as “LA_PRODCUT_PRICE” and press “Enter” key. “Description” and “Application Module” will get populated in corresponding fields
  • Check “Enable Configuration” check-box
  • Select “Role Based Authorization” option
  • Enter “PFCG Role” as “ZTEST“. In this example, we have used a blank role “ZTEST”. Customers can use any role as per their requirement.
  • Enter “Field Level Action” as “MASK_FIELD
  • Check “Reveal on Demand” check-box
  • Click on “Save” button

Maintain Technical Address

In this step, we will associate the Technical Address of the fields to be masked with the Logical Attributes.

To get the Technical Address of a SAPUI5/SAP Fiori field, refer Technical Trace blog post.

Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Maintain Metadata Configuration -> Maintain Technical Address

Follow below mentioned steps:

Under “UI5/Fiori NetWeaver Gateway Field Mapping”, maintain technical address for following fields.

  • Click on “New Entries” button
  • Enter “Service Name” as “SEPMRA_PROD_MAN
  • Enter “Entity” as “SEPMRA_C_PD_ProductType
  • Enter “Property” as “Price
  • Enter “Logical Attribute” as “LA_PRODUCT_PRICE
  • Enter “Description” as “Product Price per Unit
  • Click on “Save” button

Conclusion

In this blog post, we have learnt how Role-based masking with Reveal on Demand is achieved for “Product Price per Unit” field in Manage Products application of SAPUI5.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Himanshu Agrawal
      Himanshu Agrawal

      Hi Amit,

       

      Its wonderful article and your other blogs have helped me to achieve understanding of UI Masking.

       

      The biggest challeneg which we are facing is not able to identify , Service and Entity for filed which we want to mask for Fiori App(UI5).

      If you could throw some light on that.

       

      Thanks, Himanshu.

      Author's profile photo Amit Kumar Singh
      Amit Kumar Singh
      Blog Post Author

      Hi Himanshu,

      In order to get the Service and Entity information for a field in Fiori app you need to use Recording Tool feature. It is available under "SAP Menu". This tool will record the technical addresses of the UI fields that the user accesses. You can also use this report to view the information that has been recorded in this way, and to map logical attributes to UI fields.