Passcode Authentication

Early Access

Introduction

This document assumes that a User has been added to an Identity Store and that the User has registered a passcode. Please follow the Passcode Registration guide first before continuing to the authentication process.

Authenticating via Process Definition

Passcode authentication requires three TrustX activities:

  1. 'Start Passcode Authentication' activity
  2. 'Passcode Authentication form'
  3. 'Complete Passcode Authentication' activity

Step 1 - Create a Process Definition

  1. Create a new Process Definition by navigating to Process Definitions > New Process Definition in the Backoffice application.
  2. Add a 'Create Start Event' to the Process Designer.
  1. Click the 'Start' event to open the right-side contextual menu and enter a name for the 'Name' input parameter.
  2. Add a 'Create End Event' to the Process Designer and connect it to the 'Start' event using a sequence flow arrow.
  1. Click the 'End' event to open the right-side contextual menu and enter a name for the 'Name' input parameter.

Step 2 - Start the Authentication Process

The 'Start Passcode Authentication' activity is used to begin the authentication process.

  1. In the Process Designer, add the 'Start Passcode Authentication' activity after the 'start' event and connect using a sequence flow arrow.
  1. The 'Start Passcode Authentication' provides the following configurable parameters described below:
Parameter Description Type Required Default
Passcode Authentication Key The key used to identify the passcode authentication attempt. String Yes passcodeAuth1
Passcode Key Represents the passcode. String Yes
Store Name The Identity Store containing the policy and User. String Yes
User External ID The external ID of the user to be authenticated. String No
User ID Identifies the user to be authenticated. String No
User Key The TrustX reference key for the user to be authenticated.

If the user has already been obtained earlier in the TrustX flow, this field is used to identify the user.

If the user has not already been obtained, one of the user ID or user external ID is used to reference the user and the user will be stored under the user key so it can be referenced later in the flow.
String Yes user1
  1. Ensure that each mandatory input parameter is defined. Identify the Identity Store User using the 'Get User' activity or but entering the User ID or User External ID manually.
  2. When the authentication process is started, the end-user will see a button that allows them to begin the authentication process.

Optional - Start Passcode Authentication via API

There are two API endpoints that initialize passcode authentication for a user.

Permissions:

  • TNT#{tenant}#createPasscodeAuthenticationForUser
  • TNT#{tenant}#createUserPasscodeAuthenticationForUserByExtUserId

Endpoints:

  • POST tenants/{tenantId}/stores/{storeName}/users/{userId}/passcodes/authentications/{policyName}
  • POST tenants/{tenantId}/stores/{storeName}/users/{extUserId}/passcodes/authentications/{policyName}/ext

Example:

HTTP
Copy

Example Response:

JSON
Copy

Response Codes:

  • 201: Success
  • 404: Tenant/store/user/policy not found.
  • 400: Error, see processing details.

Step 3 - Configure the Authentication Form

The authentication form is used to accept input from the end-user who will be completing the passcode authentication. In this example, the end-user will be requested to provide their passcode to complete the authentication process.

  1. Create a new Custom Form from the Integration Hub > Custom Forms section of the Backoffice. For more information using the Custom Form builder, see the Custom Data Forms guide.
  2. The example below demonstrates a JSON form that requests the passcode.
JSON
Copy
  1. Once the Custom Form has been created, add a 'Passcode Authentication Form' activity to the Process Designer and connect to the 'Start Passcode Authentication' activity using a sequence flow arrow.
  1. The 'Passcode Authentication Form' activity includes the following Input Parameters:
Parameter Description Type Required Default
Data form name A drop-down list of all available custom forms created in TrustX. The chosen form will be displayed to the end user in the flow. String Yes
Data form version Determines which version of the selected custom form will be displayed. Integer Yes 1
Form data Key When multiple Custom Data Forms are used in one Process Definition, the form data key will be used as a unique identifier to distinguish Custom Form activities from each other. String Yes passcodeAuthForm1
Passcode Authentication Key The key associated with the passcode authentication attempt. String Yes passcodeAuth1
Starting Component ID The name of the step to be sent to the UI. String Yes passcode-authentication
UI Component ID The name of the screen used by the UI. String Yes passcode-authentication

Step 4 - Complete Passcode Authentication

The 'Complete Passcode Authentication' activity is used to finalize the passcode registration process.

  1. Add the 'Complete Passcode Authentication' activity after the 'Passcode Authentication Form' and connect using a sequence flow arrow.

Optional - Complete Passcode Authentication via API

An API query to complete a passcode authentication by validating passcode verification parameters from the client.

To prevent user enumeration attacks, authentication failures return a generic error code (2615) regardless of the specific reason (invalid user, wrong password, expired passcode, etc.).

Permission:

TNT#{tenant}#completePasscodeAuthentication

Endpoint:

POST tenants/{tenantId}/stores/{storeName}/passcodes/authentications/sessions/{sessionId}

Example Request:

HTTP
Copy

Example Response:

JSON
Copy

Step 5 - Add a Simple Decider

A 'Simple Decider' can be used to reach a decision regarding the passcode authentication attempt.

  1. Add the 'Simple Decider' activity to the Process Designer and connect the activity to the 'Complete Passcode Authentication' and 'End' event.

Once all configurations are made, click the 'Save & Deploy' button to finalize the Process Definition.

Test and View Results

To test the flow, create a new Process Token from the Process Definitions page.

  1. Navigate to the Process Definitions page and find the passcode authentication Process Definition.
  2. Click the 'key' under the 'Actions' tab to create a new Process Token.
  1. A pop-up modal will appear where parameters of the token can be defined.
  1. When the Process Instance starts, the user will be met with the registration form.
  1. When the passcode has been added successfully, a confirmation screen will appear.
  1. To view the newly added passcode, navigate to the 'Users' page in the Backoffice: Identity Store > Users.
  2. Choose an Identity Store to view the store Users.
  1. Under the 'Actions' column, select the 'Users Details' button to view the full User details.
  1. The authenticated passcode can be found under the 'Registered Passcodes' section of the User Details page.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard