Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

Adaptive registration

Prev Next

URL: /nnl/v2/reg Method: POST


Digipass S3 Authentication Software provides the INIT_ADAPTIVE_REG operation under the /nnl/v2/reg endpoint to initiate Adaptive Registration. In addition to INIT_ADAPTIVE_REG, you also need to use the following REST API operations to fully implement Adaptive Registration.

To register a FIDO authenticator:

To register a FIDO authenticator on a second device (FIDO OOB):

To register non-FIDO authenticators:

Start Adaptive Registration by calling INIT_ADAPTIVE_REG. If there is a successful Registration Decision Rule (its condition evaluates to true) and that rule has an action of either SUGGEST_REGISTRATION or ENFORCE_REGISTRATION, then the Server retrieves that rule's registration sequences. The Server filters out authentication methods that the user previously registered as well as methods not supported on the user's device. INIT_ADAPTIVE_REG returns the action and, if applicable, filtered sequence(s).

The calling app interacts with the user to select one authentication method to register from the sequence(s). The app is also responsible for interacting appropriately with the user to require ENFORCE_REGISTRATION versus SUGGEST_REGISTRATION. After the user has selected a method, the calling app must call the appropriate REST API operations to register that method.

After each successful registration, call INIT_ADAPTIVE_REG again so your app knows which authentication method to register next. If the newly-registered method is either a FIDO or FIDO OOB authenticator, then the Server checks if there is a Supplemental Check configured for that authenticator. A FIDO authenticator's characteristics are not known until the user has selected it, as a result a Supplemental Check plays a critical role in guaranteeing that the FIDO authenticator meets your organization's criteria for secure authentication.

If there is a Supplemental Check for the FIDO authenticator and its condition evaluates to true, then registration is complete because the authenticator satisfies the requirements for strong authentication.

If the Supplemental Check's condition fails OR there was no Supplemental Check, the Server does one of the following:

  • IF all the authentication methods in all rule's sequences have been registered, THEN registration is done and return 4000.

  • ELSEIF the newly-registered authenticator completes one sequence THEN return 4006. It is up to the calling app how it wants to handle this situation. In other words, this could be treated as either registration is complete or registration must continue. Completing a sequence means there is at least one sequence now that has no unregistered methods.

  • ELSEIF there are unregistered authentication methods in any sequence that contains the newly-registered authenticator, THEN return the remaining authentication methods from all sequences that contain the newly-registered authenticator.

    The calling app interacts with the user to select a method, registers it, and calls INIT_ADAPTIVE_REG again.

INIT_ADAPTIVE_REG

Use INIT_ADAPTIVE_REG to start Adaptive Registration processing.

Prior to starting execution, the Server needs to determine which Adaptive Ruleset it should use. That ruleset is determined using the following algorithm:

  1. IF you configured the calling client app with an Adaptive Ruleset THEN use it.

  2. ELSEIF there is an Adaptive Ruleset called default THEN use it.

  3. ELSE registration fails.

Each Registration Decision Rule in the ruleset is evaluated in the order until one rule succeeds (its condition evaluates to true) or all the rules fail.

If a Registration Decision Rule succeeds, then the Server returns its action and, if applicable, its registration sequences of authentication methods. The Server filters out methods that the user previously registered and are not supported on the user's device. The rule's action can be one of:

  • DENY: The user cannot register.

  • SUGGEST_REGISTRATION: The user can choose to register one or more authentication methods.

  • ENFORCE_REGISTRATION: The user is required to register one or more authentication methods in order to be able to use the functions in the calling app. As previously mentioned, the calling app chooses how to enforce this.

  • IGNORE_REGISTRATION: Based on the current situation, registration can't be done or doesn't need to be done, just move along. For example:

    • The user signed in with a FIDO authenticator (the client app provided this as context data) then no registration is needed.

    • Your company only wants to allow platform authenticators. However, the user's device has no platform authenticators. There's no point trying to register and this isn't an error.

