Recommended SAP logging settings keep security-relevant events while limiting disk and table space use. Maintain static filters in the Security Audit Log, set HTTP, gateway, Java and HANA logging options, and archive each log area as described. The Cybersecurity Extension for SAP Solution Manager monitors these logs to detect indicators of compromise.
Executive Summary
The Cybersecurity Extension for SAP Solution Manager monitors SAP event logs to automatically detect and alert for indicators of compromise. The monitoring interval can be customized for each security metric based on risk and sizing. An interval of 60 seconds, for example, can support real-time threat detection, but real-time detection is only useful when supported by real-time incident response. Organizations that lack rapid response capabilities should opt for collection intervals of 10-15 minutes to balance the need to minimize the mean to detect (MTTD) with the system impact of continuous monitoring. Log settings also need to be carefully maintained to capture security-relevant events while preventing the accumulation of log data and the consumption of excessive disk or table space. The recommended settings and archiving procedures cover the Security Audit Log, Read Access Log, change documents, Business Transaction Log, system log, HTTP log, gateway server, Java security log and HANA audit log. Together they enable comprehensive forensic logs with minimal system impact.
Key Takeaways
- A 60-second monitoring interval can support real-time threat detection, but only when backed by real-time incident response.
- Organizations without rapid response capabilities should opt for collection intervals of 10-15 minutes.
- Export Security Audit Log events older than 30 days with SM20, then delete them with background job RSAUPURG.
- The business transaction log (STAD) and the system log need no specific settings or archiving.
- Set the HANA target audit trails to CSTABLE and SYSLOGPROTOCOL to log to internal tables and the OS-level system log.
What monitoring interval should the Cybersecurity Extension use?
Organizations without rapid response capabilities should opt for collection intervals of 10-15 minutes. The Cybersecurity Extension for SAP Solution Manager monitors SAP event logs to automatically detect and alert for indicators of compromise.
The monitoring interval can be customized for each security metric based on risk and sizing. An interval of 60 seconds, for example, can support real-time threat detection. However, real-time detection is only useful when supported by real-time incident response. Longer intervals balance the need to minimize the mean to detect (MTTD) with the system impact of continuous monitoring.
How do the recommended settings differ by log area?
The following table compares the recommended settings and archiving for each SAP log area.
| Log area | Recommended settings | Archiving |
|---|---|---|
| Security Audit Log | Static filters in all clients | Export events older than 30 days with SM20, then delete with RSAUPURG via SM18 |
| Read Access Log | Configure or import logging purposes | Archive SRAL objects with SARA; archives can be exported and stored offline |
| Change documents | Triggered automatically for user changes | Archive with SARA |
| Business Transaction Log (STAD) | No specific settings | Not required; data is retained for only 48 hours |
| System log | No specific settings | Not required; the log is a ring buffer |
| HTTP log | LOGFORMAT includes the URL, for example CLF | Export and archive offline from /usr/sap/SID/instance/work |
| Gateway server | ACTION includes SsZMP | Archive work directory log files to an external location |
| Java security log | Three ume properties set to TRUE | Automatic archiving activated in the Log Manager |
| HANA audit log | Target audit trails CSTABLE and SYSLOGPROTOCOL; audit policies for critical actions | Export AUDIT_LOG with the AUDIT OPERATOR privilege, then truncate the audit trail |
How should the Security Audit Log be configured?
Maintain static filters to log all actions by the standard SAP* user, logons and transaction starts by the DDIC user, and Severe and Critical events for all audit classes and users. Also create a static filter to log the non-critical event IDs BU4, CUY, DU9, DUI, and FU1. The filters should be applied to all clients.
If you have yet to remove the EarlyWatch client, also create a filter to monitor events for all audit classes and users in client 066.
Periodically export events older than 30 days using transaction SM20. Once the events are successfully exported and backed-up to a file server, trigger the background job RSAUPURG to delete events older than 30 days using transaction SM18.
How are the Read Access Log and change documents set up and archived?
For the Read Access Log, configure or import logging purposes to log access to sensitive fields and tables including user tables. Archive SRAL objects using transaction SARA. RAL archives can be exported and stored offline.
Change documents for user changes are triggered automatically. Similar to the Read Access Log, change documents are archived using transaction SARA.
Do the Business Transaction Log and system log need settings or archiving?
No. There are no specific settings required for the Business Transaction Log (STAD). Since data is retained for only 48 hours, STAD archiving is also not required.
Similarly, the system log does not require any specific settings or archiving. The system log is a ring buffer. When the log file reaches its maximum size, the system overwrites the oldest data.
How should the HTTP log and gateway server logging be configured?
The LOGFORMAT option for HTTP logging should specify a format that includes the URL in log entries. An example is the CLF format. HTTP log files in the /usr/sap/SID/instance/work directory can be exported and archived offline.
The ACTION option for gateway logging should include the actions SsZMP to capture security events, configuration changes, and monitor commands. Gateway log files can also be found in the work directory of each instance and archived to an external location.
How should the Java security log be configured?
Set the value of the properties ume.logon.security_policy.log_client_hostaddress, ume.secaudit.get_object_name, and ume.secaudit.log_actor to TRUE. This includes the client host address, object name and actor in logged events.
Automatic archiving should be activated using the Log Manager. Once activated, the compressed archives can be found in usr\sap\<SID>\JC<Instance number>\j2ee\cluster\<Dispatcher or server>\log\archive.
How should the HANA audit log be configured and archived?
Set the target audit trails to CSTABLE and SYSLOGPROTOCOL to log events simultaneously to internal tables and the OS-level system log. Audit policies should be configured to log critical actions including all actions performed by the SYSTEM user, system changes, user changes, role changes, repository changes, and unsuccessful logons.
The contents of the AUDIT_LOG table can be exported using the AUDIT OPERATOR privilege in the HANA Studio. Once exported, navigate to the Auditing tab in the Security section and select the option to truncate the audit trail.
For detailed step-by-step instructions, refer to the section on Log Settings and Maintenance in the user manual for the Cybersecurity Extension for SAP Solution Manager.
Frequently Asked Questions
What monitoring interval should organizations without rapid incident response use?
Organizations that lack rapid response capabilities should opt for collection intervals of 10-15 minutes. This balances the need to minimize the mean to detect (MTTD) with the system impact of continuous monitoring. A 60-second interval is only useful with real-time incident response.
How often should Security Audit Log events be exported and deleted?
Periodically export events older than 30 days using transaction SM20. Once they are exported and backed-up to a file server, trigger the background job RSAUPURG using transaction SM18 to delete events older than 30 days.
Which SAP logs do not need specific settings or archiving?
The Business Transaction Log (STAD) and the system log. STAD data is retained for only 48 hours, so archiving is not required. The system log is a ring buffer that overwrites the oldest data when the log file reaches its maximum size.
What should the gateway ACTION option include?
The ACTION option for gateway logging should include the actions SsZMP. These capture security events, configuration changes, and monitor commands. Gateway log files are in the work directory of each instance and can be archived to an external location.
How is the HANA audit log exported and cleared?
Export the contents of the AUDIT_LOG table using the AUDIT OPERATOR privilege in the HANA Studio. Once exported, navigate to the Auditing tab in the Security section and select the option to truncate the audit trail.