# Duo Security

This topic describes how to configure the Duo Security administration panel to [integrate with the Aisera](https://aisera.com/integrations/) Gen AI platform.

The screenshots from the Duo Admin Panel come from the official Duo Documentation page. Please refer to the Duo Documentation for the latest information.

## Prerequisite <a href="#prerequisites" id="prerequisites"></a>

Create a Duo Account so that you have an email address with a corresponding password that allows you to access the Admin Panel via the [Duo Admin Login](https://admin.duosecurity.com/login?next=%2F).

The account must be one of the following types : Duo Beyond, Duo Access, or Duo MFA plan.\
If this is the first time someone in your organization has set up an admin account, follow the instructions here : [First-Time Administrator Account Setup](https://duo.com/docs/administration#first-time-administrator-account-setup).

## Access the Duo Admin Panel <a href="#access-duo-admin-panel" id="access-duo-admin-panel"></a>

Login to Duo Admin panel via [Duo Admin Login](https://admin.duosecurity.com/login?next=%2F) using the administration account email address.

Depending on the configuration of the account it will require:

1. Password or
2. Single-sign on (SSO) or
3. One of the two options above

## Use-cases <a href="#use-cases" id="use-cases"></a>

If you only need the Duo Security software for **authentication**, like sending and checking push notifications, you only need the **Duo Auth API** integration.

If you also need **administrative** actions, like enrolling new users and heir devices, integrate with **Duo Admin API** also.

### Protect an Application  <a href="#protect-an-application" id="protect-an-application"></a>

To protect the **Duo Admin API** and/or **Duo Auth API:**&#x20;

1. Navigate to the Duo Admin Panel.
2. Click **Applications** in the left sidebar.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fz68H8WiXvFOy8SBdOtQy%2Fduo1.png?alt=media&#x26;token=651c30fe-1eda-4637-aded-88b79e5a29e8" alt="" width="563"><figcaption><p>Duo Admin Panel</p></figcaption></figure></div>

2. Click **Protect an Application** in the left sidebar or choose the **Protect an Application** button in the upper right corner of the page.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FzmuoG3dASQw6834Is5OH%2Fduo2.png?alt=media&#x26;token=9ca5da44-21df-4c90-a097-2fa26338bb69" alt="" width="563"><figcaption><p>Protect an Application</p></figcaption></figure></div>

3. Search/select the **Duo Auth API**/**Duo Admin API** from the available applications and click the protect button. A new application is created with the name `Duo Auth API/Duo Admin API`.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fu0LYbiINZHBnYEwS0L6k%2Fduo3.png?alt=media&#x26;token=aebf3252-79d3-42be-b7a1-cf50bac91e35" alt="" width="563"><figcaption><p>Protect Buttons</p></figcaption></figure></div>

4. After creating the **Duo Auth API**/**Duo Admin API** application, you are re-directed to the application’s Properties page. The integration details are in the **Details** section at the top of the page.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FUTjt8owf1pnT2MiHZmdo%2Fduo5.png?alt=media&#x26;token=a403f521-43eb-49c2-b12e-c7f5d93cd608" alt="" width="563"><figcaption><p>Integration Details</p></figcaption></figure></div>

The **Integration key**, **Secret key** and **API hostname** information **are needed to connect** **with Aisera** side.

### Policies <a href="#policies" id="policies"></a>

It is needed to enable the New User Policy in order to enroll new users properly for Duo Admin API. To do so :

1. Navigate to Duo Admin Panel
2. Click **Policies** in the left sidebar:

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FuQ7XCWQM68QJ76giedcc%2Fduo6.png?alt=media&#x26;token=d482bf6f-6f8f-4345-b200-2fa59c7be908" alt="" width="563"><figcaption><p>Policies Button</p></figcaption></figure></div>

3. Scroll down to **Global Policy** and click the **Edit Global Policy** button.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F9T24vK8eoVz5JpQltn4i%2Fduo7.png?alt=media&#x26;token=3d5a61b2-655a-4d77-98aa-adc8475bc88c" alt="" width="563"><figcaption></figcaption></figure></div>

4. **Enable the New User Policy**. We need this to enroll the new users using the Admin API remotely.

## Connect with Aisera <a href="#connect-with-aisera" id="connect-with-aisera"></a>

To connect with the Aisera Gen AI platform, create a new integration with Duo:

1. Navigate to the **Settings > Integrations** window in the Aisera Admin UI.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FWJpvH4QMKOoJSd6eLL1f%2Fduo8.png?alt=media&#x26;token=3e714f15-2da7-4f65-8315-80221932c4ac" alt="" width="471"><figcaption><p>Open the Integration Window</p></figcaption></figure></div>

2. Click the **+ New Integration** button on the upper right corner.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F3oKdy1QHOdloNlL66V3p%2Fduo9.png?alt=media&#x26;token=b0d6d25e-1901-4287-b70b-b145412badbe" alt=""><figcaption><p>New Integration Button</p></figcaption></figure>

3. Find **Duo Security** by searching for the word `duo` in the search bar.&#x20;
4. Select the Duo Security icon and click **Next** (lower right corner).

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FC6L3faflBX4o26jgicRF%2Fduo9a.png?alt=media&#x26;token=e2e40667-bd77-460b-b664-1bd77cf7bf12" alt="" width="563"><figcaption><p>Choose Duo Security</p></figcaption></figure></div>

5. Add a preferred name for the integration (such as, Duo Auth API/Duo Admin API) in the **Name** field and https\://**API hostname** in the **Endpoint** field (such as, `https://api-myhostname.duosecurity.com`). The API hostname can be found in the **Applications** section of the **Duo Admin Panel** (see Protect an Application, above).&#x20;
6. Click **Next** button.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F4X8dN9nb3NHvP5A6Pkrj%2Fduo10.png?alt=media&#x26;token=1ab1bb28-909c-4e1d-9750-0bbc38beb5b1" alt="" width="563"><figcaption><p>Setting Integration Parameters</p></figcaption></figure></div>

7. As a final step, choose the **Basic** Auth Type and fill in the **Integration key** and the **Secret key** of the protected application from the Duo Admin Panel (see Protect an Application, above).&#x20;
8. Click the **OK** button.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F10shxbluczTvwfWZA5Tv%2Fduo11.png?alt=media&#x26;token=b96ce4fb-9e41-4b50-bb28-fc53fb5b73bf" alt="" width="563"><figcaption></figcaption></figure></div>

9. Create two different integrations if you're using both API’s, one for **Auth** and one for **Admin**.

### Duo Flows - Description <a href="#duo-flows-description" id="duo-flows-description"></a>

Several Duo flows have been implemented for sending and checking the status of push notifications, and for administrative purposes.&#x20;

### Duo Flows - Push Notifications <a href="#duo-flows-push-notifications" id="duo-flows-push-notifications"></a>

For sending push notifications via Duo, you need two things:

1. Correct Duo **Auth** integration (described above).
2. Flows from the Flow Catalog.
3. There exist five distinct flows for Duo Admin purposes :

   * *Subflow: Duo Admin Enroll User*
   * *Subflow: Duo Admin Associate Phone to a User*
   * *Subflow: Duo - Remove an existing device for a specific user*
   * *Subflow: Duo Admin Retrieve userId*
   * *Subflow : Duo Admin Dublicate Phone*

   The first three flows are the ones that allow enrolling users/modifying devices, and the other two are subflows needed for the first three to be functional.

   &#x20;

   The only configuration needed for these flows to be functional is the **host**, which is the endpoint mentioned at Duo Admin integration, and don’t forget to **link every Execute Rest Call action node with the existing Duo Admin Integration**:

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FPzum0mL7pBC5mWQLN0wK%2Fduoa.png?alt=media&#x26;token=9a9c921c-2257-4af1-ba0a-a1432133c5fd" alt="" width="396"><figcaption></figcaption></figure></div>

\
**Double click these variables and fill them with the information from the Duo Auth integration**.

**NOTE:** The host is the **Endpoint** field from the Duo Auth Integration.

To send Duo Push notifications, the only thing you need is the **Username** of the user who will receive the push notification.

If this is not your use case (ex user needs to be identified with Email rather than Username), please refer to your Aisera team for more options.

### Duo Flows - Enroll Users/Modify Devices <a href="#duo-flows-enroll-users-modify-devices" id="duo-flows-enroll-users-modify-devices"></a>

You need two things to use Duo’s administrative functionality :

1. Correct Duo **Admin** integration (described above).
2. Flows from Flow Catalog.

There are five distinct flows for Duo Admin purposes :

* *Subflow: Duo Admin Enroll User*
* *Subflow: Duo Admin Associate Phone to a User*
* *Subflow: Duo - Remove an existing device for a specific user*
* *Subflow: Duo Admin Retrieve userId*
* *Subflow : Duo Admin Duplicate Phone*

The first three flows allow enrolling users/modifying devices, and the other two are subflows needed for the first three to be functional.&#x20;

The only configuration needed for these flows to be functional is the **host**, which is the endpoint mentioned at Duo Admin integration, and don’t forget to **link every Execute Rest Call action node with the existing Duo Admin Integration**:

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fkxl359JOAGJuUS4Cje3R%2Fduob.png?alt=media&#x26;token=2964be8f-8919-4d90-864f-22a1182e189f" alt="" width="563"><figcaption><p>Edit Action</p></figcaption></figure></div>

&#x20;You can implement more functions for Duo administration purposes, as long as they are available in the [Duo Admin API documentation](https://duo.com/docs/adminapi#api-details).&#x20;

&#x20;