If all the rules fail, INIT_ADAPTIVE_REG fails with a 4403.

Adaptive Registration is intended to loop through a set of unregistered policy-approved authentication methods from one successful Registration Decision Rule. The end user keeps registering an authentication method until they cancel out or there are no unregistered methods left. Because the developer must call INIT_ADAPTIVE_REG to update the set of unregistered methods at the start of the loop, INIT_ADAPTIVE_REG provides nuanced information to help the calling app tailor its behavior.

  • Registration is finished because all authentication methods have been registered from all of the rule's sequences. (Server status code 4000 and rule action of either SUGGEST_REGISTRATION or ENFORCE_REGISTRATION)

  • Registration is finished because the newly-registered FIDO authenticator has a Supplemental Check that succeeded. The FIDO authenticator is sufficiently strong that other authentication methods aren't needed. (Server status code 4000)

  • Registration is finished because the user's device doesn't have any policy-approved authentication methods. (Server status code 4000 and rule action of IGNORE_REGISTRATION)

  • Registration could be finished because the user has registered all authentication methods in at least one of the rule's sequences. (Server status code 4006 and rule action of either SUGGEST_REGISTRATION or ENFORCE_REGISTRATION)

  • Registration should continue because there are still unregistered authentication methods. (Server status code 4005 and rule action of either SUGGEST_REGISTRATION or ENFORCE_REGISTRATION)

Request

Attribute

Description

operation

Required. The string INIT_ADAPTIVE_REG.

callerOrigin

Required if a web app is sending the request and that app has a different origin than the Digipass S3 API Server. A web origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it.

The API Server checks if this origin is listed in its origin allow list, if not, the request is rejected. See My Web Apps have a Different Origin.

contextData

Optional. A JSON object containing a set of name-value pairs for each context data item. Map<String, String>.

Example:

"contextData":{
    "customerType" : "Privileged"
}

id

Optional. The correlation ID, a unique id that ties together different API requests that comprise a FIDO operation, like registration. An alphanumeric string, maximum 255 characters. No special characters are allowed.

If not provided, the Server generates a unique id and returns it.

message

Required. Generated by the App SDK on the client. This is an opaque value. The client app is responsible for sending message. This is a Base64-URL encoded string.

optionsData

An object used to pass additional attributes to REST API operations. The attribute below pertains to INIT_ADAPTIVE_REG. See OptionsData.

sessionData

Required. An object containing the user's session information. See SessionData.

Response

The following attributes are always present in the JSON payload of the response.

Attribute

Description

id

The unique id that correlates different requests comprising an operation. A Base64-URL encoded string.

If the id was sent in the request, the same id is returned. If not, a server-generated ID is returned. If id was provided in the REST payload but the server was unable to parse the payload, the value is unknown.

statusCode

Server-specific status code that reports the success or failure of this operation. Integer.

See Response Status Codes below for the status and error codes.

The following attributes are present in the response upon a successful operation (Server status of 4000, 4005, or 4006).

Attribute

Description

additionalInfo

An object containing information from the client app that is initiating registration. Contains the 3 attributes listed in the rows below.

In order for the API Server to return this information,

  • The client app must have sent this information in the INIT_ADAPTIVE_REG request message attribute.

  • Update the response filter configuration so the API Server returns app information and payload extensions.

    By default, the API Server automatically returns device information. Refer to Response Filter Configuration.

additionalInfo.app

App information received from the client. App.

additionalInfo.device

A DeviceDetail object containing information about the device that issued the INIT_ADAPTIVE_REG request, such as the device’s unique ID, model, and manufacturer.

additionalInfo.extensions

Message payload extensions received by the Server in the INIT_ADAPTIVE_REG request. List<Extension>.

authSequences

A list of registration sequences, each containing one or more authentication methods. The user is encouraged or expected to register all the methods from one of these sequences. Only returned when ruleSetResult.action is ENFORCE_REGISTRATION or SUGGEST_REGISTRATION.

Map<String, AuthSequence>. String is the name of the registration sequence.

