ECC Security Notes
ECC Security Notes
Security
SAP offers different tools, processes, and measures for security check to protect the
data. Sap security helps to ensure that users can only use the functionality of sap
which is a part of their job.
Security is a balancing act for protecting the sap data and its applications from
unauthorized use and access.
It refers to the implementation of measures to protect the system, data, and processes
from unauthorized access, misuse, or any damage.
There are Two Types of security:
• Internal security = managed by SAP authorization concept, access is
controlled at the application level.
• External security = managed by underlaying database system, access is
controlled at the database level.
USER ADMINISTRATION
Varun N
R/3 Security Notes
SAP access form = user must fill it himself providing the details.
Manager Approval
{It depends on Organization}
Role Owner Approval
Closed
SU01 Tabs
*Create *Modify *Display *Delete *Copy *Lock/Unlock *Change Password
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
➢ Default means common to every user like date format, decimal notation, time
format, printer details, time zone.
Varun N
R/3 Security Notes
➢ Profiles are interlinked with roles, and they get assigned automatically once
the roles are assigned.
➢ Maximum number of profiles that can be assigned to one user = 312.
Varun N
R/3 Security Notes
❖ Whenever you are copying the user, Address and password will not copy.
Change docs = To see changes done to the user in a time interval
Path: SU01 information Change documents for Users
Varun N
R/3 Security Notes
Under logon data, initial password (mandatory), it also consists of user type, user
group, validity period, etc.
There are five user types.
1) Dialog 4) Service
2) System 5) Reference
3) Communication
Dialog user type = default user type, interactive user, password parameters
are applied, Gui login is allowed.
Service user type = used for multiple dialog logons, password parameters
are not applied, Gui login is allowed.
Varun N
R/3 Security Notes
Reference user type = used for providing extra access to dialog ids, when it
accesses limit (312 profiles) is reached, no password required to login,
cannot login through Gui.
Ex = > Create reference user and assign two roles. and create one service
user assign the one role and also assign the reference user to this user in the
role tab, then one service user has access to three roles.
Varun N
R/3 Security Notes
Some facts
❖ User id maximum length = 12 characters. It differs from organization to
organization based on the combination of first and last name.
❖ Maximum no of profiles assigned to one user = 312.
❖ Mandatory fields for creating the user are last name and initial password.
❖ All the tables related to user starts with USR*
Ex = > USR02 User logon data.
USR40 User illegal password.
AUTHORIZATION CONCEPTS
In the above diagram, there will be many outer layers, in order to login to SAP
System you need to have break this firewall and the network. As a sap security
consultant, we don’t deal with firewall and the network.
We deal with Authentication to login to sap system by providing the login
credentials (user id, password). After entering SAP system whatever did inside is
Called Authorization.
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
For example, = HR member come and ask, what is the authorization object for
appraisal, payroll, and recruitment, first we need to find out the authorization
object.
Path = SU21 = > scroll down = > HR (Human resources)
Varun N
R/3 Security Notes
Note = necessary authorization object required for particular T code, have been
linked with SU24.
SU24 = > T code to find the authorization object related to any t code in SAP.
Path = > SU24 = > enter t code = SU01 {any T code} => we get authorization
object related to a particular T code. (filter on proposal by yes)
For example, = users come to you and asking that I want access to sales order
creation, printer, payroll. = > VA01, SP01, PA30
❖ First you need to ask for that T codes, once you aware of that, now pull the
auth objects related to these t codes than combine.
❖ After, create one singe role and assign these above 3 t codes + auth objects
related to these 3 t codes (group of t codes and its objects related to these t
codes) = Role.
Note = > we cannot assign T codes and authorization objects directly to the
users. Hence, we are placing them under a role and then the role is assigned to
user.
T Code = > It is an easily memorable code to navigate to the desired program
without the long names.
✓ T code acts as a shortcut to a program.
Varun N
R/3 Security Notes
✓ Whenever you are executing any t code the system as hitting in the
backend to show you the screen = > T code.
✓ SE93 = > maintenance of all t codes
✓ SE93 is a t code where you can find, create, maintain, display, delete and
modify, etc.
How to find what is the program related to the particular T code means
▪ Execute a T code called SE93 in a command field and click on enter.
▪ To find a program or auth object related to SU01 (any t codes), type the T
code in a transaction code field.
Varun N
R/3 Security Notes
▪ Then click on display it will show the program and auth object related to a
particular t code.
Note = > hence it is very difficult to remember the program instead of this they put
a shortcut code called T code.
SU01 = > program name = SAPMSUU0, SCC5 = > program name = SAPMSCC1
Varun N
R/3 Security Notes
➢ SAP recommends never assign the standard profiles to users. As they give
extra access. Hence, we assign roles to users which in turn assigns the
generated profiles to the users.
➢ Generated profiles cannot be assigned to user directly.
➢ Generated profiles are always starts with T.
➢ When you assign the roles to the users, the profiles will get automatically
assigned.
Varun N
R/3 Security Notes
ROLE
▪ It is a group of T codes and its related authorizations.
For example, = > Create a necessary role for each and every team in the project.
Following teams are there in the project, finance, HR, sales, basis, security, abap.
o HR team performs below activities.
* Personal administration = > PA20, PA30, PA40
* Organizational management = > PO10, PO13, PPOM
Role matrix
o Information gathered from all the technical teams, regarding the roles and
the types of roles and which access they needed.
o With in the business roles, in Sales department there can be various levels
of employees like clerk, supervisors, manager, senior manager.
For example, = > Sales team - sales support role, salesclerk role, sales supervisor
role, sales manager role.
Profile concept.
PFCG = > Profile generator / Role maintenance
Varun N
R/3 Security Notes
Old versions of SAP are SAP 3.0, 4.60, 4.66, 4.7, ECC5, ECC6……….
➢ In 4.7 version = > Major changes occurred in security area, role concept
has been introduced from 4.7 onwards, prior to that profile concept was
there
Profile Role
User Profile
User
Varun N
R/3 Security Notes
PFCG Tabs
Description = > just fill the long text with the information like why, when
and who is creating the role.
Varun N
R/3 Security Notes
How to see what does each field and each color represents in authorization tab
means:
User Tab = > indicates the list of users and assigned to the role, click on
user comparison, once done you will see the user comparison tab become
green.
Varun N
R/3 Security Notes
TESTING METHODS
Positive Testing
▪ Checking whether can executes the T codes under the role.
Negative Testing
▪ Ensuring the user is not executing other T codes, except which are not under
the role.
Authorization Tab
Traffic Lights
Varun N
R/3 Security Notes
✓ Green = > All authorization fields are filled or maintained with values.
Varun N
R/3 Security Notes
Organizational field
* Authorization objects contain authorization fields.
* Authorization objects is a group of ten authorization fields maximum.
It is of Two types: -
❖ Normal field = > The field which does not represents organization.
Example, = > Activity, role name
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
Note = > When we click on this symbol called "Where Used List"
(two hills with the sun rising in the background), it will show for which T-code the
authorization object is used and also shows auth fields and its value range.
Maintained = > Represents blank fields have been maintained with values.
Before
After, fill the blank field with some values the status has changed to
maintained.
Varun N
R/3 Security Notes
Maintain some value in Normal field (Activity) and click on save, the status
will be updated called changed.
Varun N
R/3 Security Notes
❖ Save = > when we click on save all the data will be saved.
❖ Expand = > When we click on a particular field and select the expand
option, the entire field will be expanded.
Varun N
R/3 Security Notes
❖ Collapse = > When some fields are expanded, clicking on the collapse
option will collapse that particular entry.
❖ Position = > When you click on any particular field and then select the
position option, the system will take you to the top of the screen. After
scrolling up, it will return to the normal view.
❖ Delete inactive = > To delete any authorizations, click on the specific field
and select the delete option.
❖ Only manually added and changed authorizations will be deleted.
Varun N
R/3 Security Notes
❖ Selection criteria = > When you select this option, a list of classes will be
displayed. Extend one class and select "Insert Chosen" above. This will add
the authorization object and show its status as "manually."
❖ Manually = > Here, you can directly insert authorization objects into the
role, without pulling them from SU24 or any of the T-codes. Type any
authorization object and click "Continue."
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
❖ Changed = > When we click on this, it will expand to show how many
objects have changed status.
❖ More = > when we click on this it will show, many options to maintain
authorizations and org levels.
Varun N
R/3 Security Notes
Profile Generation
This is done in two ways in Authorizations tab.
When we click on expert mode for profile generation there will be three actions
need to be performed: -
Delete and recreate profile and authorizations.
Edit old status.
Read old status and merge with new data.
* Click on continue.
Varun N
R/3 Security Notes
▪ Create a new role and add the T-code SCC4 in the Menu tab, then go to
change the authorization data in the authorizations tab.
▪ In the auth tab screen the authorization object called S_TABU_DIS (any
object), do Some customization, here I added Normal field (Activity) called
BD.
Before
After
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
→ Come back and add the T code called SM36 in the Menu tab, save.
→ Afte, go to the Authorizations tab and click on Expert Mode for profile
generation. Then, select the second option called "Edit Old Status."
Varun N
R/3 Security Notes
→ It does not pull the authorization data related to new T codes added in the
menu.
Varun N
R/3 Security Notes
➢ It also pulls the new authorization data related to all the T codes added in
the menu.
Varun N
R/3 Security Notes
➢ It also merges the old data with the new data wherever is possible.
➢ Without losing the old data merge the new data of the T code inserted in the
menu.
Note: -
Out of these three options the most favorable option is Read old status and
merge with new data.
During role creation there is no something called as old data hence we do
not go for expert mode in the role creation concept.
Composite Role
➢ It is a group of single roles.
Scenario: -
✓ Two abap roles = >
*Abap display single role.
*Abap full access single role.
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
When we click on composite role It will display the below screen with some
tabs and also You can see the difference between single and composite role
tabs.
Description = > just fill the long text with the information like why, when
and who is creating the role.
Menu = > Click on import menu to see the single roles and t code in it.
To convert menu to green color click on import menu option.
Varun N
R/3 Security Notes
User Tab = > indicates the list of users and assigned to the role, click on
user comparison, once done you will see the user comparison tab become
green.
Note = > When we assign the composite role to the any user in the user roles tab
another tab will be getting called indirect assignment tab, we can directly delete
Varun N
R/3 Security Notes
the composite role which was assigned, but not able to delete directly single roles
in that.
Master Role
➢ It is a parent role which has full access and contains org level as *
Derived role = > It is a single role which is derived from another single role.
=== What is the necessity of a derived role means?
When the client is
= > MNC - coke, BMW, nestle
= > Multiple business company – Tata, Dupont, total, Unilever
Coke
Varun N
R/3 Security Notes
In these diagram three roles are derived from one Master role.
Role Finance
T code = > FBV0
Auth object = > F_FICO_BUK
Activity = 16
Company code = *
For the Maintenance become easier we will use this concept.
➢ If any user requests extra access like t code or auth object, instead of
modifying derived roles we can directly do modifying in Master role.
➢ When You derive the roles from Master roles the T code, authorization
objects have been derived as it is.
➢ The Only difference between Master and derived role is the org field
Values.
Varun N
R/3 Security Notes
Here, I created a Master role with the t-codes PFCG, RSA1, and RSD1 and
maintained the org value Plan version as *. Additionally, I customized the
S_USER_AGR object with the role name as X* and generated the profile.
And also, I created another derived role for India. In the Description tab, there is
an option called "Derived from Role." In that field, I specified the Master role.
This is an extra thing you need to do in a derived role.
And also, we got a option called delete Inheritance relationship that means the
relationship has been established between Master and derived role.
Varun N
R/3 Security Notes
We can see the T codes whatever there in the Master role it will pull to the
derived role., and also here I maintained org value Plan version as 01.
Whatever I done customization in Master role It will not pull to this role, in order
to pull that customization, again go back to master role there will be another tab
generated called generate derived role, click on this.
Varun N
R/3 Security Notes
After clicking Generate derived roles tab, now go back and check in the derived
role everything the data will pushed to derived role expect org values.
But we see the Org Values in the tab whatever we maintained in derived role it
will not change.so that org value is not overwritten, only the normal fields are
overwritten.
Varun N
R/3 Security Notes
Another Example = > Create a role with company code value as * and we
have derived role for Germany, Malaysia, UK, with company code value as
200,300,400. Suppose if we add a new t code to master role and if we create
derive role from it, it will push the t code to Germany, Malaysia, UK, role,
but it will not touch the company code Value of derived roles. The
company code value will remain as it is. That is the concept of Master
and derived role.
If you want to add a new t code FB01 in these three derived roles, then you need
to add this t code to master role and derived roles will get modified accordingly.
The only difference between Master and derived role is org field values. i.e.,
company code values in this example.
Question = >How many derived roles can be derived in one Master role? Is
there any limit?
Role Tables
All the Tables related to roles starts with AGR* (Activity Group = > Role Name)
Varun N
R/3 Security Notes
▪ Enter a T code called SE16 in a sap Command field and click on enter.
▪ For ex --- Type the Table called AGR_DEFINE in the Table Name and
Click on enter.
Varun N
R/3 Security Notes
▪ After this, the below screen will open. Type the role name or use the search
option. If needed, you can also apply filters.
▪ Then you can click on execute to see what AGR_DEFINE Table contains.
Varun N
R/3 Security Notes
---- This table contains all role definitions, including Master (parent) and derived
role information. It also shows the user, change date, and time, which can be
filtered.
For Ex, another table called AGR_1252--- see in the below picture it will contain
role name and its Org Values.
Role Deletion
o Go to PFCG.
o Put the role name.
o Delete the role.
Varun N
R/3 Security Notes
= When the Role exists in Dev, quality, and PRD Systems, especially in Quality
and production, we will have PFCG display access only.
→ Go to PFCG
→ Put the role name.
→ Create Transport request.
→ Load the role into transport request.
→ Delete the role in development system.
→ Release the Transport request.
After clicking Transport role option, the below screen will come in these never
tick Personalization data and direct user assignment.
After that click on execute and Create Transport request, save and continue too
Next.
Varun N
R/3 Security Notes
After saving the TR, it shows the below screen which it contains Request
Number, Role Type, and the role status, if it is in green means then the role
recorded successfully.
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
❖ Task is space reserved for one user; on whose name the task is created only
that user can load the data into TR.
o E070
o E071
Varun N
R/3 Security Notes
▪ Intimate Basis Team that the TR has been released in dev system and
request them to transport the TR into Quality.
Varun N
R/3 Security Notes
Note = > Before releasing the TR ensure all the tasks under that TR are released.
Only when TR is released from dev system, only then basis team can move that
TR into Quality system. Else they cannot.
Role Modification
→ Single role
Modifying menu by adding/removing T codes from Menu.
Directly modifying authorization data.
→ Composite role
Adding/removing single roles from Roles tab.
→ Derived role = > Only Org Levels.
→ Master role
This is modified similar to single role., Modifying menu by
adding/removing T codes from Menu.
Directly modifying authorization data.
- Successfully logged into SAP System, but not able to execute the T code.
Varun N
R/3 Security Notes
• Role is expired.
• Profile is not generated for the role.
• User comparison is not done.
-Able to execute the T code, but not able to perform certain functions under that T
code.
• User does not have access to appropriate authorization values required for
the role assignment.
1) SU53
Varun N
R/3 Security Notes
❖ When its failure even gives you the authorization values related to the
failure.
❖ See the below picture it will which object is missing, T code, and their fields
based on that we will give the authorization.
2)SU56
❖ It is a temporary memory created when user logs into SAP System and
wipes out when the user logs out.
❖ When user executes any T code, System crosses check with the user buffer
not with the DB.
Varun N
R/3 Security Notes
In the SU56 screen, there is an option called Authorization Values. Click on that
and select the User Buffer option if any T-codes are not visible.
3)SUIM
It is a powerful tool for Security administrators to manage and audit user access
and roles. It helps ensure that the right people have the right access and that
security policies are being followed.
Varun N
R/3 Security Notes
1. User Information:
2. Role Information:
Varun N
R/3 Security Notes
3. Authorization Information:
4. Change Documents:
Varun N
R/3 Security Notes
✓ Roles: Shows the change history for roles, helping track modifications
over time.
5. Other Tools:
✓ Field Values: Lists the possible values for a given authorization field.
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
❖ Click on "Analysis" in ST01 screen and specify the user, date, and time to
view the recorded data. Then execute to see the Trace.
❖ Use the trace data to identify issues, such as unauthorized access attempts,
slow-performing SQL queries, or other system problems.
Varun N
R/3 Security Notes
Return Codes
➢ RC = > 0 --- Authorization is successful.
➢ RC = > 4 --- User has required authorization object, but different
authorization Values.
➢ RC = > 8 --- User does not have required authorization values in the user
buffer.
➢ RC = > 12 --- User does not have access to authorization object.
Note = > ST01 trace should be applied in the local server only. Hence before
applying ST01 trace, ensure that user and you are in the same system.
AL08 = > Users in each server.
SM51 = > List of application servers.
Varun N
R/3 Security Notes
STAUTHTRACE
Exclusive authorization Trace.
Trace is applied across all application servers.
Note = > This T code is available in the updated version of SAP.
How to Use STAUTHTRACE:
Access the Transaction:
o Enter STAUTHTRACE in the SAP command field and press Enter.
Perform Activities:
o Inform the user to perform the actions that are causing access issues, such
as trying to execute a transaction they cannot access.
Varun N
R/3 Security Notes
It displays the details about the authorization objects, field values, program
name and the return codes.
Note = > Click on System Wide Trace to view the trace for each application
server. Apply the necessary filters, then click on Execute.
Varun N
R/3 Security Notes
PFUD
Mass User Comparison
✓ For a single role we can do user comparison in PFCG -> User comparison
Tab.
Varun N
R/3 Security Notes
4) Cleanups
▪ It ensures that expired roles are removed from SU01, record of users.
Program related to PFUD = > PFCG_TIME_DEPENDENCY
SM01 = > Lock T code
EWZ5 = > Mass User Lock
SU10 = > SU12
Varun N
R/3 Security Notes
IMPLEMENTATION PHASE
Types of projects
Varun N
R/3 Security Notes
✓ SE16 = > USOBT, the image below is a screenshot of the USOBT screen. If
needed, you can apply the filters.
Varun N
R/3 Security Notes
✓ Then click on execute to see the columns like T code, auth object, field, and
its range values.
✓ The image below is a screenshot of the USOBX screen. If needed, you can
apply the filters and also see the difference between both the screens.
Varun N
R/3 Security Notes
✓ Then click on execute to see the columns like T code, auth object (cust)
OKFLAG and its Modifier name.
✓ Here OKFLAG contains the symbols called X, U, etc. and its description
shown below.
Note = >
Varun N
R/3 Security Notes
While the role is created, when T codes are added in the menu,
Authorization data is pulled from SU24.
For the safety purpose we have take a copy from SU22 to SU24, then when
we added T codes in the menu, it will pull from SU24 authorization data to
PFCG.
Varun N
R/3 Security Notes
Varun N
R/3 Security Notes
❖ S_USER_GRP * S_USER_AGR
❖ S_USER_AGR * S_USER_TCD
❖ S_USER_PRO * S_USER_PRO
❖ S_USER_AUTH * S_USER_VAL
❖ S_USER_SAS
❖ S_USER_SYS
3) Abap 4) Archiving 5) T Code
❖ S_BTCH_ADM * S_DATASET
❖ S_BTCH_JOB * S_PATH
❖ S_BTCH_NAM
❖ S_BTCH_MONI
Varun N
R/3 Security Notes
→ OSS = > online service system, it will come while creating authorization
object.
When we click on initial fill of customer tables, SU22 data will copy to
SU24, All the values are overwritten from SU22 to SU24, by losing some
customization. = Step 1
Varun N
R/3 Security Notes
➢ 2A (Compare with SAP Values) = > It will compare the SAP values
between SU22 and SU24. It will check with the standard application not
customized one.
→ 2B (Compare affected transactions) = > While we are running this
manual comparison is required it will ask u like which Authorizations you
want to proceed whether u want an SAP suggested or customized, most of
the cases we proceed with customized one that means SU24 data only.
2D (Displayed Changed T codes) = > When we click on this, it displays the
role name, description, old T-code (to be deleted), and newly introduced T-
code. For example, well-established roles from past years might have
authorization fields and objects tied to the old T-code. Removing these
without understanding could affect other T-codes that depend on the same
objects.
o 2C (Roles to be checked) = > It provides the lists of roles that need to be
reviewed for changes in authorizations, due to updates in transaction
codes. It helps identify roles that may require adjustments to maintain
proper access control.
✓ If anything made changes in SU24, then click on 3) Transport the
customer tables. = Step 3
Varun N
R/3 Security Notes
Note = > If we are performing first step called Initial fill the Customer tables,
then remaining steps are not needed.
Varun N
R/3 Security Notes
THANK
YOU
Varun N