One-Time Password Authentication Developer Guide
To create policy scripts in the Policy Script Administration Console, you need the RBA_POLICY_WRITE user management engine (UME) action or RBA_POLICY_ADMIN UME role assigned to your user. For more information, see Policy Scripts Installation Guide.
There are two ways of implementing the policy scripts for OTP authentication: By creating policy scripts, and by reusing a policy script of type Library in another policy script.
You can find example scripts in SAP Note 2225027
and in the tutorials of
this guide.
Creating Policy Scripts
For the following scenarios you can develop a policy script in the Policy Script Administration Console and execute it from the One-Time Password Administration UI:
-
Controlling the authentication process for risk-based authentication
You can develop a script that defines the authentication method at runtime in accordance with various conditions. You can make a second factor necessary for users logging on from certain locations for example, but only one factor for other locations.
-
Setting user permissions for context-based authorization
By using a simple script you can configure the permissions for users to some functionality, without changing the user authorization assignments. For example, you can limit this access when the users authenticate from outside the corporate network. This functionality will be available for the users when they are working from the corporate network.
-
Configuring logs and traces
You can call methods for OTP logs and traces. For more information, see Policy Script Functions and Methods.
-
Calling OTP methods in your script functions
In your script, you can call methods in the onInitialize(...), onFirstStageLogin(...), onSecondStageLogin(...), and other functions. For more information, see Policy Script Functions and Methods.
-
Configuring two-factor authentication to use passcodes sent using out-of-band methods.
You can develop scripts for the passcode to be sent via SMS, e-mail or other non-standard methods. For more information, see Develop a Script for Risk-Based Authentication.
-
Configuring validation of a passcode generated by a third-party passcode provider.
You can develop a policy script that checks whether a passcode is valid or not. For more information, see Develop a Script for External Passcode Validation.
-
Using the policy script for an application
You can control the authentication for a specific policy configuration (application) by developing a policy script. In this case, you have to specify the policy script for the Policy option of TOTPLoginModule.
Reusing Policy Scripts
-
You can call a Library policy script in another policy script of type Procedure with the include directive. For more information, see Reusing Policy Scripts.
ExampleAfter creating a mail policy script in the Policy Script Administration Console at http(s)://<host>:<port>/ssoadmin/scripts, you can use the following:
#include "mail"; ...
More Information