ruleSetResult

Contains information about the succeeding Registration Decision Rule, such as its name and its action.

AdaptiveRuleSetResult.

Response Status Codes

The following are the descriptions of the Auth Server status codes returned by INIT_ADAPTIVE_REG. Under certain circumstances, the API Server returns an unsuccessful HTTP status code. Examples include an invalid request or invalid session. You can find descriptions of these in API Server Status Codes.

Server Status Code

Description

Examples

4000

Ok. All methods from all the sequences are completed OR one of the sequences is complete because an Supplemental Check succeeded OR the succeeding rule's action is IGNORE_REGISTRATION.

The operation completed successfully for one of the following situations:

  • The succeeding rule's action is ENFORCE_REGISTRATION or SUGGEST_REGISTRATION and the end user has already registered all the authentication methods needed by all of its registration sequences.

  • The newly-registered FIDO authenticator has a Supplemental Check that succeeded so registration is done.

  • The succeeding rule’s action is IGNORE_REGISTRATION i.e. registration is done

4005

Ok. None of the sequences have been completed

To return these codes, both of these conditions must be true.

  • The succeeding rule's action is ENFORCE_REGISTRATION or SUGGEST_REGISTRATION.

  • The user has not registered all the authentication methods needed by any of that rule's registration sequences.

4006

Ok. One of the sequences has been completed.

To return these codes, both these conditions must be true.

  • The succeeding rule's action is ENFORCE_REGISTRATION or SUGGEST_REGISTRATION.

  • The succeeding rule has multiple registration sequences and the user has registered all the authentication methods required by one of those registration sequences.

4402

Security exception

The facet ID sent by the client doesn't match the valid facet IDs configured on the Authentication Server.

4403

Policy verification exception

One of the following occurred:

  • The succeeding rule's action is DENY.

  • There are no succeeding rules in the ruleset.

4404

Internal Server Error

Internal server error.

Failed to read from the database.

Failed to connect to the database.

Failed to read required properties.

4406

Unacceptable content in the request

The mandatory attribute, message, is missing or empty.

4408

Unsupported client message exception

Invalid message attribute.

The client does not support the UAF/FIDO2 protocol. Or protocol information is missing.

4409

Client message exception

The message attribute is invalid (for example, there was a JSON syntax error). The message attribute from the App SDK is malformed (base64URL decode failed).

Samples

Sample Request URL

https://www.example.com:8443/nnlgateway/nnl/<tenantID>/reg

Sample Request

{
    "operation": "INIT_ADAPTIVE_REG",
    "sessionData": {
        "sessionKey": "<session JWT>"
    },
    "ruleSetName": "androidAppRuleSet",
    "id": "sample",
    "message": "<base64url-encoded-data>", 
    "contextData": {
        "customerType": "Privileged"
    }
}

Sample Response When the Succeeding Rule's Action is SUGGEST_REGISTRATION and the End User Hasn't Registered any Methods

The following sample has 2 registration sequences configured (FIDO Auth and Email OTP) OR (FIDO Auth and SMS OTP). A developer updated the response filter so the API Server returns app information and payload extensions in additionalData.

{
    "statusCode":4005,
    "id":"t3w8UjmXK3HgJXi1vwoDdA",
    "additionalInfo":{
        "device":{
            "id":"123456789abcdef1234567890",
            "type":"android",
            "info":"OneSpan's device",
            "model":"Galaxy S20",
            "os":"Android 12",
            "manufacturer":"Samsung"
        },
        "app":{
            "id":"com.noknok.android.onramp",
            "name":"OnRamp"
        },
        "extensions":[
            {
                "id":"noknok.uaf.location",
                "data":"{\"status\":0,\"latitude\":37.46,\"longitude\":-122.143,\"accuracy\":99.2,\"countryCode\":\"US\"}",
                "operation":"INIT_ADAPTIVE"
            }
        ]
    },
    "ruleSetResult":{
        "action":"SUGGEST_REGISTRATION",
        "ruleSetName":"androidAppRuleSet",
        "ruleName": "PrivilegedCustomerRule"
    },
    "authSequences":{
        "authSequence1":{
            "methods":[
                {
                    "type":"FIDO Auth",
                    "name":"default"
                },
                {
                    "type":"SMS OTP",
                    "name":"OTP Using SMS"
                }
            ]
        },
        "authSequence2":{
            "methods":[
                {
                    "type":"FIDO Auth",
                    "name":"default"
                },
                {
                    "type":"Email OTP",
                    "name":"OTP Using Email"
                }
            ]
        }
    }
}

