cancel
Showing results for 
Search instead for 
Did you mean: 

CBA , does it need backend coding

Former Member
0 Kudos

Hi all ,

I have created different adaptations ,and tested via passing parameters in URL . I can see different output   for ROLE = MANAGER .

My Ques : In real scenario ,if Manger tries to access web application , do we need to do some back end code as well ,Since making modification in URL is very easy and anyone can do .

How to control it from back end code . Please guide.

Accepted Solutions (1)

Accepted Solutions (1)

former_member193369
Active Participant
0 Kudos

Hello Deepa,

Static CBA does not need backend coding. Whenever the adaptation context can be fixed at startup and does not change later on you can stick with static CBA. Nevertheless you have to set the context somehow, and there are only two ways to do this without coding: URL- or Applicationparameters.

Regarding your concerns about modifying URLs. That's true, but you must never ever rely security on UI configuration (and CBA is only UI configuration). If there is some data shown in your application,

which only managers are allowed to see, you have to secure the data by appropriate authorization checks in the backend. Removing the displaying UI elements or UIBBs via any form of configuration, customizing, CBA, ... is not enough protection.

So securing your application needs backend coding, and best way to do it is as near to the database selection as possible. Securing the CBA adaptation context is not sufficient.

As already the feeder classes used in your FPM application should not expose unauthorized data to the user, there should be no need to protect the URL against changes.

If you want to do it anyway it is sufficient to make an authorization check best in your AppCC or in any feeder classes IF_FPM_GUIBB~INITIALIZE or better IF_FPM_MULTI_INSTANTIABLE~FPM_INITIALIZE method, if the global adaptation context matches the user's authorization.

The global adaptation context can be accessed via IF_FPM~MO_ADAPTATION_MANAGER->GET_ADAPTATION_CONTEXT. In your example you will get an entry with ROLE = MANAGER in the returned table and then you should do an authority-check for this.

If this check fails you should trigger a navigation to the error page.

But again, this is not the recommended way to do it, better is to secure the data much deeper in the business logic.

Best regards,

Christian

Former Member
0 Kudos

Thank you Christian for your answer .

I could find one used document for CBA  ,in below link

http://go.sap.com/docs/download/2015/08/88071c7d-557c-0010-82c7-eda71af511fa.pdf.

I am thinking to do required check for country and role in my feeder class in "Initialization and GET_DATA"  ,rather than to implement new z feeder class containing "CL_EPM_PO_FORM_FEEDER" as super class as per above PDF and having different feeder classes for each Adaptation .

Can you please give me steps ,for securing data using CBA , via back end code . As ,i ma new to FPM

My Requirement : To show few additional fields/buttons to Manager

Answers (0)