> Source: https://docs.cyberelements.io/bastion/4.7/fi/Integration/MFA/NeomiaPulseIntegration/

# Setting up two-factor authentication using behavioural biometrics with Neomia Pulse

This article describes the procedure for configuring and activating [Neomia Pulse](https://www.neomia.ai/neomia-pulse-2/) artificial intelligence-based MFA.
This does not require any additional devices for the user to identify themselves based on how they type on their keyboard.

## Prerequisites

Only four prerequisites are necessary to ensure that Neomia Pulse MFA works:

1. Retrieve your Neomia Pulse API key for CyberElements Bastion
2. Open `TCP 443` access between the Mediation Controllers and `api.neomia.ai`
3. Use user authentication domains of type `local` or `LDAP`, as Neomia Pulse cannot be used with domains of type `anonyme` or `SAML` on CyberElements Bastion
4. Apply another type of MFA (OTP, TOTP, or Radius) on the same domain

## Neomia Pulse MFA settings and activation

To enable Neomia Pulse MFA on CyberElements Bastion, you must edit the authentication domain and:

![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_pulseConfiguration.png)

1. Enable at least one authentication token on the authentication domain
2. Enable the **Enable Neomia Pulse authentication** option
3. Set the URL for connecting to the Neomia Pulse API, which can be found in the [Neomia Pulse Dashboard](https://pulse-dashboard.neomia.ai/) in `Management` > `Services`. The default value is `https://api.neomia.ai/pulse`
4. If the platform uses the **first generation** of the Pulse interface (`version = v1` in the [`[pulse]` section of `djangosettings.ini`](https://docs.cyberelements.io/bastion/4.7/fi/Usage/Reference/ConfigurationFiles/MediationController/DjangoSettings/#pulse)), define the URL for connecting to the Neomia Pulse authentication API, which can be found in the [Neomia Pulse Dashboard](https://pulse-dashboard.neomia.ai/) in `Management` > `Services`. The default value is `https://api.neomia.ai/pulse-auth`. With generation `v2`, the default, this field is not displayed.
5. Enter your API key, which can be found in the [Neomia Pulse Dashboard](https://pulse-dashboard.neomia.ai/) in `Management` > `Services`.
6. Specify the number of behavioural identification attempts the user will be subjected to, `0` indicating that there will be an infinite number of attempts
7. Configure how authentication works:
    1. `Ignore OTP token`: if Neomia Pulse MFA validates the user, no other MFA will be requested
    2. `Strengthen the authentication with an additional factor`: if Neomia Pulse MFA validates the user, they will still have to validate one of the MFAs configured in step 1
8. Configure how authentication works if Neomia Pulse fails to validate the user:
    1. `Block the user`: the user's account is immediately blocked on CyberElements Bastion
    2. `Require an additional authentication factor`: the user can still log into CyberElements Bastion if they validate one of the MFAs configured in step 1
9. Choose whether or not to display graphical components when analysing keystrokes (after entering words):

   | With graphical components | Without graphical components |
   |---|---|
   | ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_GraphicComponentsON.png) | ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_GraphicComponentsOFF.png) |
10. Choose whether or not to display authentication factors and their validity for authentication on the user portal (information visible at the top left of the user portal):

    | With authentication factors | Without authentication factors |
    |---|---|
    | Case of Neomia Pulse validation but with additional MFA to be validated: ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_AuthenticationFactorsON-PulseOK-MFAOK.png) Case of Neomia Pulse invalidation but with additional MFA validated: ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_AuthenticationFactorsON-PulseKO-MFAOK.png) Case of single Neomia Pulse validation: ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_AuthenticationFactorsON-PulseOK.png) | ![](https://docs.cyberelements.io/bastion/4.7/img/Cleanroom/CLRIntMFAPulse_AuthenticationFactorsOFF.png) |

## User enrolment

Pulse only recognises a user after recording several **reference typing patterns**. As long as their profile is incomplete, or if a Pulse administrator has requested a new enrolment, the user cannot be verified by Pulse:

1. they authenticate with their password, then with the **other factor** configured on the domain (hence the fourth prerequisite);
2. the authentication page then invites them to the **neomia Pulse enrollment**, which consists of typing a few words.

How the enrolment unfolds depends on the generation of the Pulse interface, set for the whole platform by the `version` parameter of the [`[pulse]` section of `djangosettings.ini`](https://docs.cyberelements.io/bastion/4.7/fi/Usage/Reference/ConfigurationFiles/MediationController/DjangoSettings/#pulse):

| Generation | How the enrolment unfolds |
|---|---|
| `v2` (default) | On the authentication page itself: the user types the suggested words, over several rounds, until Pulse has the number of reference patterns it expects. |
| `v1` | The user is redirected to a page hosted by Neomia, then returns to the portal once enrolled. |

Enrolment is offered from the user portal as well as from the administration console, depending on the page where the user authenticates.

> **Pulse unavailable at verification time**
>
> If Pulse does not respond when the platform checks the user's enrolment, the behaviour follows the failure setting: authentication is refused with **Block the user**, and continues with the domain's other factor with **Require an additional authentication factor**.

## More information

More information about Neomia Pulse is available on its documentation website: [Neomia Pulse Documentation](https://docs.neomia.ai)
