
The location of the secinfo ACL file is specified by the profile parameter gw/sec_info
.
The secinfo ACL contains rules related to 'Started external RFC Servers'.
Every line corresponds one rule. A rule defines
P or D
at the beginning of a rule.USER=
.Please note: If a rule should be restricted to certain users please be aware that for 'USER' it is not possible to maintain a comma separated list. Instead separate rules must be created.
USER-HOST=
.HOST=
.TP=
based on the executable name or its fullpath (e.g., if it is not in $PATH).On SAP NetWeaver AS ABAP starting external programs by the local RFC Gateways is commonly used. For example the STMS calls the executable ‘tp’ during transport management, transaction SM49/SM69 calls 'sapxpg' to execute OS commands, or 'saphttp' is called to connect to content servers (if not switched to the ICM plugin as described in SAP note 2570180).
To identify this use case we can look for TCP/IP connections with "Technical Setting" - "Activation Type = Start on Application Server":
We can verify this during runtime by going to transaction SMGW and look for the active connections:
or by going to "Logged on Clients" and looking for lines with "System Type = External Client" and "Gateway Host = 127.0.0.1" (in some cases this may be any other IP address or hostname of a server of the same system). The related program name can be found in column ‘TP Name’:
Please note: 'SAPXPG' has a special behavior: Whenever a command is executed in SM49/SM69 a temporary TCP/TP connection named '%_TCPIP_%<n>' will be created with the program name '/usr/sap/$SAPSYSTEMNAME/<Instance-Name>/exe/sapxpg' and the actual command as parameters. After execution this temporary TCP/IP connection will be deleted.
Since these programs are shown only during their execution it would be a better approach to look into the log files of the RFC Gateway and search for 'secinfo accepted:' or 'secinfo denied:' to identify which programs have been called in the past, e.g.,:
SAP introduced an internal rule in the secinfo ACL to allow the starting of any programs on the same server :
P USER=* USER-HOST=internal,local HOST=internal,local TP=*
This rule is generated when gw/acl_mode = 1 is set but no custom secinfo ACL was defined.
It is common to define this rule also in a custom reginfo file as the last rule.
The RFC Gateway allows to connect to remote hosts using SSH or remote shell (depending on the configuration in the corresponding TCP/IP connection and the value of parameter 'gw/rem_start') to execute programs on it.
Please note: Additional setup is necessary to allow SSH or remote shell connections to be made from the sidadm to the remote server.
To identify this use case we can look for TCP/IP connections with "Technical Setting" - "Activation Type = Start on Explicit Host" and a "Target Host" different from hosts of the application servers of the same system.
For this scenario a custom rule in the secinfo ACL would be necessary, e.g.,
P USER=<username> USER-HOST=internal,local,<rfc-client-host> HOST=<target-host> TP=<TP-Name>
Please note: This use case is very uncommon. So, SAP recommends to set the value of the parameter 'gw/rem_start' to 'DISABLED'.
RFC clients can also connect to a remote RFC Gateway using RFC or SNC to start programs on its host.
To identify use cases for starting external programs via remote RFC Gateways from our AS ABAP we can look for TCP/IP connections with "Technical Setting" - "Activation Type = Start on Explicit Host" and a "Target Host" as well as "Gateway Host" different from the IP address or hostname of any application server of the same system.
For this scenario acustom rule in the secinfo ACL of the remote RFC Gateway would be necessary, e.g.,
P USER=<username> USER-HOST=<AS-host>,<rfc-client-host> HOST=local TP=<TP-Name>
Please note: sapxpg implements a special feature for starting programs/scripts or executing commands on OS level. This is described in part 8 of this series.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |