SAP BTP service-key rotation: Verify the consumer before retiring old access
A manufacturer's nightly operational integration uses a service key that must be replaced without leaving its consumer on old credentials.
START HERE · NO PRIOR TOPIC KNOWLEDGE NEEDED
What it is. Why it matters.
A service key provides connection information or credentials for an authorized consumer. Rotation replaces that access material so users of the old key must be moved safely.
Completely new to SAP?
Manufacturers use SAP to connect work such as buying components, recording inventory, planning production, shipping equipment and accounting for costs. SAP S/4HANA is an enterprise resource planning system: it connects these activities through shared business data.
SAP Business Technology Platform, or BTP, provides cloud services for applications, data and integration. A connection needs a route, an identity and permission to perform the intended task.
A transaction code, or t-code, is a shortcut to a task in classic SAP GUI. Fiori apps provide another way to work. Names and screens depend on the product and release; you do not need a live system to learn the concepts in this guide.

Scope and source-review notes
Scope and evidence
Source review by FAST SAP SOLUTIONS® editorial. This badge describes our editorial review; it does not represent SAP certification or independent endorsement.
Service-key concepts and MTA renewal behavior described by the cited BTP documentation. Credential type, broker support and revocation behavior are service-specific; this is not a universal rotation command sequence.
Documentation review on 14 November 2026 using official SAP sources and indexed official excerpts where full Help text was unavailable. Scope and service or release differences are explained in the lesson. All datasets, requests and checks are illustrative; no customer SAP runtime execution or measured results are claimed.
A MANUFACTURING EXAMPLE
Rotate credentials used by a plant integration
Account for every consumer
Read the example values
- Consumer 1
- Main application
- Consumer 2
- Nightly integration
- New key
- Prepared
- Verification
- Both consumers moved
Words you’ll meet in this guide
- Backend
- The service or system doing the work behind an interface.
- Destination
- Named connection settings for another service.
- Credential
- Access information used to prove an identity.
- Subaccount
- A BTP scope for applications, services and access settings.
- BTP
- SAP Business Technology Platform: cloud services for applications, data and integration.
- API
- A defined interface through which programs exchange data or request actions.
- OAuth
- An authorization framework for delegated access, commonly using access tokens.
Preview the practical steps
SEE THE CONNECTION
See it in a simple example.
A small example to make the idea concrete.
Rotate credentials used by a plant integration
A manufacturer's nightly operational integration uses a service key that must be replaced without leaving its consumer on old credentials.
Rotation ends when consumers move and old access is retired
A service-key rotation is complete only when the intended consumers use the replacement access material and the previous access has been retired according to the service’s revocation behavior.
Identify what the service key actually contains and authorizes
A service key supplies connection information for supported consumption.
Worked case: an API consumer and a nightly integration
Imagine service instance document-api with key doc-access-v1.
Rotate credentials used by a plant integration
A manufacturer's nightly operational integration uses a service key that must be replaced without leaving its consumer on old credentials.
Track consumer handoff and verification before retiring the previous key or assuming creation of a new key changed every client.
| Reader | Business question | Evidence to carry forward |
|---|---|---|
| SAP developers and application teams supporting manufacturers | Rotate credentials used by a plant integration | Track consumer handoff and verification before retiring the previous key or assuming creation of a new key changed every client. |
01 Rotation ends when consumers move and old access is retired
A service-key rotation is complete only when the intended consumers use the replacement access material and the previous access has been retired according to the service’s revocation behavior. Creating a second key is preparation. Updating one secret reference is a configuration change. Neither proves that every running or scheduled consumer has changed. [1] [2]
This tutorial is for SAP BTP service owners and integration developers coordinating a routine credential replacement. It covers the general handoff and the documented MTA service-key concept, with a concrete fictional two-consumer case. Broker support, authentication type, credential overlap and revocation semantics remain service-specific. A suspected compromise can require immediate revocation rather than the overlap sequence used in the routine example.
02 Identify what the service key actually contains and authorizes
A service key supplies connection information for supported consumption. Depending on the service, that can include endpoints, OAuth client information, certificates or another credential form. Do not assume the displayed key name is the security principal, that deleting a name instantly invalidates every issued token, or that two keys necessarily have independent underlying privileges. [1]
Before planning the change, establish the service instance and plan, authentication mechanism, token lifetime where applicable, the supported create/delete procedure and how a consumer loads secrets. Confirm whether the service permits a temporary overlap and whether the new key obtains the same intended rights. These facts determine the cutover order and meaningful acceptance checks.
03 Worked case: an API consumer and a nightly integration
Imagine service instance document-api with key doc-access-v1. A continuously running application invoice-ui uses it through a managed secret reference. A scheduled integration nightly-export loads the same credential at job startup. Both require read access to a test document DOC-100. A new routine key doc-access-v2 can overlap under this fictional service’s documented policy.
The application owner updates invoice-ui and confirms a successful read at 14:10. The scheduled integration does not run until 02:00. Deleting v1 at 14:11 would leave the nightly consumer unverified. The handoff must include a controlled equivalent job test or the agreed scheduled observation before retirement. A green UI screenshot cannot establish that a dormant consumer has moved.
| Consumer | Loads access material | Evidence required |
|---|---|---|
| invoice-ui | At deployment/startup under its design | Read DOC-100 using current deployment |
| nightly-export | At job startup | Controlled job run or scheduled run |
| Operational diagnostic | When invoked | Updated secret reference and harmless read |
| Retired v1 access | Service-specific revocation | Old credential no longer usable as documented |
04 Inventory consumers beyond the obvious deployment
Search the approved configuration inventory for references to the old key’s managed secret identity, not by copying its secret value into search commands. Include scheduled integrations, developer tools, operational jobs and disaster-recovery configuration. Identify an owner for each consumer and the mechanism that loads its credential. An unused-looking key may support a monthly process.
Keep the rotation record small and non-secret: service instance ID, key aliases, consumer names, credential-store reference names, change version and verification timestamps. Sensitive key contents belong only in the approved secure storage and delivery mechanism. Do not paste them into a ticket to demonstrate that the new key differs from the old one.
05 Build a cutover sequence from supported overlap and reload behavior
For the routine fictional case, the sequence is create v2, store it securely, update each consumer, reload it as required, verify each consumer and then retire v1. This is an original operating plan based on the assumed overlap support; it is not a universal SAP command recipe. If the actual broker lacks overlap, plan the documented interruption or alternative mechanism explicitly.
Reloading matters. A secret-store update may leave a long-running process using a cached token or an older credential read at startup. An application restart can still select the wrong secret reference if its deployment configuration was not changed. Define which configuration version and runtime action establish that the consumer loaded v2, and verify that action through the consumer itself.
For certificate-based access, compare certificate identity and validity through an approved inspection without exporting the private key. For OAuth access, a successful operation using a previously cached token may not prove that the new client credential can obtain a token. The verification should exercise the relevant acquisition step as well as the API read.
06 Understand the MTA renewal concept without assuming universal revocation
SAP’s MTA Service Keys reference describes modeling existing service keys as resources and injecting their credentials into dependent modules. It also illustrates automated renewal or rotation with changed service-key names. This explains how a deployment can deliver replacement material; the underlying service still defines credential creation and revocation behavior. [1]
When using that pattern, review the effective descriptor and deployment plan. Identify the resource that refers to the key, the modules depending on it and the generated environment configuration. A successful MTA deployment is insufficient if an external scheduled consumer is configured separately. Include that consumer in the same handoff ledger rather than assuming deployment automation owns it.
Schedule the handoff around the actual consumer cadence. If nightly-export cannot be invoked safely before 02:00, record that constraint and the permitted overlap window explicitly. If policy requires retirement before that run, use a supported equivalent validation or plan an interruption with recovery ownership. A clock-based deadline alone does not supply evidence that the dormant integration loaded its replacement access.
07 Verify the new consumer path, not just a copied credential
Run the smallest harmless operation representative of the consumer’s real connection. In the fictional case, invoice-ui should read DOC-100 through its normal deployed code path. nightly-export should use its normal secret resolution and connection setup in a controlled run. A separate terminal test using v2 confirms credential viability but does not prove either consumer has loaded it.
Capture the deployment or job identity, secret-reference version if the management system exposes a safe version identifier, operation time and sanitized result. Avoid logging authorization headers or credential payloads. If service-side access logs safely identify the client or certificate, compare that evidence with the expected new identity. Where no such evidence exists, state the limit and use a fresh token or connection plus the actual configuration version to make the verification meaningful.
08 Use failure evidence to decide whether to pause, repair or revert
A failure after the reference update is not automatically a bad key. It can be an incorrect endpoint, missing privilege, stale process configuration or a malformed secret value. Compare the first failed boundary with the old working configuration using non-secret metadata. Preserve the sanitized error before another redeployment changes the state.
| Observation | Likely boundary | Next evidence |
|---|---|---|
| New key exists, consumer still uses old access | Reload or reference | Running version and loaded secret reference |
| Token acquisition rejected | Credential or auth setup | Client/certificate metadata and token error |
| Token obtained, API denied | Privileges or endpoint | Required scopes and intended resource |
| UI passes, nightly job fails | Unmoved consumer | Job configuration and its startup time |
| Old access still works after deletion | Revocation or cached token semantics | Service-specific token/session lifecycle |
09 Retire the previous access with an explicit acceptance condition
Before retiring v1 in the routine case, every listed consumer needs either successful verification or an explicit approved decision about its retirement. “No reported errors” is weak evidence for an infrequent integration. Close the inventory by checking each row, including operational tools that might be called only during an incident.
Then perform the supported revocation or key deletion. Record the operation result and the service’s documented remaining-token or session behavior. Test old access only through a permitted controlled mechanism and without printing the credential. If a previously issued token can remain valid until expiry, distinguish that from the old credential still being able to obtain new access. Do not report immediate global invalidation without documentation and evidence.
Keep creation time, consumer-update time and revocation time separate in the ledger. Those timestamps explain whether a failure occurred before the replacement was loaded or after old access was retired. They also let an operator compare an infrequent job run with the permitted overlap window instead of guessing from the latest deployment timestamp.
10 Plan recovery before the first consumer changes
If the new key fails and v1 remains valid under the approved overlap policy, a consumer may be returned to its prior secret reference while the cause is investigated. That recovery is only possible if the prior material was preserved securely and has not been revoked. Document the decision point rather than assuming rollback remains available indefinitely.
If old access is compromised or already retired, reusing it is not a valid recovery. Follow the service’s supported replacement procedure and restore consumers to valid new access. Separate the technical repair from business reconciliation: a scheduled job that failed during the change may need a controlled rerun, with duplicate checks for any work it partially completed.
11 Exercise the handoff with positive, negative and dormant-consumer tests
For a positive test, obtain fresh access using the new material through each consumer and read the agreed fixture. For a negative test, verify the retired credential cannot establish new access under the service’s documented rules. For a boundary case, include a consumer that runs infrequently or caches credentials; demonstrate its reload and acquisition path rather than waiting for an incident.
The closure record should distinguish prepared, updated, verified and retired states. It should also record unresolved limits such as service-side logs unavailable or token expiry not yet elapsed. Those limits do not justify claiming all old sessions were revoked. They tell the next operator what remains to observe.
Can the same secret alias be reused? That depends on your credential-management system and deployment design. A stable alias can simplify consumers but obscure whether a running process loaded the new version. Preserve safe version or deployment evidence. The related binding lesson explains another supported consumer relationship that may reduce manual key distribution where the service permits it.
Related services and next steps
Primary sources
Found this useful?
Share this guide with your network, or leave a like.
Your like is saved in this browser.