Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › ABAP Platform

SAP OAuth2 Security Hardening: Restrict Redirect URIs and Token Endpoints on ABAP Platform

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For SAP AS ABAP, OAuth2 hardening starts with the correct product and role: an inbound OAuth server registration is not configured in the same place as an outbound OAuth client, and ABAP Platform controls are different from SAP BTP/XSUAA or Commerce Cloud settings. Require SSL, register an exact client-owned redirect URI, limit grants and scopes, separate registrations by application, and review exposure of the dedicated ICF authorization and token nodes.

The documented ABAP endpoints are /sap/bc/sec/oauth2/authorize and /sap/bc/sec/oauth2/token. SAP documentation establishes SSL prerequisites and endpoint paths, but it does not establish one universal ABAP parameter that allowlists or disables the token endpoint across releases. Treat endpoint filtering, proxy rules, and ICF activation as release- and topology-specific controls that must be verified in the target system.

As an Amazon Associate I earn from qualifying purchases.

First identify the SAP product and OAuth role

“SAP OAuth2” is not one configuration surface. Before changing a setting, record the product, release, system topology, and whether the system is acting as an OAuth authorization server or as a client calling another service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Deployment or role What the cited SAP documentation covers Do not assume
AS ABAP / ABAP Platform as OAuth server Registered clients, authorization-code redirects, grants, scopes, and dedicated ICF authorization and token endpoints. That an outbound-client transaction controls inbound server registrations.
ABAP Platform as outbound OAuth client The current client configuration UI, grant selection, endpoint settings, redirect URI server, client authentication, and scopes. That SOAUTH2_CLIENT alone restricts which external applications can obtain tokens from an ABAP server.
SAP Commerce Cloud Its own redirect-URI behavior, including absolute redirect URIs by default and PKCE requirements for public clients in that implementation. That Commerce Cloud switches or property names exist in ABAP Platform.
SAP BTP/XSUAA The application security descriptor’s oauth2-configuration values, including redirect URIs used by the XSUAA broker. That BTP descriptor settings are ABAP ICF or ABAP client-registration settings.

If the requirement is “which registered applications may receive tokens from ABAP,” work in the ABAP OAuth server administration and client-registration controls. If the requirement is “how does ABAP call an OAuth provider,” use the outbound client configuration and its transaction-specific settings.

#1 Best Overall

Core hardening controls for ABAP OAuth2

Require SSL for authorization and token exchanges

Configure HTTPS for both the authorization-code exchange and token requests. SAP identifies SSL as a prerequisite for the ABAP authorization-code flow and for the authorization and token endpoint documentation. A deployment that permits credentials, authorization codes, or access tokens over clear HTTP is not a hardened deployment.

  • Use the HTTPS host name that clients are expected to reach, including any reverse proxy or Web Dispatcher arrangement.
  • Ensure the certificate chain is trusted by browsers, applications, and integration runtimes that perform the exchange.
  • Check that proxy forwarding does not cause the application to generate an HTTP redirect URI when the registered value is HTTPS.
  • Test both endpoints after TLS termination and after any host or port changes; a proxy configuration can make a technically enabled TLS backend appear insecure to clients.

Register one exact, client-owned redirect URI

In the authorization-code flow, the authorization server uses the redirect URI defined during client registration. Register a URI that belongs to the specific application and verify ownership before activation. Treat the value as an exact security boundary: scheme, host, port, path, and any required trailing slash must match the application’s actual callback.

Do not use a broad wildcard, a shared callback that dispatches to arbitrary tenants, or a URI controlled by another team unless the ownership and routing model are documented. When an application has separate test and production callbacks, register them deliberately as separate values or separate clients according to your release process; do not silently broaden a production registration to accommodate temporary testing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Limit grants to the integration’s actual need

ABAP-related configuration surfaces can present multiple grant types, including authorization code, SAML bearer, client credentials, and resource-owner-password options in different SAP contexts. The presence of a grant in a UI is not a reason to enable it. Select only the flow required by the application, and remove unused grants from existing registrations.

  • Authorization code: Use when an end user authorizes a web application and the application receives a callback. Protect the redirect URI and the short-lived code exchange.
  • Client credentials: Use only for a machine-to-machine integration whose identity is represented by the client itself; do not add it to an interactive client merely for convenience.
  • SAML bearer: Enable only when the integration’s trust model and SAP-supported flow require a SAML assertion.
  • Resource-owner password: Treat as a legacy-sensitive option. Do not enable it unless a specific, supported integration requires it and its credential-handling implications have been accepted.

Assign narrow scopes and separate registrations

SAP recommends registering an OAuth2 client for each web service or application that should be accessible to end users. Follow that separation instead of creating one high-privilege registration for unrelated integrations. Assign only the scopes needed by that client and its resource owners.

Separate registrations make revocation, rotation, incident investigation, and ownership clear. A payroll integration should not inherit scopes needed by a reporting portal, and a development client should not share production credentials or redirect URIs. Review scopes whenever an API is added, removed, or changed; unused scope assignments are unnecessary authorization surface.

Use an appropriate client-authentication method and protect credentials

The ABAP client configuration includes a client authentication mechanism. Choose the method supported by the target flow and application type, and store secrets in the system’s protected credential facilities rather than source code, browser code, tickets, or shared documents. Public clients cannot safely keep a confidential secret; confidential server-side clients must still rotate and restrict their credentials.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to configure an outbound ABAP OAuth client

For an ABAP system calling an OAuth provider, SAP recommends the newer SOAUTH2_CLIENT configuration UI instead of the legacy OA2C_CONFIG transaction. The exact fields and available flows depend on the ABAP release and provider.

  1. Open transaction SOAUTH2_CLIENT and identify the client registration used by the integration. Do not assume a legacy OA2C_CONFIG entry has identical behavior or fields.
  2. Confirm the selected grant type is required by the provider. Remove enabled alternatives that the integration does not use.
  3. Review the authorization and token endpoint values, including the HTTPS scheme, host, port, and path supplied by the provider.
  4. Check the configured redirect URI server where the flow uses a browser callback. It must correspond to the URI registered with the authorization server and to the deployed route.
  5. Review the client authentication mechanism and credential storage. Verify that secrets are not exposed in application logs or transportable configuration exports.
  6. Limit the requested scopes to the provider permissions needed by this client. Test a least-privilege request before asking for additional scopes.
  7. Run an end-to-end authorization and token exchange through the real proxy path, then inspect logs for unexpected HTTP redirects, host rewriting, or scope escalation.

This procedure configures ABAP as a client. Inbound server registrations, authorization-code policies, and which applications may obtain ABAP-issued tokens must be checked in the ABAP OAuth administration tools for the deployed release.

How to restrict ABAP authorization-code redirects

  1. List every application that uses the ABAP authorization server and assign a technical owner to each one.
  2. For each application, create or locate its dedicated OAuth client registration.
  3. Enter the application’s precise HTTPS callback URI. Include the correct host, port, path, and slash behavior; avoid catch-all patterns.
  4. Verify that the URI is controlled by that application and cannot be claimed by another tenant, environment, or team.
  5. Remove obsolete callbacks after a migration. If both old and new callbacks must coexist temporarily, document the end date and monitor usage.
  6. Exercise an authorization request with the registered URI and confirm the server returns to that exact location.
  7. Attempt a request with a changed host, path, scheme, or port and confirm it is rejected rather than redirected to the altered value.

The authorization-code procedure documented for ABAP Platform Version 2023 FPS02 (October 2024) gives a default authorization-code lifetime of 60 seconds. Treat that as the documented behavior of that release and procedure, not as a permanent default for every ABAP version. The same configuration supports optional refresh-token issuance and expiry settings; enable and size refresh-token use according to the integration’s need and the release’s documented controls.

How to secure the ABAP OAuth token endpoint

Know the endpoint and its exposure

The documented ABAP OAuth endpoints are:

  • Authorization endpoint: /sap/bc/sec/oauth2/authorize
  • Token endpoint: /sap/bc/sec/oauth2/token

Review these dedicated ICF nodes in the actual system, including their activation state, HTTPS binding, authentication behavior, and reachability through a reverse proxy or Web Dispatcher. The authorization-endpoint documentation identifies ABAP Platform Version 2025 FPS01 (February 2026), while the token-endpoint page is explicitly Version 2022 (October 2022); field names and administration details can therefore differ by release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not invent a universal allowlist switch

The cited SAP documentation establishes the endpoint paths and SSL requirement but does not document one universal ABAP setting that disables the token endpoint or allowlists requests by network, client, or URL across all releases. “Restrict the token endpoint” may mean different things:

  • requiring HTTPS and rejecting clear-text access;
  • limiting which registered clients and grants can obtain tokens;
  • restricting network reachability at a proxy, Web Dispatcher, firewall, or load balancer;
  • changing ICF node activation or authentication in a release-specific administration screen.

Choose the control that matches the threat model, then validate it against the exact ABAP release and topology. Do not advise deactivating the token node merely because it is exposed: integrations that legitimately need token exchange will fail, and a proxy rule that blocks one path may not account for alternate virtual hosts or routes.

Layer endpoint protection

  • Transport layer: enforce HTTPS and use valid certificates end to end or at the documented TLS termination boundary.
  • Registration layer: allow only known clients, required grant types, exact redirect URIs, and necessary scopes.
  • Network layer: where policy requires private access, apply version-appropriate proxy, Web Dispatcher, firewall, or load-balancer restrictions and test every supported entry point.
  • Operational layer: monitor failed token requests, redirect mismatches, unexpected clients, and scope changes; rotate credentials and remove abandoned registrations.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Release-aware validation checklist

Use this checklist before calling a hardening change complete:

  • Product is identified as ABAP Platform, BTP/XSUAA, Commerce Cloud, or another SAP service.
  • OAuth role is documented as inbound authorization server or outbound client.
  • Target ABAP release is recorded; SAP source pages cited for this topic span Version 2022, Version 2023 FPS02, and Version 2025 FPS01.
  • Both authorization and token exchanges require HTTPS.
  • Every authorization-code client has an exact, owned redirect URI.
  • Unused grants are disabled and client registrations are separated by application or web service.
  • Scopes are limited to the integration’s function and reviewed with the resource owner.
  • Client authentication and secret storage match the application type.
  • The ICF nodes /sap/bc/sec/oauth2/authorize and /sap/bc/sec/oauth2/token have been reviewed in the deployed system.
  • Any proxy or network restriction has been tested through the real production route.
  • No claimed “token endpoint allowlist” or disable parameter is used without release-specific SAP documentation.

Troubleshooting common failures

Redirect URI mismatch

Compare the registered and requested values character by character, including scheme, port, path, capitalization where relevant, and trailing slash. Check proxy-generated host and scheme headers if the browser reaches HTTPS but the application constructs an HTTP callback.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Invalid client or authentication failure

Confirm that the request uses the registration’s client identifier, the selected authentication mechanism, and an unexpired secret or certificate. Check that a confidential client is not being implemented as a browser-only public client.

Invalid scope or unauthorized grant

Compare the requested scopes and grant type with the registration and resource-owner assignments. Remove assumptions that a scope is available merely because an API exists; it must be assigned and permitted for that client.

Token endpoint unreachable after hardening

Trace the request through DNS, proxy, Web Dispatcher, firewall, and ICF. Confirm that the exact HTTPS virtual host and path are permitted. If a network rule was added, verify that it blocks only the intended sources and does not interfere with legitimate token exchanges.

Configuration instructions do not match the screen

Recheck the product and release. The SOAUTH2_CLIENT recommendation concerns outbound ABAP client configuration, while inbound server controls use ABAP OAuth administration. Commerce Cloud and BTP/XSUAA instructions should not be applied to AS ABAP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

On ABAP Platform, effective OAuth2 hardening is precise rather than a single switch: enforce SSL, bind each authorization-code client to an owned exact redirect URI, minimize grants and scopes, separate registrations, protect client authentication, and review the two dedicated ICF endpoints in the context of the actual release and network topology. Validate any token-endpoint filtering or deactivation with version-specific SAP documentation.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

ABAP PlatformOAuth2redirect URISAPSecurityToken Endpoint

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.