Sample Response When the Succeeding Rule's Action is ENFORCE_REGISTRATION and the User Has Registered Some of the Methods

The following sample has 2 registration sequences configured (FIDO Auth and Email OTP) OR (FIDO Auth and SMS OTP) and the end user has already registered FIDO Auth. A developer updated the response filter configuration so the API Server returns app information and payload extensions.

{
    "statusCode":4005,
    "id":"t3w8UjmXK3HgJXi1vwoDdA",
    "additionalInfo":{
        "elapsedTime": 38,
        "device":{
            "id":"123456789abcdef1234567890",
            "type":"android",
            "info":"OneSpan's device",
            "model":"Galaxy S20",
            "os":"Android 12",
            "manufacturer":"Samsung"
        },
        "app":{
            "id":"com.noknok.android.onramp",
            "name":"OnRamp"
        },
        "extensions":[
            {
                "id":"noknok.uaf.location",
                "data":"{\"status\":0,\"latitude\":37.46,\"longitude\":-122.143,\"accuracy\":99.2,\"countryCode\":\"US\"}",
                "operation":"INIT_ADAPTIVE"
            }
        ]
    },
    "ruleSetResult":{
        "action":"ENFORCE_REGISTRATION",
        "ruleSetName":"androidAppRuleSet",
        "ruleName":"PrivilegedCustomerRule"
    },
    "authSequences":{
        "authSequence1":{
            "methods":[
                {
                    "type":"SMS OTP",
                    "name":"OTP Using SMS"
                }
            ],
            "reason": "SMS_email_OTP_needed"    
        },
        "authSequence2":{
            "methods":[
                {
                    "type":"Email OTP",
                    "name":"OTP Using Email"
                }
            ]
            "reason": "Reason why the user is being prompted with Email OTP"
        }
    }
}

Sample Response When the Succeeding Rule's Action is ENFORCE_REGISTRATION and the User Has Registered the Required Methods

The following sample has 2 configured registration sequences (FIDO Auth and Email OTP) OR (FIDO Auth and SMS OTP) and the end user has registered FIDO Auth and Email OTP. A developer updated the response filter configuration so the API Server returns app information and payload extensions in additionalInfo.

{
    "statusCode":4006,
    "id":"t3w8UjmXK3HgJXi1vwoDdA",
    "additionalInfo":{
        "elapsedTime":38,
        "device":{
            "id":"123456789abcdef1234567890",
            "type":"android",
            "info":"OneSpan's device",
            "model":"Galaxy S20",
            "os":"Android 12",
            "manufacturer":"Samsung"
        },
        "app":{
            "id":"com.noknok.android.onramp",
            "name":"OnRamp"
        },
        "extensions":[
            {
                "id":"noknok.uaf.location",
                "data":"{\"status\":0,\"latitude\":37.46,\"longitude\":-122.143,\"accuracy\":99.2,\"countryCode\":\"US\"}",
                "operation":"INIT_ADAPTIVE"
            }
        ]
    },
    "ruleSetResult":{
        "action":"ENFORCE_REGISTRATION",
        "ruleSetName":"androidAppRuleSet",
        "ruleName":"PrivilegedCustomerRule"
    },
    "authSequences":{
        "authSequence1":{
            "methods":[
                {
                    "type":"SMS OTP",
                    "name":"OTP Using SMS"
                }
            ]
        }
    }
}