# SSO - OKTA

## Overview

To configure **Okta** as Identity Provider (**IdP**) and **Xygeni** as Service Provider (**SP**), you should first contact Xygeni to request data needed to properly configure the SAML integration between Okta and Xygeni.

You must provide the following information to Xygeni:&#x20;

* **IDP Sign on URL**: URL of the Identity Provider (or IDP, Okta in this case) against which the Xygeni user is going to authenticate&#x20;
* **Entity ID or Issuer**: Globally unique name for an Identity Provider or a Service Provider, is a URI used to identify the issuer of a SAML request, response, or assertion&#x20;
* **URL Metadata**: URL Metadata is the discovery information that the IDP exposes, to securely interoperate&#x20;
* **Signing Certificate** : Allows the Service Provider (or SP, Xygeni in this case) to verify the authenticity of the SAML response&#x20;

Once submitted above info to Xygeni, you will receive some information back needed to properly configure the integration. This information will contain:&#x20;

* **SP Single Sign on URL**: SP's URL that processes the SAML response, verifies and validates it.

## How to obtain the information to be sent to Xygeni

### Create an Okta App

Login to Okta, go to *Applications* and click on *Create App Integration*

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FchKAotLN8jDLqfvwaFJ3%2Fimage.png?alt=media&#x26;token=c28d2c05-fe0c-4417-af3c-d75726ad308d" alt="" width="563"><figcaption></figcaption></figure>

A new window will open to specify the *Sign-in method*. Choose the *SAML 2.0 option* and click *Next*.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FOBodZGakIilABrJTKU2j%2Fimage.png?alt=media&#x26;token=f3e74e8e-375e-4ec7-8e2a-d536637cffc4" alt="" width="563"><figcaption></figcaption></figure>

Okta will redirect you to the workflow to create your SAML integration.

Under ***General Settings***, you must first specify **App Name** (choose whatever name you prefer to identify your app integration, in our example we will use "xy1" )

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FPuVXpIdA6cQjDL3mx16d%2Fimage.png?alt=media&#x26;token=22c001f3-76d3-4778-9c2a-eb5618143f9e" alt="" width="563"><figcaption></figcaption></figure>

Upon click on *Next*, the **Configure SAML** tab will appear.&#x20;

There are several frames into this section. First is **A - SAML Settings**

* **Single sign-on URL** : Location where the SAML assertion is sent with a HTTP POST. This is often referred to as the *SAML Assertion Consumer Service (ACS)* URL for your application.&#x20;

This value will be provided by Xygeni and it will follow this pattern <https://api.xygeni.io/sso/details/\\[xygeni\\_customer\\_id]-\\[okta\\_app\\_name>]

&#x20;In our case, let's say that customer id = 20, then the value would be <https://api.xygeni.io/sso/details/20-xy1&#x20>;

Although the exact value for this field will be supplied by Xygeni, at this moment you can enter a dummy value such as above.

* **Audience URI (SP Entity ID)** : The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the *SP Entity ID* of your application.&#x20;

This value will be provided by Xygeni and it will follow this pattern \[xygeni\_customer\_id]-\[okta\_app\_name]

In our case, let's say that customer id = 20, so the value would be 20-xy1 Although the exact value for this field will be supplied by Xygeni, at this moment you can enter a dummy value such as above.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FZRYSRnroqFG6C21Yb9eo%2Fimage.png?alt=media&#x26;token=3db602c0-5b99-4cb2-bcd2-afcc375cf1dc" alt="" width="563"><figcaption></figcaption></figure>

Scroll down and click on Next. Then, a new window will appear asking whether you are a customer or partner. Select “*I’m an Okta customer adding an internal app*” option and click *Finish*.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FkL02fLWNJwPYTbIiN24x%2Fimage.png?alt=media&#x26;token=30bf6919-a955-4d47-8999-8b711dacbcc3" alt="" width="563"><figcaption></figcaption></figure>

### Gathering of info to send to Xygeni

Select the app just created and click on *Sign on* tab

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FR4OUZzA3qJUAdvz3zkYx%2Fimage.png?alt=media&#x26;token=c968af82-281c-491e-a078-1844baff64b8" alt="" width="450"><figcaption></figcaption></figure>

Click on *More details* and you will find some useful information to be provided to Xygeni.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FSPRJkIcZauakfvraZZev%2Fimage.png?alt=media&#x26;token=5395eac7-3955-431b-b1dc-d2ef34e76293" alt="" width="455"><figcaption></figcaption></figure>

Copy the above information, download the Signing Certificate and send it to Xygeni.

## Assign people/groups to Okta application

Do not forget to assign people to your just created integration app. To do it, select the *Assignments* tab and include people/groups as needed.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2F2OnRXHXSclJS6dxanHT3%2Fimage.png?alt=media&#x26;token=3c7e4acd-3dd7-4ec9-a401-d0a728a6fddf" alt="" width="451"><figcaption></figcaption></figure>

{% hint style="info" %}
IMPORTANT: The username of Okta must already be an existing Xygeni user !!
{% endhint %}

## Sending info to Xygeni and final steps

Once that you have sent to Xygeni the above information, Xygeni will send back to you :&#x20;

**SP Single Sign on URL**: SP's URL that processes the SAML response, verifies and validates it.&#x20;

Review your Okta application to check that the received value matches the value provided as Single sign-on URL

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2F28gEm0B7egKYIMy6bUIf%2Fimage.png?alt=media&#x26;token=3ef8835c-2588-4a2d-9e30-fc642982722c" alt="" width="533"><figcaption></figcaption></figure>

If they don't match, update the okta app value to the value provided by Xygeni.

## Testing the Okta - Xygeni integration

Now, you are able to test the application integration.

### Login from Xygeni&#x20;

To do it you can go to Xygeni login page ( <https://in.xygeni.io/auth/login> ) and after specifying your login name you will be presented to a page where you can enter your password or click on the Okta button.
