Skip to content
Learn · SAP access risk

SAP RFC security: SM59 destinations, S_RFC and trusted RFC

How RFC connections are secured in SAP: SM59 destinations, S_RFC, trusted RFC, UCON allow-listing and the findings auditors raise.

Last reviewed · Rinexis SAP security team

Definition

SAP RFC security is the set of controls over Remote Function Call, the protocol SAP systems and external programs use to call remote-enabled function modules in an ABAP system. It covers RFC destinations in SM59, the S_RFC authorization object, trusted relationships between systems, and allow-listing of callable function modules with Unified Connectivity (UCON).

What RFC is and why it matters

Remote Function Call (RFC) lets one system execute a function module in another. Only function modules flagged as remote-enabled in their attributes (RFMs) can be called this way. Interfaces, middleware, other SAP systems, GRC, Solution Manager and BAPIs all rely on it, so many ABAP systems receive more RFC calls than dialog logons.

RFC is a back door into the same data and functions that dialog users reach through transactions. A caller with a valid logon and enough S_RFC authorization can read tables, create users or post documents through RFMs without ever starting a transaction, so transaction-level controls and SoD analysis that only looks at S_TCODE miss it.

RFC destinations in SM59

Outbound connections are defined as RFC destinations in SM59 and stored in table RFCDES. The Logon & Security tab decides how the calling system authenticates in the target, and that choice is where most risk sits.

Logon options for an ABAP connection (type 3) destination.
OptionHow it logs onMain risk
Stored user and passwordEvery call uses the same user and password saved in the destinationAnyone allowed to use the destination acts as that user in the target system
Current userThe caller's own user ID is used in the target, with a password or single sign-onLow, provided the user exists in the target with appropriate roles
Trusted relationshipThe target trusts the calling system and accepts the caller's identity without a passwordA compromise of the trusted system extends to the trusting system

Destinations with stored credentials can be restricted with an authorization group on the destination, which is then checked against authorization object S_ICF (field ICF_FIELD = DEST, ICF_VALUE = the group). Without it, any user who can run a program that calls the destination can use the stored logon.

The S_RFC authorization object

When an RFC call arrives, the target system checks S_RFC for the logged-on user before running the function module. It is an ordinary authorization object maintained in PFCG roles.

Fields of S_RFC.
FieldMeaningTypical values
RFC_TYPEType of RFC object being protectedFUGR (function group) or FUNC (single function module)
RFC_NAMEName of the function group or function moduleThe function group name, or for FUNC a module such as BAPI_USER_GET_DETAIL
ACTVTActivity16 (Execute)

S_RFC with RFC_NAME = * lets the user call every RFM in the system, including function modules that read arbitrary tables, maintain users or run operating-system commands where such RFMs exist. Combined with a password stored in a destination, it turns an interface user into a general-purpose remote administrator. Build values instead from a trace: STAUTHTRACE or ST01 on the target show exactly which function groups the interface calls, and FUNC-level values are tighter still.

The check itself is governed by profile parameter auth/rfc_authority_check. Value 0 switches the S_RFC check off, which auditors treat as a finding; values of 1 and above keep it active, and higher values tighten it further (for example by also checking function group SRFC, apart from basic functions such as RFC_PING). Check the parameter documentation in RZ11 for your release.

Trusted RFC: SMT1 and S_RFCACL

A trusted relationship is set up in the trusting (called) system with SMT1, which registers the trusted (calling) system. A destination with Trust Relationship = Yes then logs on without a password. The trusting system authorizes the incoming identity with S_RFCACL, assigned to the user in the trusting system.

Fields of S_RFCACL.
FieldRestricts
RFC_SYSIDSystem ID of the calling (trusted) system
RFC_CLIENTClient of the calling system
RFC_USERUser ID in the calling system
RFC_EQUSERWhether the caller may only log on as the same user ID (Y) or as a different one (N)
RFC_TCODETransaction the call originates from
RFC_INFOAdditional information (not used in current releases)
ACTVT16 (Execute)

S_RFCACL with RFC_USER = * and RFC_EQUSER = N lets any user in the trusted system log on as the target user, whatever its access. Trust should run from higher to equal security levels only: a development or test system must never be trusted by production.

UCON and gateway controls

Unified Connectivity (UCON) adds an allow list on top of S_RFC. In UCONCOCKPIT you log which RFMs are called from outside the system over a period, place the ones you need in a communication assembly, and then block every other RFM for external callers regardless of the caller's authorizations. It is activated with profile parameter ucon/rfc/active, and each RFM passes through logging, evaluation and final phases.

Separately, the RFC gateway's access control lists, secinfo and reginfo, decide which external programs may be started or registered at the gateway. They protect the transport layer rather than individual function modules, but an open gateway undermines the rest of RFC security, so they belong in the same review.

To see RFC activity, enable the RFC/CPIC logon and RFC function call classes in the Security Audit Log. Function-call logging is high volume, so filter it to interface users or critical RFMs.

Common audit findings

  • Destinations with stored passwords for dialog users or named people, instead of a dedicated communication or system user. See SAP user types.
  • Destinations that store a highly privileged user, such as one holding SAP_ALL, especially from a development or test system into production.
  • Interface and communication users with S_RFC RFC_NAME = *, often inherited from a vendor's installation guide and never narrowed.
  • Trusted relationships from non-production systems into production, or S_RFCACL granted with wildcards.
  • auth/rfc_authority_check set to 0, UCON never activated, or gateway ACLs left permissive.
  • No ownership: destinations nobody can explain, with no record of which interface uses them.

For evidence, auditors usually ask for an RFCDES extract or SM59 screenshots, the roles and S_RFC values of every user named in a destination, the S_RFCACL holders and the relevant profile parameter values from RZ11.

Frequently asked questions

What is the S_RFC authorization object?

S_RFC is the SAP authorization object checked when a function module is called remotely. It has three fields: RFC_TYPE (function group or function module), RFC_NAME (the name of the group or module) and ACTVT, where 16 means execute. The calling user must hold a matching value in the target system.

Why is S_RFC with * dangerous?

A full wildcard lets the user call every remote-enabled function module in the system, including ones that read any table or maintain users. If the user's password is stored in an RFC destination, everyone who can use that destination inherits this access without any transaction-level control.

What is the difference between trusted RFC and a destination with a stored password?

A stored-password destination always logs on as one fixed user. A trusted RFC destination passes the caller's own identity to a trusting system, which accepts it without a password, provided the user holds a matching S_RFCACL authorization in the target system.

What does SAP UCON do?

Unified Connectivity lets an administrator log which remote-enabled function modules are actually called from outside the system, approve the needed ones in a communication assembly, and block all others for external RFC callers, even if their S_RFC authorizations would allow the call.

Which user type should an RFC destination use?

Use a dedicated system or communication user that cannot log on through the GUI, with roles limited to the function modules the interface needs. Avoid dialog users and personal accounts, whose passwords may change and whose access is usually far broader than the interface requires.

How Rinexis handles this

Sodly matches the transactions and authorizations held by users and roles against your ruleset, so interface and communication users are analyzed for SoD conflicts like any other user, rated and grouped by process area. Ask Reductus answers plain-English questions over those findings and roles without writing to SAP.

Our consultants review RFC destinations, interface users and their roles as part of authorization design and audit readiness work, and the ITGC Audit Control module tracks the resulting control tests, evidence and findings.

See your own SAP access risk, not a textbook example

Talk to an SAP security specialist about your roles, ruleset and audit timeline, or explore the platform modules that analyse and fix access risk.