Reading Sample Sappress 1481 Sap System Security Guide
Reading Sample Sappress 1481 Sap System Security Guide
Reading Sample Sappress 1481 Sap System Security Guide
Reading Sample
In these chapters you will learn how to secure SAP system clients
and how to log system activities and prepare for audits.
“Securing Clients”
“Auditing and Logging”
Contents
Index
The Authors
www.sap-press.com/4307
Chapter 4
Securing Clients
Before reading this chapter, you must have a basic understanding of 4
the client concept in an SAP system. You must also understand how to
navigate within SAP GUI.
In an SAP NetWeaver system, all business data is isolated on the client level. This
means that users that work in one client can’t access the data of another client. This
architecture is ideal for shared systems that multiple organizations might use. It also
allows for the separation of different clients for different activities or use cases. For
example, testing clients and development clients could be created on the same SAP
installation to allow users to develop and test in the same system without getting in
each other’s way. Some organizations will choose to have multiple development cli-
ents, or multiple test clients. Others will use different clients to separate HR and
finance activities. Some organizations will have each of their subsidiaries operate in
a separate client in the same master system.
Here are the basic rules that define clients:
쐍 Clients can never read or write to other clients.
쐍 The business data of a client is separated from other clients.
쐍 Clients share the same SID but have different client numbers.
쐍 Multiple clients may exist in an SAP system.
쐍 Clients may be copied or deleted and won’t affect other clients.
How is a client different than just having another system? To start, multiple clients
can exist in a single system. A client will typically represent a separate organization
or company within an SAP system but share the same technical SAP NetWeaver
instance. Therefore, the overhead to maintain the instance is shared. However, some
organizations will adhere to a strict, productive single client per system. It all
depends on the architecture your organization has chosen.
You can think of clients as floors of an office building. Multiple organizations can
occupy offices on different floors in an office building. All the building tenants share
79
4 Securing Clients 4.1 Client Settings
the same infrastructure (power, water, Internet, heating), but they operate as sepa- on how your SAP system has been set up. You’ll also see one or more productive
rate entities isolated from each other by the floor and ceiling. What’s said on one clients, or clients that contain your business data. These are clients that your users
floor isn’t overheard on another. A disruption on the top floor won’t affect the bot- will log in to and perform work on. Later in this chapter (Section 4.1.3), we’ll cover
tom floor. more about securing clients, but for now let’s explore the basics.
One key takeaway from this example is that in the office building some infrastruc- Now that you’re familiar with the concept of multiple clients, let’s explore the possible 4
ture is shared; in an SAP system, this shared infrastructure is called client-indepen- settings for each client. Some clients will be used to change code, others could be used
dent. Client-independent objects or tables are common for all clients. On the other for testing, and some will always be used by business end users in production. Client set-
hand, client-dependent objects are never shared with other clients. tings tell the SAP system what’s allowable and what’s restricted in each of these clients.
In a production or testing client, you wouldn’t want a developer to be able to change
Client-Dependent Database Tables: MANDT Field objects. On the other hand, in a development client you would want this activity to be
The technical table field that denotes a client is the MANDT field. This field is present in allowed. Settings like this are what we use to achieve a desired client scenario. In Sec-
all client-dependent tables. Client-independent tables don’t have a MANDT field and tion 4.1, we’ll walk through how to check the current settings for a client.
represent any and all clients. Use care when changing client-independent tables as As security administrators, we’re interested in client settings because we’d like to
they affect all clients. prevent users from being able to change objects unless absolutely necessary. Even if
the client settings are correct in one client, an errant setting in another client could
Most SAP NetWeaver systems have at least two clients, if not more. To identify what lead to changes being made and passed to another client within the same system,
clients exist in your SAP system, simply look at table T000, the clients table (see Figure even if that client had the correct settings. It’s imperative that client settings are
4.1). closely managed for all clients within both an SAP system and all SAP systems within
a landscape.
From time to time an administrator may be asked to change the settings of a client.
This activity should always be done temporarily because a client should have a steady
state in which its settings are fixed. Often, clients are opened for simple changes and
are then forgotten about and stay open until the next audit—or even worse, a mali-
cious user—discovers the issue. Take care not to let this happen in your organization.
Figure 4.1 Table T000: Client List 1. Navigate to Transaction SCC4 (see Figure 4.2).
2. Double-click the client you’d like to view. For this example, client 001 has been
Common clients you will see are client 000, client 001, and client 066. These clients selected (Figure 4.3).
are usually delivered/created by SAP. You may see more or fewer clients, depending
80 81
4 Securing Clients 4.1 Client Settings
Now that you know how to navigate to these settings, let’s explore the information
on this screen in more detail.
82 83
4 Securing Clients 4.1 Client Settings
Table 4.1 Suggested Client Settings for Client 000 in All Systems
84 85
4 Securing Clients 4.1 Client Settings
86 87
4 Securing Clients 4.2 Client Logon Locking
4. Double click on the row of the client you’d like to change settings for (Figure 4.6). 6. Once you’ve made your changes, click the Save icon .
Depending on your chosen client settings, you may see a transport request. This is to
ensure that your settings can be move to any other systems you choose. If you don’t
want to transport your client settings, delete the transport that you create to contain
this change. 4
5. The system will now display, in change mode, the settings for the client you have Remote Locking
selected (Figure 4.7). This procedure can be done in any client, to any client, or with an RFC connection to a
remote system with the proper authorizations.
Figure 4.7 Change Mode in Transaction SCC4 Figure 4.8 Enter Lock Client Function Module Name
88 89
4 Securing Clients 4.2 Client Logon Locking
3. Enter the number of the client for which you’d like to prevent logon (Figure 4.9). To unlock a client, follow these steps:
Click the Execute button in the toolbar. 1. Navigate to Transaction SE37.
2. Enter the Function Module name “SCCR_UNLOCK_CLIENT” and click the Test/Exe-
cute button in the toolbar (Figure 4.11).
4
90 91
4 Securing Clients
4.3 Summary
In this chapter, you learned about client settings and how they’re used to control
what’s allowed in each client. We covered what settings are appropriate in specific cli-
ent roles and what the production client should be set to. You also learned how to
lock users out of a client and how to reverse that lock.
In the next chapter, you will learn about the set of executables that make up the SAP
NetWeaver AS ABAP system, called the kernel. The kernel is an integral part of the sys-
tem that administrators must keep up to date.
92
Chapter 11
Auditing and Logging
To keep a system secure, it’s essential to have eyes on all parts of the
system and the changes being made therein. Security audit logging
records all security events for later analysis; table logging records
changes made to tables, including when the changes were made and
by whom. In this chapter, you’ll learn to configure and enable security
audit logging and table logging.
11
Certain activities in the SAP system are periodically checked and reviewed by an audi-
tor. Therefore, you must ensure that those activities are recorded in the system. The
security audit log provides a framework to record security-related events in the sys-
tem—for example, Remote Function Calls (RFCs), logon attempts, changes to the
audit configuration, and so on. The security audit log doesn’t log changes to the data
within the SAP system that are stored in the database. However, with the table-log-
ging functionality, you can record changes to a table. It’s not recommended to log all
table changes—only the ones that are considered important and hence for which
changes must be traceable. For example, important tables include table T000 (clients),
table TCUR (exchange rates), and others.
To analyze the workload of the SAP system, you can use the Workload Monitor, which
is also a neat tool to analyze a user’s history. The Workload Monitor records historical
usage data and allows you to drill down on a user level.
As data protection laws gain ground, protecting your data becomes more and more
important. To protect the privacy of and personal information in your SAP system,
along with sensitive and classified data, you can use Read Access Logging (RAL) to
record read activity.
In this chapter, you’ll learn how the different logging functionalities work, what
makes them unique, and the impact on your system.
379
11 Auditing and Logging 11.2 Internal Audits
11.1 External Audits given free access to a system, which tends to change the scope of the audit to what-
ever the auditor feels like digging into.
Often, a security administrator will find herself being asked to help with an external
Often, external audits are focused into categories similar to the following:
audit. Before we tackle the task of assisting with an audit, first we’ll cover what these
audits do for a company. 쐍 Internal controls
External audits are typically financial; that is, they center on the financial records of 쐍 Network activity
the company. These audits typically focus on any customer running the SAP ERP or 쐍 Database activity
SAP S/4HANA finance functionality on SAP NetWeaver AS ABAP. Two common 쐍 Login activity (success and failures)
audits that organizations go through are to check compliance with the Sarbanes- 쐍 Account or user activity
Oxley Act (SOX) and the International Financial Reporting Standard (IFRS). Each of
쐍 Information access
these audits is performed by an external auditor, an organization outside of your own
that performs the audit. This organization will send one or several auditors who will For each such category, the auditor will require proof that the controls for that cate-
be tasked with observing and recording proof that the practices of your organization gory are being applied. They may also ask for a random sample of users or transports,
comply with the controls required for your audit. or even provide a time frame and ask to see logs or proof that controls were being 11
The Sarbanes-Oxley Act of 2002 set forth internal financial auditing controls in the adhered to for that time.
United States that must be adhered to when preparing financial information for
reporting purposes. US-based financial systems are routinely audited to SOX stan-
dards. 11.2 Internal Audits
IFRS is an audit of accounting systems such that they can be compared between Internal audits are performed by individuals within your own organization. Often,
countries reliability. It’s common to see IFRS audits performed for multinational they focus on preparing for an external audit. However, this isn’t always the case.
companies. Internal audits can be used to ensure that a specific control or policy is being followed
Besides these two, there are many other audits that vary country by country. These by examining system activity, logs, or even user master records. This type of activity
auditing standards generally are prepared by a country’s government-mandated is usually mandated by either the security administrator or an internal audit depart-
accounting standards organizations and commonly follow Generally Accepted ment for the purposes of verification.
Auditing Standards (GAAS). Quite often, when an internal audit is performed, the objective is to improve adher-
The external auditor will be working off a set of controls, in which the security admin- ence to the controls that will be followed for an external audit. This will often leave
istrator will most likely be the person that is running the queries in the SAP system to the security administrator with a to-do list to satisfy the audit requirements. In addi-
satisfy those queries. Most queries are run through the User Information System tion, the security administrator may be consulted to help create controls that will
(UIS; Transaction SUIM). We’ll cover the use of the AIS later in this chapter. Auditors help keep compliance such that it’s not a major effort when an external audit is per-
may also ask for the output of some standard reports, among other things. formed.
Often, auditors may also ask for access to your system to run reports on their own. One of the common tasks for an internally led audit is to manage the number of users
Unless this is legally required, it’s a good idea to deny this request. When given the that have powerful authorizations, like SAP_ALL, or access to perform business-criti-
choice, it’s a more efficient practice for the SAP security administrator to run queries cal tasks, like pay vendors or create accounts. This is done by evaluating the roles and
given to them by an auditor. This is done to keep the security administrator in con- authorization objects that each user master record contains.
trol of the scope of the audit. If an audit is for financial compliance, the auditor The internal audit is also a good time to determine the effectiveness of your general
should be looking at finance-related authorization objects. Too often, auditors are security operations and process. Defining a set of controls and evaluating your
380 381
11 Auditing and Logging 11.3 Auditing Tools
system and users based on those controls can help enforce a strong, consistent level In addition to these events, the security audit log also logs certain activities that
of security. aren’t categorizable, such as the following:
쐍 Activation and deactivation of the HTTP security session management or
instances in which HTTP security sections were hard-exited
11.3 Auditing Tools 쐍 File downloads
SAP systems are equipped with a set of tools that can be used for auditing. Such tools 쐍 Access to the file system that coincides with the valid logical paths and file names
include the security audit log, the system log, table logging, the Workload Monitor, as specified in the system (particularly helpful in an analysis phase to determine
well as Read Access Logging and the User Information System. All these tools can be where access to files takes place before activating the actual validation)
utilized to extract and analyze data about certain activities in the system, such as 쐍 ICF recorder entries or changes to the administration settings
who logged on to a system, who changed a certain table, who accessed certain data,
쐍 The use of digital signatures performed by the system
and more. We'll explore each of these tools in more detail in the next sections.
쐍 Viruses found by the Virus Scan Interface
쐍 Errors that occur in the Virus Scan Interface
11.3.1 Security Audit Log 11
쐍 Unsuccessful password checks for a specific user in a specific client
The security audit log (SAL) records security-related activities in the system, such as
Once activated, the system will record the activities into a log file on the application
changes to user master records, logon attempts, RFCs, and so on. This tool is designed
server.
for auditors to log and review the activities in the system. With the SAL, an auditor
can reestablish a series of events that happened in the system.
Warning
The SAL offers wide flexibility in its usage. You can activate and deactivate it, as well
as change the filters as necessary. For example, you can activate the SAL before an Be cautious when activating the security audit log because it contains personal infor-
audit takes place and deactivate it once the audit has been performed. Also, you can mation that may be protected by data protection regulations—especially with the
new GDPR regulation from the European Union but also other protection laws in
change the filters and, for example, monitor a user if you've detected suspicious
other regions. Make sure that you adhere to the regulations in your area.
activity in the system.
The audit log must be activated before it can be used. To activate the audit log, you
have to specify which activities you want to record in the security audit log. The fol-
Versions
lowing activities are available:
Your SAP_BASIS component affects your version of the security audit log. With SAP
쐍 Successful and unsuccessful dialog logon attempts NetWeaver 7.5 SP 03 for SAP_BASIS, SAP has introduced new functionality in the
쐍 Successful and unsuccessful RFC logon attempts security audit log.
쐍 RFCs to function modules In the old version, the main transactions for the security audit log were Transactions
쐍 Changes to user master records SM18, SM19, and SM20. In the new version, SAP introduced several new transactions:
쐍 Successful and unsuccessful transaction starts 쐍 Transaction RSAU_CONFIG
쐍 Successful and unsuccessful report starts Maintenance of the kernel parameters and selection profiles relevant for the secu-
쐍 Changes to the audit configuration
rity audit log
382 383
11 Auditing and Logging 11.3 Auditing Tools
Configuration
Usage Scenarios The new security audit log offers an enhanced configuration via Transaction RSAU_
Depending on your requirements, you can define usage scenarios differently. With CONFIG. Let's explore configuration in detail now.
the new security audit logging capability, you can define how and where you want to In general, the security audit log requires some parameters and the definition of fil-
store the audit log, as well as how to access it. With the old security audit log, you ters that define which events will be logged.
could only save data on the file system of the application server; with the new func-
To define the parameters, enter Transaction RSAU_CONFIG and open the Parameter
tionality, you can either save on the file system of the application server or in its data-
folder (Figure 11.1).
base. Also, shared scenarios are possible in which some parts will be stored in the
database and the some in the file system.
384 385
11 Auditing and Logging 11.3 Auditing Tools
Create New Profile. Once the profile is created, you can go ahead and define the set-
tings. Remember that each profile must have at least one filter. To add additional fil-
ters, you can simply right-click the Profile folder and choose Create Filter.
Regardless of the filter you create and specify, it’s important to activate the filter once
defined by clicking the Activate button (Figure 11.2). Only active filters will be selected
at the next system start. You can define as many filters as you have defined in the
parameter maintenance for each profile.
11
Figure 11.1 Parameter Maintenance in Security Audit Log Configuration in Transaction Figure 11.2 Activation of Filters in Transaction RSAU_CONFIG
RSAU_CONFIG
Each filter that you add to a profile is linked via an OR connector. So, for example, if
The following can be configured: you have two filters, and the first filter logs everything for user group SUPER and the
쐍 Activate or deactivate logging. second filter everything for users starting with RFC*, then those two filters are OR
linked. That means that all users that belong to user group SUPER and all users start-
쐍 Define the recording target, whether it’s on the file system, in the database, or a
ing with RFC* will be logged. Note that user groups only allow for a specific value and
combined recording in both the file system and database.
that you can’t use wildcards as you can for the user name.
쐍 Define the number of filters per profile, up to 90.
In the Standard Selection screen, shown in Figure 11.3, where you define the client and
쐍 Define if you’ll allow generic user selection with an asterisk (*) character in the fil-
whether you want to restrict the logging of a user name or user group, you can select
ters.
the user group either positively or negatively. Select by User Group (Positive) means
쐍 Define if you log the IP address of the originator and not the terminal ID.
that you will log all users that are part of that user group. If you use the negative selec-
쐍 Activate or deactivate integrity protection format for log files in the file system. tion, the system logs the events for all users who aren’t part of the user group. Possi-
쐍 Define the memory space usage when file system storage is used. ble scenarios for a negative selection can include wanting to log RFC function calls for
쐍 Define the recording type in the database, whether it’s temporary data or perma- all users who aren’t technical and hence aren’t part of a certain user group because
nent data. those users shouldn’t perform RFCs.
In the profiles, you define which events will be logged. To create a new profile or an
additional profile, simply right-click the Static Configuration folder and choose
386 387
11 Auditing and Logging 11.3 Auditing Tools
In the Event Selection screen (Figure 11.4), you can define which events you want to
log. In the Classic event selection, you get the same options as in the old security
audit log.
11
Figure 11.5 Detailed Event Selection Options in Security Audit Log Configuration
In the Detail event selection (Figure 11.5), you can slice and dice on a more granular
level and pick and choose events more specifically. For example, in the classical selec-
tion, you choose Dialog Logon, whereas in the detailed selection you can decide
whether you want successful logons or failed logons.
If you defined the selection in the classic event selection, the underlying detailed
events will be selected.
To start the logging of a filter, it’s important that the switch Filter for Recording Active
is selected. You can have active and inactive filters. Therefore, it’s important to keep
an eye on the Active checkbox, as well as if the filter has been activated.
Figure 11.6 Log Data Administration Initial Screen
388 389
11 Auditing and Logging 11.3 Auditing Tools
Integrity Protection
With the integrity protection setting of the SAL, you can protect the security audit log
from manipulation of its log files on the file system. However, it doesn’t prevent the
manipulation of the file but it will tell you if it was manipulated.
To protect the integrity of your files, you can create one hash-based message authen-
tication code (HMAC) per system. To create the HMAC key, choose Configure Integ-
rity Protection Format from the initial screen (Figure 11.7) and define your secret
Passphrase.
11
If you wish to restore the key, a local backup file is generated that can be used in com-
bination with the passphrase. Make sure to store the backup file and passphrase so
that you can check the integrity of the system later.
If you decide not to create an individual system HMAC key, your integrity is at risk
because the integrated key must be considered to be known, as it is set to a default
value. That means that you can check the files only against unintentional corruption
or change and not against malicious manipulation.
Once configured, all log files written forward will be checked by the integrity protec-
tion format. To check the integrity of the files, you can choose Check Integrity of the
Files on the initial screen (Figure 11.8).
Shorter time frames can be analyzed in the foreground. However, larger periods will Figure 11.9 Display the Last Integrity Check Status
be run in the background. Once the check has been performed, you’ll see an overview
of all the files and their attributes (Figure 11.9). Also, you’ll see the status, which indi- To quickly navigate back to the last integrity check, you can choose the Display Last
cates whether the file has integrity issues or not. Integrity Check Status option in the selection screen.
390 391
11 Auditing and Logging 11.3 Auditing Tools
Reorganize Log Files Remember, the deletion of log files should be carried out through this transaction
To reorganize log files by means of deleting the physical file from the file system, you because it performs an authorization check and follows the deletion process for files
can choose Reorganize log files from the initial screen (Figure 11.10). You can delete or in the integrity protection format. Deleting files manually from the file system is
display the data to be reorganized, as well as run a simulation mode first. The simula- considered a manipulation.
tion mode lets you see what will happen if you deselect the checkbox.
Reorganize Log Table
Reorganization of the database table is important when logging is activated to be
stored exclusively in the database table. For all other scenarios, reorganization is not
necessary; for example, APIs will delete the data after the transfer.
To delete data from the table, choose the Reorganize log table selection (Figure 11.12)
and enter the date before which you want data to be deleted.
11
The minimum age decides which files will be deleted. Once executed, you’ll see a
results screen (Figure 11.11) indicating which old files will be deleted (if run without
simulation).
Figure 11.12 Reorganize Log Table in Database
392 393
11 Auditing and Logging 11.3 Auditing Tools
In the Data source selection (Figure 11.15), you can define if you want to read all your
files, a specific file or directory, or your database tables. 11
The result screen shows the logged events in detail. For example, in Figure 11.16, you
can see successful logons by user WF-BATCH.
In the Standard Selections (Figure 11.14), you can set the selection type and, for exam-
ple, search based on a specific user, client, terminal, or audit class or based on the crit-
icality of the event. Also, you can reuse your filters and search for specific filters only.
The Instance Name field lets you input the instance that you want to evaluate. If you
have multiple application servers and want to only include the current application
instance, you can use the value <LOCAL>. Figure 11.16 Evaluation of Log Data Result Screen
394 395
11 Auditing and Logging 11.3 Auditing Tools
Evaluate Archived Log Data The local log is always up to date, whereas the central log might have a slight delay as
To evaluate archived log data, you can use Transaction RSAU_READ_ARC (Figure the data must be written from the local application server to the central server.
11.17). In the selection screen, you can set the period, as well as other selections like the The main transaction to analyze the system log is Transaction SM21 (Figure 11.18), in
client, user, terminal, and so on. which you can read the system log and its messages. In the selection screen, you can
define basic and extended attributes to get to the messages that are most important
to you.
11
396 397
11 Auditing and Logging 11.3 Auditing Tools
After you double-click an item, you’ll see to the details of the message (Figure 11.20) to 쐍 ALL
dive further into the error. In addition to details about the message and the session, Logging always takes place; for client-specific tables, it takes place for all clients.
as well as technical and parameter details, you can also navigate to the trace from the Caution: This setting makes sense only in special cases. Note that in the case of ALL,
menu bar. changes are recorded in the log file for all test clients (including SAP client 000).
Once the table logging has been activated, you can define which tables will be logged.
To activate logging for a particular table, you have to define the properties in the
table itself. You can do that from Transaction SE13. SAP predelivers customizing
tables with the table change logging activated.
For the example shown in Figure 11.21 for table RFCDES (RFC Destinations), the table
change log is activated.
11
In the trace, you can see all the steps that the system performed for the message that
you selected. Analyzing traces requires a deep understanding of the SAP system and
is definitely an expert-tool only.
398 399
11 Auditing and Logging 11.3 Auditing Tools
In the output view, you can get the details of what’s been changed in the table. In
Figure 11.24, you can see changes to table T000 (clients). You can see the type of
change, as well as which transaction and program were used to perform the change.
Warning
In an SAP NetWeaver 7.50 system with SAP ERP installed, SAP defined close to 30,000
tables with the table change log. Most of the tables are customizing tables and
hence do not contain master data that changes regularly.
11
Analyze Logs Figure 11.24 Display Table Change Logs
To analyze the changes that have been logged, you again can use Transaction SCU3. In
Transaction SCU3, go to Analyze Logs and make your selections. In the selection screen The data being analyzed in Transaction SCU3 is stored in table DBTABLOG. Transaction
(Figure 11.23), you must select one specific table or customizing object for analysis. SCU3 offers a fully functional cockpit to analyze the data efficiently.
This is enforced because the amount of data can be huge. For reporting purposes, we
suggest using the ALV Grid Display, which lets you sort and filter the output. SAP Note 1916
For more information about table logging, see SAP Note 1916 (Logging of Table
Changes in R/3).
Performance Impact
Table change logging shouldn’t have a performance impact if you only log customiz-
ing tables. Although SAP delivers many tables with table logging activated, those
tables usually contain little data that rarely changes. Avoid logging for master data
and transaction data tables because those tables are subject to mass changes and
hence would have a negative impact on the system performance. For custom tables,
you can define whether you want to activate table logging or not.
If you experience negative performance after activating table logging, you can find
out which tables log the most amount of data. In Transaction SCU3, you can validate
the table logging via the menu path Administration • Number of Logs (Selection). In
the selection screen (Figure 11.25), leave the Table Name field empty and analyze the
Figure 11.23 Evaluate Table Change Log in Transaction SCU3 last month (or extend the time if required).
400 401
11 Auditing and Logging 11.3 Auditing Tools
Figure 11.27 Workload Monitor for Specific User Profile in Transaction ST03N
Table logging shouldn’t have an impact on your overall system performance and
hence is a helpful feature to ensure the traceability of changes to customizing and
The workload is deactivated by default as it increases the chances for performance
other important tables in your SAP system.
implications. Therefore, we recommend activating it temporarily for specific analy-
sis. Before activation, make sure that you adhere to the laws and regulations in your
territory.
402 403
11 Auditing and Logging 11.3 Auditing Tools
Warning
Analyzing user activities may not be permitted based on your area of operation. Also,
personal data protection regulations like GDPR may prohibit the use of such informa-
tion.
404 405
11 Auditing and Logging 11.3 Auditing Tools
For simplified operation of the RAL, you can define an exclusion list of users that 2. In the menu, click the User drop-down, then select With Critical Authorizations
won’t be logged. A common scenario is to exclude batch job users that perform mul- and click the Execute icon (Figure 11.29).
tiple reads, which would lead to a significant number of logs.
Once the configuration has been activated successfully, you can start to monitor the Direct Access
log entries in the Web Dynpro application. To review the logs, you can go to Read Alternatively, you can run report RSUSR008_009_NEW in Transaction SA38.
Access Log in the Monitor tab. You can search channel-specific, date-specific, or user
name-specific logs. 3. Next, choose the For Critical Authorizations radio button in the Variant Name box.
For the variant name, choose the predelivered SAP_RSUSR009 variant (Figure
11.3.6 User Information System 11.30).
The User Information System is one of the main tools required for both internal and
external audits. This tool is a directory for several programs that facilitate the
retrieval of information required for an audit. Most of the tools focus on users and
authorizations. However, the AIS also contains a powerful change document feature. 11
Each function is organized by its type in the menu tree and can be launched by dou-
ble-clicking the Execute button to the left of the function name.
As an example, let’s look up users with critical authorization combinations. This is a
common report used by auditors to satisfy audit controls. Proceed as follows:
1. Navigate to Transaction SUIM.
406 407
11 Auditing and Logging 11.4 Summary
The system will return a list of critical authorizations (Figure 11.31) that each user has
Define Your Own Critical Authorizations in your system. If you have many super users, or administrators, this list could be in
You can also define a list of critical authorizations. You may receive a list of critical the thousands or tens of thousands. A review of this list and its users is done often,
authorizations or transaction codes from your internal auditor, external auditor, or with the appropriateness of each user’s access reviewed by either internal or external
functional business analysts. You may need to come up with this list on your own. A auditors.
good starting point is to use the SAP delivered variant, SAP_RSUSR009, but be sure to
adjust it for your auditing use.
11.4 Summary
4. Click the Execute button.
In this chapter, you learned about internal and external audits and their purpose in
an organization. You learned about auditing tools like security audit logging, the sys-
tem log, table logging, the Workload Monitor, and Read Access Logging. Finally, you
learned about the User Information System and how to use it to find users with criti-
cal authorizations.
11
In the next chapter, you’ll learn about how to secure network communications to
and from your SAP NetWeaver AS ABAP system. This is an important subject for a
security administrator because most attacks against an SAP system use the network
as an attack vector.
408 409
Contents
Preface ..................................................................................................................................................... 19
1 Introduction 25
7
Contents Contents
8 9
Contents Contents
6.2.4 Communication User: Type C .......................................................................... 117 6.18 Password and Logon Security ........................................................................................ 158
6.2.5 Reference User: Type L ....................................................................................... 117 6.18.1 Where Does SAP Store Passwords? ................................................................ 158
6.3 The User Buffer .................................................................................................................... 117 6.18.2 What Is the Code Version? ................................................................................ 159
6.18.3 Why Do I Have to Protect These Tables? ...................................................... 159
6.4 Creating and Maintaining a User ................................................................................. 118
6.18.4 Logon Procedure ................................................................................................... 160
6.4.1 Documentation .................................................................................................... 119
6.18.5 Password Change Policy ..................................................................................... 161
6.4.2 Address .................................................................................................................... 120
6.4.3 Logon Data ............................................................................................................. 121 6.19 Segregation of Duties ........................................................................................................ 163
6.4.4 Secure Network Communication ................................................................... 122 6.20 Summary ................................................................................................................................. 165
6.4.5 Defaults ................................................................................................................... 123
6.4.6 Parameters ............................................................................................................. 124
6.4.7 Roles ......................................................................................................................... 125
6.4.8 Profiles ..................................................................................................................... 125
7 Configuring Authorizations 167
10 11
Contents Contents
7.3.3 Create a Master and Derived Role .................................................................. 207 7.12 Other Important Authorization Objects ................................................................... 249
7.3.4 Overview Status ................................................................................................... 213 7.12.1 Upload and Download Authorizations ......................................................... 249
7.3.5 Mass Generation of Profiles ............................................................................. 214 7.12.2 Report Authorizations ......................................................................................... 250
7.3.6 Mass Comparison ................................................................................................ 215 7.12.3 Background Jobs ................................................................................................... 251
7.3.7 Role Menu Comparison ...................................................................................... 216 7.12.4 ABAP Workbench .................................................................................................. 251
7.3.8 Role Versioning ..................................................................................................... 217 7.12.5 Batch Sessions ....................................................................................................... 251
7.4 Assign and Remove Roles ................................................................................................ 219 7.12.6 Query Authorizations .......................................................................................... 251
7.12.7 Remote Function Call Authorizations ............................................................ 252
7.5 Lock and Unlock Transactions ....................................................................................... 221
7.13 Transaction SACF: Switchable Authorizations ....................................................... 253
7.6 Transaction SUIM: User Information System ......................................................... 221
7.6.1 User ........................................................................................................................... 222 7.14 Customizing Entries in Tables PRGN_CUST and SSM_CUST ............................ 255
7.6.2 Roles ......................................................................................................................... 223 7.15 Mass Maintenance of Values within Roles .............................................................. 257
7.6.3 Profiles ..................................................................................................................... 223
7.16 Upgrading to a New Release .......................................................................................... 260
7.6.4 Authorizations ...................................................................................................... 223
7.6.5 Authorization Objects ........................................................................................ 224 7.17 ABAP Debugger .................................................................................................................... 267
7.6.6 Transasctions ........................................................................................................ 224 7.18 Authorization Redesign and Cleanup ......................................................................... 269
7.6.7 Comparisons .......................................................................................................... 224 7.18.1 Business Impact of Security Redesign ........................................................... 270
7.6.8 Where-Used Lists ................................................................................................. 225 7.18.2 Reducing the Business Impact of a Role Redesign Project ..................... 270
7.6.9 Change Documents ............................................................................................. 225 7.18.3 Gathering Authorization Data ......................................................................... 271
7.7 Role Transport ...................................................................................................................... 226 7.18.4 Testing Role Changes in Production .............................................................. 272
7.18.5 Automate Role Creation and Testing ............................................................ 273
7.8 Common Standard Profiles ............................................................................................. 228
7.19 Introduction to SAP GRC Access Control ................................................................... 273
7.9 Types of Transactions ........................................................................................................ 229
7.19.1 Access Risk Analysis ............................................................................................. 273
7.9.1 Dialog Transactions ............................................................................................. 230
7.19.2 Access Request Management .......................................................................... 274
7.9.2 Report Transactions ............................................................................................ 230
7.19.3 Business Role Management .............................................................................. 274
7.9.3 Object-Oriented Transactions ......................................................................... 231
7.19.4 Emergency Access Management .................................................................... 275
7.9.4 Variant Transactions ........................................................................................... 231
7.19.5 Segregation of Duties Management Process .............................................. 275
7.9.5 Parameter Transaction ....................................................................................... 234
7.9.6 Call Transaction in Transaction SE97 ............................................................ 237 7.20 Summary ................................................................................................................................. 277
12 13
Contents Contents
14 15
Contents Contents
12.5 Summary ................................................................................................................................. 431 14.2 Securing the Database Connection ............................................................................. 495
14.2.1 Understanding the Database Connect Sequence ..................................... 495
14.2.2 SAP HANA Database: HDB User Store ........................................................... 498
14.2.3 Oracle Database: Secure Storage in File System ........................................ 500
13 Configuring Encryption 433 14.2.4 Microsoft SQL Server: Authentication ........................................................... 504
14.3 Logging and Encrypting Your Database .................................................................... 507
13.1 Introduction to Cryptography ....................................................................................... 433
14.3.1 SAP HANA Data Volume Encryption .............................................................. 508
13.1.1 Encryption in Depth ............................................................................................ 434
14.3.2 Oracle Transparent Data Encryption ............................................................. 511
13.1.2 Secure Communication in SAP NetWeaver ................................................. 448
14.3.3 MSSQL Server ......................................................................................................... 511
13.2 Enabling SSL/TLS ................................................................................................................. 451
14.4 Summary ................................................................................................................................. 511
13.2.1 Setting System Parameters .............................................................................. 451
13.2.2 Creating the TLS/SSL PSE ................................................................................... 454
13.2.3 Testing TLS/SSL ..................................................................................................... 460
13.2.4 Requesting and Installing Certificates .......................................................... 464 15 Infrastructure Security 513
16 17
Contents
18
Index
2FA .............................................................................. 280 Authorization (Cont.)
redesign ............................................................... 269
A trace ...................................................................... 180
Authorization checks .......................................... 169
ABAP debugger ...................................................... 267 exceptions ........................................................... 171
ABAP Program Editor ............................................. 70 maintain .............................................................. 173
ABAP support packages ......................................... 99 TSTCA check ....................................................... 169
ABAP system identifier ...................................... 300 Authorization object ........................................... 169
ABAP Workbench .................................................. 251 maintenance ...................................................... 197
Access control .............................................. 433, 523 status .................................................................... 198
Access Control List (ACL) ......................... 411, 469 Authorizations ....................................... 71, 115, 167
Access Request Management .......................... 274
ACL ........................................................... 376, 418, 473 B
file syntax ............................................................ 419
syntax ................................................................... 419 Background jobs ................................................... 251
trace files ............................................................. 422 Basis .............................................................................. 43
Active Directory Domain Services ................. 297 Basis administrator ................................................ 21
Adversaries ................................................................. 30 Botnets ......................................................................... 29
ALG logs .................................................................... 422 BR*Tools ................................................................... 502
ALV Grid Display ................................................... 400 Brute force attack .......................................... 29, 159
ALV list ...................................................................... 130 Business Process Change Analyzer ............... 357
Application logs ..................................................... 540 Business Role Management ............................. 274
Application-level gateways ............................... 414 Business secure cell .................................... 415, 514
Application-level proxies .................................. 414
ASCS profile ................................................................ 49 C
Assertions ................................................................ 282
Asymmetric communication .......................... 442 CA ................................................................................ 445
Asymmetric encryption ........................... 439, 442 Call transaction ..................................................... 237
Attack surface ........................................... 26, 41, 489 CA-signed certificates ......................................... 371
Attack vector .................................................... 41, 513 Central User Administration (CUA) ..... 147, 275
Audit logs ................................................................. 540 Certificate Authority ........................................... 444
Audit regulations .................................................. 522 Certificate revocation list .................................. 541
Auditing .......................................................... 379, 524 Certificate signing request ....................... 290, 429
Audits ........................................................................... 42 Certificates .............................................................. 282
Authentication ...................................................... 523 block ...................................................................... 551
Authentication servers ....................................... 282 Change documents .............................................. 129
authfile ...................................................................... 477 Change management .......................................... 524
Authorization Change Request Management
cleanup ................................................................. 269 (ChaRM) ...................................................... 357, 519
data ............................................................. 171, 271 Channels .................................................................. 404
download ............................................................ 249 ChaRM .............................................................. 357, 519
profiles ........................................................ 115, 125 Child role .................................................................. 207
565
Index Index
566 567
Index Index
568 569
Index Index
570 571
Index Index
Table authorizations (Cont.) Transaction (Cont.) Transaction (Cont.) Treble control ......................................................... 164
cross-client ......................................................... 241 MMRV ..................................................................... 73 SM50 ..................................................................... 111 Trust chain .............................................................. 445
groups .................................................................. 240 object-oriented .................................................. 229 SM51 ....................................................................... 111 Trust Manager ............................................... 290, 449
line-oriented ...................................................... 241 OKP1 ......................................................................... 73 SM59 ............................................................ 252, 349 TSTC check ............................................................... 169
Table logging .......................................................... 398 PA20 ......................................................................... 73 SMICM .................................................................. 468 Two-factor authentication (2FA) .................... 280
Table T000 .................................................................. 80 PA30 ......................................................................... 73 SMMS .................................................................... 420
Table views .............................................................. 245 parameter ............................................................ 229 SNCWIZARD .................................... 286, 287, 300 U
TDMS ......................................................................... 518 PFCG ......................................... 122, 164, 168, 192 SNOTE ................................................................... 348
Tenable Network Security ................................. 557 PFCGMASSVAL .................................................. 257 SPAM ..................................................................... 341 Upgrade management ....................................... 524
Test Data Migration Server ............................... 518 report ..................................................................... 229 SQ00 ..................................................................... 252 Usage and procedure logging .......................... 357
The Onion Concept ................................................. 34 RSAU_ADMIN .................................................... 389 SQVI ....................................................................... 251 User
Thierry Zoller ......................................................... 462 RSAU_CONFIG ................................................... 385 SRALMANAGER ................................................. 404 access reviews ................................................... 156
Threat vector ............................................................. 26 RSAU_READ_LOG ............................................ 393 SSFA ....................................................................... 541 change documents .......................................... 129
Three-tier landscape ................................... 280, 516 RZ10 .................................................. 54, 56, 59, 453 SSM2 ...................................................................... 123 change role assignments .............................. 136
Ticket-granting ticket ......................................... 285 RZ11 .................................................................... 56, 58 ST01 ....................................................................... 179 classifications .................................................... 152
TLS .............................................................................. 446 SA38 ......................................................................... 72 ST03N .................................................................... 403 copy ....................................................................... 128
TLS/SSL SAFC ....................................................................... 254 ST22 ........................................................................ 111 default settings ................................................. 123
PSE ......................................................................... 455 SAML2 ................................................................... 316 STAD ...................................................................... 178 inactive ................................................................ 157
testing .................................................................. 460 SCC1 .......................................................................... 72 STAUTHTRACE .................................................. 176 licensing ............................................................... 153
TMS ................................................................... 116, 359 SCC4 ................................................................ 81, 234 STMS .............................................. 69, 72, 361, 372 log on verification ........................................... 160
authorizations .................................................. 373 SCC5 ......................................................................... 72 STRUST .................................... 102, 289, 449, 543 mass comparison ............................................. 215
configuration .................................................... 363 SCOT ...................................................................... 231 STUSOBTRACE ................................................... 180 mass processing ............................................... 131
default passwords ........................................... 367 SCU3 ....................................................................... 399 SU01 .................................................... 118, 122, 171 naming conventions ...................................... 139
Linux ..................................................................... 376 SCUM ..................................................................... 149 SU03 ...................................................................... 169 operations ........................................................... 135
RFC connections ............................................... 370 SE01 .......................................................................... 72 SU10 ...................................................... 72, 122, 131 search by logon ................................................ 133
route ...................................................................... 359 SE10 .......................................................................... 89 SU21 ................................................................ 72, 169 tables .................................................................... 153
SNC-protected RFC .......................................... 371 SE11 ........................................................................... 72 SU22 ....................................................................... 260 User administration ............................................ 145
user roles ............................................................. 374 SE16 .................................................... 153, 160, 240 SU24 ............................................. 72, 173, 192, 198 User buffer ...................................................... 118, 173
users ...................................................................... 367 SE16N ..................................................................... 240 SU3 ......................................................................... 124 User classification ................................................ 127
TMSADM user ........................................................ 367 SE17 ............................................................... 160, 240 SU53 ....................................................................... 172 User directory ........................................................ 281
Tokens ....................................................................... 282 SE37 .......................................................................... 89 SU56 ............................................................. 118, 173 User groups ............................................................. 145
Trace data ................................................................ 179 SE38 .......................................................... 70, 72, 368 SUGR ..................................................................... 145 User ID ...................................................................... 115
reuse ...................................................................... 179 SE93 ........................................................................ 170 SUIM ......................................... 221, 354, 380, 406 cryptic ................................................................... 139
Transaction SE97 ........................................................................ 237 SUPC ...................................................................... 214 User information system ............... 217, 382, 406
access control ....................................................... 69 SECPOL .................................................................. 140 SW37 ......................................................................... 72 User master record ........................... 115, 118, 145
administrative ..................................................... 72 SGEN ...................................................................... 112 variant .................................................................. 229 User master table .................................................. 151
AUTH_SWITCH_OBJECTS ............................. 264 SHD0 ..................................................................... 232 VSCAN ................................................................... 535 User types ................................................................ 115
CAT6 ......................................................................... 73 SICF ......................................................................... 460 Transport .................................................................. 360 default .................................................................. 154
CATS ......................................................................... 73 SICK ........................................................................ 111 administrator .................................................... 375 dialog users ........................................................ 139
CRCONFIG ........................................................... 545 SM01 ........................................................................ 73 domain ................................................................. 360 RFC users ............................................................. 139
dialog .................................................................... 229 SM01_CUS .......................................... 73, 221, 384 layer ....................................................................... 423
F110 ........................................................................... 73 SM01_DEV .................................................... 73, 221 operator ............................................................... 375 V
FK03 ................................................... 172, 184, 198 SM21 ............................................................. 111, 397 viewer .................................................................... 375
locking ........................................................... 69, 221 SM30 ........................................... 72, 147, 160, 240 Transport Layer Security ................................... 446 Value role ................................................................. 182
MIRO ........................................................................ 73 SM31 ....................................................................... 240 Transport Management System Variant transactions ............................................ 229
MMPV ...................................................................... 73 SM49 ........................................................................ 72 (TMS) .................................................... 69, 116, 359
572 573
Index
574
First-hand knowledge.