...
- Open the Ubisecure Management application.
- Select Global Method Settings and click the New Method... button.
Add New Method window opens.
Give the method a title (external name visible to end users) and name (name for internal use).
Set the title to SMS
Set the name to ubikey.sms.1
Set the method type to SPI Mobile Phone. The Method Class is automatically selected.
A directory must be selected, from which contains the user's password and registered telephone number. Select the Directory from the drop down list.
Press OK.Expand title Show image Figure 1. Adding a new SMS method to Ubisecure SSO - In the Main page of the new method, select the Enabled checkbox to activate the new method.
Add the following lines to the Configuration String field:
Code Block language text policy.password.encoding={SSHA} policy.password.protocol=UbiloginDirectory password-name=password.1 directory.schema=UbiloginDirectory
In this example password.1 will be used as the source for username, password and mobile phone number.
Click SPI Mobile Phone tab. Enter the URL of the SMS service.
The SMS method can be configured to make either GET or POST HTTP request. By default, it uses the GET method.
In the SMS Gateway URL field enter the URL of the SMS service.
Choose the correct HTTP Method from the API Request Method field.
In case of a POST request, add the needed Body.
Basic Authentication for the request can also be configured by providing username and password for the SMS service.Remember to provide variables {mobile} and {challenge} either in query parameters or body.
The variable {mobile} will be replaced with the users mobile number from the user directory. The variable {challenge} will be replaced with the text to be displayed on the mobile phone.Example URL with query parameters:
http://sms-service-.com/sms/sendsms?to={mobile}&content={challenge}
{"mobile": {mobile}, "challenge": {challenge}}
Example body:Click Update.
Note NOTE: Be sure that the configured HTTP server in URL parameter answers as HTTP status code 200 (The request has succeeded). All other response codes will be interpreted as a failure situation and the SMS authentication will not succeed. Configurable error will be shown to the user.
Figure 2. Defining the SMS Gateway URL for sending an SMS with a GET request Figure 3. Defining the SMS service configuration for sending an SMS with a POST request. Note NOTE: This http address must be reachable from this and any other configured nodes.
Configure UI Text and SMS text
The variable {challenge} will be replaced with the text to be displayed on the mobile phone. The message used can be set using the tag SMS_TEXT in the localization files, for example
uas.properties
. Please refer to the Login user interface customization - SSO.Code Block language text title Customizing and localizing message text SMS_TEXT = Your one time password is {0}
By default, SSO formats the one-time password in four number sequences. In case you want to omit this kind of formatting, you can define the message key {1} instead of the standard {0}. The message key {1} always holds a plain version of the one-time password.
Code Block language text title Customizing and localizing message text SMS_TEXT = Your one time password is {1}
Configure remaining UI text and to match system, branding and language requirements.
The method is now installed. Complete the configuration and access control.
...
- Open the Ubisecure Management application.
- Select Global Method Settings and click the New Method... button.
Add New Method window opens.
Give the method a title (external name visible to end users) and name (name for internal use).
Set the title to Unregistered SMS
Set the name to ubikey.sms.Unregistered
Set the method type to Mobile Phone unregistered. The Method Class is automatically selected.
A directory does not need to be selected.
Press OK.Expand title Show image Figure 3 4. Adding a new unregistered method to ubisecure SSO - In the Main page of the new method, select the Enabled checkbox to activate the new method.
Add the following lines to the Configuration String field:
Code Block language text policy.oauth.otp.timeout=(timeout in minutes) smsUrl=http\://localhost\:7080/smsgateway/sms?mobile\={mobile}&challenge\={challenge}
Configuration parameter
policy.oauth.otp.timeout
is optional, and it's used for Oauth2 sms-mt-otp grant.
From UI the timeout is always 10 minutes.
The variable {mobile} will be replaced with the users mobile number from the user directory.
The variable {challenge} will be replaced with the text to be displayed on the mobile phone.Example:
http://sms-service-.com/sms/sendsms?to={mobile}&content={challenge}
Figure 4 5. Unregisted sms method configuration Click Update.
- Configure UI Text and SMS text
- The variable {challenge} will be replaced with the text to be displayed on the mobile phone. The message used can be set using the tag SMS_TEXT in the localization files, for example uas.properties. Please refer to the Login user interface customization - SSO
Customizing and localizing message text
Code Block language text 5. SMS_TEXT = Your one time password is {0}
Configure remaining UI text and to match system, branding and language requirements.
- The method is now installed. Complete the configuration and access control.
...