User Authentication

The SAP Service and Asset Manager service uses the OAuth 2.0 based authentication and authorization model provided by the SAP Business Technology Platform (SAP BTP).

The SAP BTP supports the OAuth 2.0 protocol as a reliable way to protect application resources, whereas SAP Service and Asset Manager uses it to authenticate users. For more information, see Protecting Applications with OAuth 2.0.

There is only one OAuth scope defined for the SAP Service and Asset Manager service, which you see only on the Provider account. During the onboarding process, when users log in to the application for the first time, the mobile application sends an authorization request to the OAuth server that is running on your SAP BTP. The SAP BTP delegates the call to your SAP BTP Identity Authentication tenant. Then, on the mobile device, users enter their credentials into a form generated by the SAP BTP Identity Authentication tenant.

Once the onboarding process is successfully completed, an access token is automatically granted for the users. When SAP Service and Asset Manager accesses service resources, the token (called a bearer token) is used for authentication.

Before authorizing the application to use the service on the SAP BTP, register the OAuth clients for SAP Service and Asset Manager.

Identity Federation

SAP BTP supports identity federation with an external identity provider. Use the SAP BTP Identity Authentication service as an identity provider for our solution, since SAP BTP provides solid integration with the SAP BTP Identity Authentication service.

Identity Federation with Identity Authentication Tenant

In SAP Service and Asset Manager, user IDs are used to make sure that users can access only those objects they have authorization for. Therefore, the service must be able to identify the caller user ID for each request based on the bearer token. User principal propagation is enabled in the OAuth configuration so that the service can identify the user ID for each request. SAML assertion (including user IDs) is exchanged from SAP BTP Identity Authentication for an OAuth access token. Using the access token, SAP Service and Asset Manager provides the requested information to the authenticated users.

For more information, see Identity and Access Management.

Granting Access Tokens

Once the onboarding process is successfully completed, an access token and a refresh token are automatically granted for the users by the OAuth server. The OAuth server is the SAP BTP. The OAuth token is used to request resources from the server. If the token expires, the refresh token is used to request a new OAuth token from the OAuth server. Set the token lifetime and the refresh token lifetime values according to your security policy. For more information, see Configuring OAuth 2.0.

The OAuth token obtained during the onboarding process is encrypted with 256-bit AES encryption using the passcode set up by the user, or a default key if the passcode is deactivated. Uninstalling the app removes the token stored on the mobile device.

Revoking Access Tokens

You can revoke the access token that was provided for a user using the SAP BTP cockpit. By revoking access tokens, you can immediately reject access rights the user was previously granted. Users of the applications can also access and revoke their tokens if required. For more information, see Configuring OAuth 2.0.