# 19  N2W IdP Integration

N2W supports users configured locally (local users) and users configured using the organization’s federated identity provider (IdP).‌

* Local users are created and managed using the N2W User Management capabilities described above.
* IdP users are users whose credentials are received from the organization’s IdP. N2W can be configured to allow users in the organization’s IdP system to log in to N2W using their IdP credentials. Integration with IdP systems is performed using the SAML 2.0 protocol.
* N2W supports:
  * Active Directory (AD) 2012 and 2016. If using SAML 2.0, AD 2019 also supported.
  * Azure Active Directory-based Single Sign-On (SSO)
  * IDP vendors who support SAML 2.0

{% hint style="info" %}
The N2W root user can only login through the local user account even when N2W is configured to work with IdP.‌
{% endhint %}

Configuring N2W to work with IdP consists of the following:‌

* Configuring the IdP to work with N2W
* Configuring N2W to work with the IdP
* Configuring N2W Groups in N2W
* Configuring N2W Groups and Users in IdP

## 19.1 Configuring IdPs to Work with N2W <a href="#id-19-1-configuring-idps-to-work-with-n-2-ws" id="id-19-1-configuring-idps-to-work-with-n-2-ws"></a>

N2W supports the SAML 2.0 protocol for integration with IdP systems. N2W Software qualifies only certain IdP systems internally, but any SAML 2.0 compliant IdP system should be able to work smoothly with N2W.‌

### 19.1.1 Prerequisites to IdP Integration with N2W <a href="#id-19-1-1-prerequisites-to-idp-integration-with-n-2-ws" id="id-19-1-1-prerequisites-to-idp-integration-with-n-2-ws"></a>

Before configuring N2W to work with an IdP system, it is required that N2W be configured in the IdP system as a new application. Consult the IdP system’s documentation on how to configure a new application.

{% hint style="info" %}
When configuring N2W as a new IdP application, verify that:

* The default **Name ID** format used in SAML requests is set to **Unspecified**, or modify the default N2W configuration as per section on N2W configuration below.
* The X509 certificate **Secure hash algorithm** is set to **SHA-256**.
* The following URL values are used:
  * &#x20;`<N2W-Address>` is either the DNS name or the IP address of the N2W Server.
  * **Entity ID** - `https://<N2W-Address>/remote_auth/metadata`
  * **Sign in response** - `https://<N2W-Address>/remote_auth/complete_login/`
  * **Sign out response** - `https://<N2W-Address>/remote_auth/complete_logout/`
    {% endhint %}

As part of configuring N2W as a new IdP application, the IdP system will request a file containing the N2W x509 certificate. The certificate file can be obtained from the N2W **Settings** screen in the **Identity Provider** tab. In the **Settings** tab, select ​![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/bSyl3xl4njft9raW5SoF/download%20icon.png) **Download CPM's Certificate** and choose a location to save the file. See section [19.1.2.](#19-1-2-configuring-n-2-ws-for-idp-integration)​‌

If configuring Microsoft Active Directory/AD FS to work with N2W, refer to section [19.4.1](#19-4-1-configuring-ad-ad-fs-for-integration-with-n-2-ws).‌

### 19.1.2 Configuring N2W for IdP Integration <a href="#id-19-1-2-configuring-n-2-ws-for-idp-integration" id="id-19-1-2-configuring-n-2-ws-for-idp-integration"></a>

If configuring N2W for integration with Microsoft Active Directory/AD FS, refer to section [19.5](#19-5-configuring-n-2-ws-to-work-with-active-directory-ad-fs).‌

**To configure N2W to work with the organization’s IdP:**&#x200C;

1. In the N2W toolbar, select ​<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/HQNp8r5Q6ZPQAjRJy1vm/Server%20settings%20icon.png" alt="" data-size="line"> **Server Settings**.
2. In the left panel, select the **Identity Provider** tab and then select the **Settings** tab.
3. Select **Identity Provider**. The configuration parameters appear.
4. Complete the following parameters.
5. Once all the parameters have been entered, select **Save.**
6. Optionally, you can **Download CPM’s Certificate** and **Metadata.**
7. Select **Test Connection** to test the connection between N2W and the IdP.

* **CPM IP or DNS** – The IP Address or DNS name of the N2W server.

{% hint style="info" %}
N2W accepts either the IP address or DNS name in many fields. However, some IdPs require that N2W be configured using the format used when configuring N2W as an application in the IdP system. If the IdP uses DNS names, use DNS names in N2W, and if the IdP uses IP address, use IP addresses in N2W.‌
{% endhint %}

* **Entity ID** – The Identity Provider Identifier’s URI provided by the IdP system. Consult the IdP system’s documentation.
* **Sign In UR**L – **The authentication request target** is the URL, provided by the IdP system, to which N2W will redirect users after entering their IdP credentials. Consult the IdP system’s documentation.
* **Sign Out URL** – The logout request target is the URL, provided by the IdP system, to which N2W will redirect users once they logout of N2W. Consult the IdP system’s documentation.
* **NameID format** – The format of the SAML **NameID** element.
* **X509 Certificate** – Select **Choose file** to upload the IdP’s X509 certificate. Consult the IdP system’s documentation about obtaining their x509 certificate.‌

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/QN21uuTeJXUrMykpMmfZ/19%20IDP%20Integration%201-cropped.png)

## 19.2 Configuring Groups and Group Permissions on the N2W Side <a href="#id-19-2-configuring-groups-and-group-permissions-on-the-n-2-ws-side" id="id-19-2-configuring-groups-and-group-permissions-on-the-n-2-ws-side"></a>

Groups and the permissions assigned to groups are configured in N2W. When an IdP user logs into N2W, the information about the user’s group membership is received from the IdP and that group’s permissions are assigned to the user.

{% hint style="info" %}
Every IdP user must belong to an N2W group. IdP users who do not belong to a group, even if they have user-specific permissions as detailed below, cannot log on to N2W. Logon by IdP users who do not belong to a group will be failed with an appropriate error message.

Default groups do not appear until **Identity Provider** is enabled in the **Settings** tab.‌
{% endhint %}

N2W comes with pre-defined groups named with the prefix **`default`**:‌

* `default_managed_users`
* `default_independent_users`
* `default_root_delegates`
* `default_root_delegates_readonly`

​

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/XRY04iIEpsPSX7QpjdX7/19%20IDP%20Integration%202-cropped.png)

{% hint style="info" %}
The default groups cannot be modified or deleted. To see the permission settings assigned to the default groups, select the group name.‌
{% endhint %}

Additional groups can be created and removed easily in the **Identity Provider** tab of the N2W **Server Settings** screen.‌

**To add a group:**

{% hint style="info" %}
The group permission settings essentially mirror the user permissions detailed in section [18](https://docs.n2ws.com/user-guide/18-user-management).‌
{% endhint %}

1. In the **Identity Provider** tab, select the **Groups** tab and then select ​![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mTpJiDA1RBi5iMwm7abe/New%20icon.png) **New**. The New IDP Group screen will appear.
2. Complete the fields as needed, and then select **Save**.‌

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/O3Hc0odlkp4QZCEtjECi/19%20IDP%20Integration%203-cropped.png)

* **Name** – Name of the group.
* **User Type** – For details, see section [18](https://docs.n2ws.com/user-guide/18-user-management). Parameters depend on the **User Type** selected.
  * Managed
  * Independent
  * Delegate
* **Enabled** – When disabled, group users will not be able to log on to N2W.
* For User Type **Managed:**
  * **File Level Recovery** **Allowed**– When selecte&#x64;**,** members of the group can use the file-level recovery feature.
  * **Allow Cost Explorer** – When selected, members of the group can see cost data. For Cost Explorer information, see section [25](https://docs.n2ws.com/user-guide/25-monitoring-costs-and-savings).
  * **Max Number of Accounts** – The maximum number of AWS accounts users belonging to this group can manage.
  * **Max Number of Instances** – The maximum number of instances users belonging to this group can manage.
  * **Max Non-Instance EBS** **(GiB)** – The maximum number of Gigabytes of EBS storage that is not attached to EC2 instances that users belonging to this group can manage.
  * **Max RDS (GiB**) – The maximum number of Gigabytes of RDS databases that users belonging to this group can manage.
  * **Max Redshift Clusters** **(GiB)** – The maximum number of Gigabytes of Redshift clusters that users belonging to this group can manage.
  * **Max DynamoDB Tables (GiB)** – The maximum number of Gigabytes of DynamoDB tables that users belonging to this group can manage.
  * **Max Controlled Entities** – The maximum number of allowed entities for Resource Control.
* For User Type **Delegate**:
  * **Original Username** – Username of delegate. The **Original Username** to which this group is a delegate is required although the **Original Username** does not yet need to exist in N2W. After creation, the **Original Username** *cannot* be modified.
  * **Allow to Perform Recovery** – Whether the delegate can initiate a recovery.
  * **Allow to Change Accounts** – Whether the delegate can make changes to an account.
  * **Allow to Change Backup** – Whether the delegate can make changes to a backup.

## 19.3 Configuring Groups on the IdP Side <a href="#id-19-3-configuring-groups-on-the-idp-side" id="id-19-3-configuring-groups-on-the-idp-side"></a>

IdPs indicate a user’s group membership to N2W using IdP claims. Specifically, the IdP must configure an **Outgoing Claim Type** of `cpm_user_groups` whose value is set to all the groups the user is a member of, both N2W related groups and non-N2W related groups.

{% hint style="info" %}
Group names on the IdP side no longer need the ‘`cpm`’ prefix. In cases where the names of the group users are assigned to in the IdP is of the form `cpm_<group-name-in-N2W>`, for example `cpm_mygroup` where `mygroup` is the name of a group that was created in N2W, the `<group-name-in-N2W>` part of the name must match the name of a group in N2W. See section [19.2](#19-2-configuring-groups-and-group-permissions-on-the-n-2-ws-side). For example, to give IdP users permissions of the N2W group `default_managed_users`:

1. The relevant users can be members of an IdP group called `cpm_default_managed_users`.
2. The IdP must have an outgoing claim called `cpm_user_groups`.
3. The value of the claim must include the names of all the user’s groups in the IdP, which presumably includes `cpm_default_managed_users`.

Or

1. The relevant users can be members of an IdP group called `default_managed_users`.
2. The IdP must have an outgoing claim called `cpm_user_groups`.
3. The value of the claim should not include the names of all the user’s groups in the IdP, which presumably is `default_managed_users`.
   {% endhint %}

{% hint style="info" %}
An IdP user logging onto N2W can belong to only one N2W group, i.e., of all the groups listed in the `cpm_user_groups` claim, only one can be an N2W group, such as `cpm_mygroup`. If an IdP user is a member of more than one N2W group, the logon will fail with a message indicating the user belongs to more than one N2W group.‌
{% endhint %}

### 19.3.1 Understanding N2W User Permissions <a href="#id-19-3-1-understanding-n-2-ws-user-permissions" id="id-19-3-1-understanding-n-2-ws-user-permissions"></a>

A user logged into the N2W system can have several types of permissions. This section discusses the different types of permissions as they are applied to N2W IdP integration. For full treatment of the meanings of these permissions, see section [16.3](https://docs.n2ws.com/user-guide/16-security-concerns-and-best-practices#16-3-using-iam). To override N2W group permissions on a per user basis, see section [19.3.2](#19-3-2-overriding-group-settings-at-the-user-level).‌

**General User Attributes**

<table data-header-hidden><thead><tr><th width="186">Attribute Name</th><th width="117">Mandatory</th><th>Meaning</th><th>Valid Values</th></tr></thead><tbody><tr><td>Attribute Name</td><td>Mandatory</td><td>Meaning</td><td>Valid Values</td></tr><tr><td><code>user_type</code></td><td>N</td><td>Type of user.</td><td><p><code>Managed</code></p><p><code>Independent</code></p><p><code>Delegate</code></p></td></tr><tr><td><code>user_name</code></td><td>N</td><td>Username in N2W.</td><td>Alphanumeric string</td></tr><tr><td><code>user_email</code></td><td>N</td><td>User’s email address.</td><td>Valid email address</td></tr></tbody></table>

**Attributes for Independent and Managed Users**

<table data-header-hidden><thead><tr><th>Attribute Name</th><th width="117">Mandatory</th><th width="251"></th><th>Valid Values</th></tr></thead><tbody><tr><td>Attribute Name</td><td>Mandatory</td><td>Meaning</td><td>Valid Values</td></tr><tr><td><code>allow_file_level_</code> <code>recovery</code></td><td>N</td><td>Whether the user is allowed to use the N2W file-level restore feature.</td><td>yes, no</td></tr><tr><td><code>max_accounts</code></td><td>N</td><td>Number of AWS accounts the user can manage in N2W. Varies by N2W license type.</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_instances</code></td><td>N</td><td>Number of instances the user can backup. Varies by N2W license type.</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_independent_ebs_gib</code></td><td>N</td><td>Total size of EBS independent volumes being backed up in GiB (i.e., volumes not attached to a backed-up instance).</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_rds_gib</code></td><td>N</td><td>Total size of AWS RDS data being backed up in GiB</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_redshift_gib</code></td><td>N</td><td>Total size of AWS Redshift data being backed up in GiB</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_dynamodb_gib</code></td><td>N</td><td>Total size of AWS DynamoDB data being backed up in GiB.</td><td>Number between 1 and max licensed</td></tr><tr><td><code>max_controlled_entities</code></td><td>N</td><td>Total number of AWS resources under N2W Resource Control.</td><td>Number between 1 and max licensed.</td></tr></tbody></table>

**Attributes for Delegate Users**

<table data-header-hidden><thead><tr><th width="220">Attribute Name</th><th width="115">Mandatory</th><th width="234">Meaning</th><th>Valid Values</th></tr></thead><tbody><tr><td>Attribute Name</td><td>Mandatory</td><td>Meaning</td><td>Valid Values</td></tr><tr><td><code>original_username</code></td><td>Y</td><td>Name of the user for whom <strong>user_name</strong> is a delegate.</td><td>Alphanumeric string</td></tr><tr><td><code>allow_recovery_changes</code></td><td>N</td><td>Whether the user can perform N2W restore operations.</td><td>yes, no</td></tr><tr><td><code>allow_account_changes</code></td><td>N</td><td>Whether the user can manage N2W user accounts.</td><td>yes, no</td></tr><tr><td><code>allow_backup_changes</code></td><td>N</td><td>Whether the user can modify backup policies.</td><td>yes, no</td></tr><tr><td><code>allow_settings</code></td><td>N</td><td>Whether the user can modify S3 Repository settings.</td><td>yes, no</td></tr></tbody></table>

All the permissions detailed above are set for a group when the group is created in N2W. Additionally, it is possible to assign N2W permission at the level of individual IdP users as described in [19.3.2](#19-3-2-overriding-group-settings-at-the-user-level). When there is a conflict between a user’s group permissions and a user’s individual permissions, the individual permissions take precedence.‌

A permission string consists of **key=value** pairs, with pairs separated by a semicolon.‌

For convenience, below is a string of all the possible security parameters. N2W will accept a partial list consisting of any number of these parameters in any order:

```
user_type=independent;email=yeepee@redpil.com;allow_recovery=yes;allow_account_changes=yes;allow_backup_changes=yes;allow_file_level_restore=no;max_accounts=1;max_instances=2;max_independent_ebs_gib=3;max_rds_gib=4;max_redshift_gib=5;max_dynamodb_gib=5;original_username=robi@stam
```

### 19.3.2 Overriding Group Settings at the User Level <a href="#id-19-3-2-overriding-group-settings-at-the-user-level" id="id-19-3-2-overriding-group-settings-at-the-user-level"></a>

Users get the N2W permissions assigned to their group. However, it is possible to give specific IdP group members permissions different from their group permissions.‌

**To override the group permission for a specific user:**&#x200C;

1. The IdP administrator must first enter the new permissions in an IdP user attribute associated with the user. The attribute can be an existing attribute that will now serve this role (e.g., `msDS-cloudExtensionAttribute1`) or a custom attribute added to the IdP user schema specifically for this purpose. The content of the attribute specifies the user’s N2W permissions in the **key=value** format detailed in section [19.3.1](#19-3-1-understanding-n-2-ws-user-permissions).
   1. Permissions specified in the user attribute will override permissions inherited from the group.
   2. Permission types not specified in the user attribute will be inherited from the group’s permissions. For example, if the attribute contains only the value `max_accounts=1`, all other permissions will be inherited from the user’s group permissions.
2. Once a user attribute has been configured with the correct permissions, an IdP claim rule with Outgoing Claim Type `cpm_user_permissions` must be created. The value of the claim must be mapped to the value of the attribute chosen above.
3. When the user-level claim is enabled, the user will be able to log on to N2W with permissions that are different from the group’s permissions.

If configuring Microsoft Active Directory/AD FS, refer to section [19.6](#19-6-configuring-an-ad-fs-user-claim) for details.‌

## 19.4 N2W Login Using IdP Credentials <a href="#id-19-4-n-2-ws-login-using-idp-credentials" id="id-19-4-n-2-ws-login-using-idp-credentials"></a>

To use IdP credentials to log on to N2W, select the **Sign in with Identity Provider** option on the N2W Logon screen.​‌

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHkp-FOzfXQshpIW%2F5.png?alt=media)

Selecting **Sign in with** **Identity Provider** will redirect the user to the organization’s IdP system using SAML.

{% hint style="info" %}
To log on to N2W as root, log on with the standard user and password option.‌
{% endhint %}

### **19.4.1 Configuring AD/AD FS for Integration with N2W** <a href="#id-19-4-1-configuring-a-d-ad-fs-for-integration-with-n-2-ws" id="id-19-4-1-configuring-a-d-ad-fs-for-integration-with-n-2-ws"></a>

To enable N2W to integrate with AD/AD FS, N2W must be added to AD FS as a **Relying Party Trust**.

{% hint style="info" %}
The following AD FS screenshots are from AD 2012. The AD 2016 screens are very similar.‌
{% endhint %}

**To run the Add Relying Party Trust Wizard:**&#x200C;

1. In the left pane of the AD FS console, select **Relying Party Trusts**.
2. In the right pane, select **Add Relying Party Trust. . ..** The Wizard opens.
3. Select **Start**.
4. Select the **Enter data about the relying party manually** option.
5. Select **Next**.
6. On the **Welcome** screen, type the display name for N2W (e.g., `N2W`), and then select **Next**.
7. On the **Choose Profile** screen, select the **AD FS profile** option, and then select **Next**.
8. Skip the **Configure Certificate** screen by selecting **Next**.
9. On the **Configure URL** screen:
   1. Select **Enable support for SAML 2.0 WebSSO protocol**.
   2. In the **Relying Party SAML 2.0 SSO Service URL** box, type `https://` followed by the N2W DNS name or IP address, and then followed by `/remote_auth/complete_login/`. For example, the resulting string might look like:`https://ec2-123-245-789.aws.com/remote_auth/complete_login/`
10. Select **Next**.
11. In the **Configure Identifiers** screen, type `https://` followed by the N2W DNS name or IP address, and then followed by `/remote_auth/metadata` in the **Relying party trust identifier** box. For example, the resulting string might look like: `https://ec2-123-245-789.aws.com/remote_auth/metadata`
12. Select **Add** on the right.
13. Select **Next**.
14. On the **Configure Multi-factor Authentication Now?** screen, select the **I do not want to configure multi-factor authentication settings for this relying party trust at this time** option, and then select **Next**.
15. On the **Issuance Authorization Rules** screen, select the **Permit all users to access this relying party** option, and then select **Next**.
16. On the **Ready to Add Trust** screen, review the setting of the **Relying party trust** configured with the Wizard. When finished, select **Next**.
17. On the **Finish** screen of the Wizard, select **Close**. There is no need to select the **Open the Edit Claim Rules dialogue for this relying party trust when the wizard closes** option.‌

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/CLqyVR5kdgIN1FYfAjk6/image.png)

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/tNFnm0L4eCzL3IvFhkgm/image.png)

![](https://gblobscdn.gitbook.com/assets%2F-MCmcYDqe7zxX8UChJRp%2F-MDTc8xUSG2RWnajzbxq%2F-MDUWNaEDP98dtamo_SC%2Fimage.png?alt=media\&token=c18418a2-d077-4ba1-8029-36ece457d550)

### 19.4.2 Installing the N2W Certificate <a href="#id-19-4-3-installing-the-n-2-ws-certificate" id="id-19-4-3-installing-the-n-2-ws-certificate"></a>

In order for N2W to work with AD FS the X.509 certificate used by N2W needs to be added to the AD FS **Trusted Root Certification Authorities** list. If you installed your own certificate in N2W when you first configured N2W (as per section [2.4.2](https://docs.n2ws.com/user-guide/2-configuring-n2ws#2-4-2-web-server-settings)), then your certificate may already be in your AD FS root trust. Otherwise, you will need to add it. If you used the certificate N2W creates during installation, you will need to add that certificate into the AD FS **Trusted Root Certification Authorities**.‌

**To add a root certificate to the AD FS Trusted Root Certification Authorities:**&#x200C;

1. Go to the **Signature** tab under properties and select **Add….**
2. In the **File** box at the bottom of the screen, type the name of the file containing the N2W x.509 certificate. This will be either:
   1. The root certificate you installed in N2W when it was first configured as per section [2.4.2](https://docs.n2ws.com/user-guide/2-configuring-n2ws#2-4-2-web-server-settings) if not already in the AD FS **Trusted Root Certification Authorities**, or
   2. The certificate N2W created when it was first configured.
3. To obtain a copy of the certificate being used by N2W, either the one you originally installed or the one N2W created, select​![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/bSyl3xl4njft9raW5SoF/download%20icon.png)**Download CPM's Certificate** at the bottom of the **Identity Provider** tab of the **Server Settings** screen.
4. Once you have entered the name of the file, select **Open**. The N2W certificate is now visible in the center pane in the **Signature** tab.
5. In the center pane of the **Signature** tab, double select the N2W certificate.
6. Under the **General** tab, select **Install Certificate….**
7. In the **Certificate Import Wizard** screen, select the **Local Machine** option, and then select **Next**.
8. Select the **Place all certificates in the following store** option, select **Browse…,** and then select the **Trusted Root Certification Authorities** store. Select **OK**.
9. Select **Next**.
10. Select **Finish**. Then select **OK** on the pop-up screen, select **OK** on the **General** tab, and then select **OK** on the **Properties** screen.

### 19.4.3 Setting AD FS Properties <a href="#id-19-4-2-setting-a-d-fs-properties" id="id-19-4-2-setting-a-d-fs-properties"></a>

Once the Relying Party Trust has been configured, set the AD FS properties.‌

**To set the AD FS properties:**&#x200C;

1. Go back to the AD FS management console, and in the middle pane, right-select the N2W line under **Relying Party Trust**, and then select **Properties**.
2. On the screen that opens, select the **Endpoints** tab, and then select **Add SAML….**
3. In the **Edit Endpoint** screen, select **SAML Logout** from the **Endpoint type** list.
4. In the **Trusted URL** box, type the DNS name or IP address of the AD FS server followed by `/adfs/ls/?wa=wsignout1.0` (e.g. `https://adserver.mycompany.com/adfs/ls/?wa=wsignout1.0`)
5. In the **Response URL** box, type DNS name or IP address of the N2W server followed by `/remote_auth/complete_logout/` (e.g. `https://ec2-123-245-789.aws.com/remote_auth/complete_logout/`).
6. Select **OK**.
7. Go to the **Advanced** tab, and in the **Secure hash algorithm** list, select **SHA-256**, and then **s**elect **Apply**.‌

![](https://gblobscdn.gitbook.com/assets%2F-MCmcYDqe7zxX8UChJRp%2F-MDUX1mAvqJLI4m7LFHn%2F-MDUXNU2cgUHPHaSLJR4%2Fimage.png?alt=media\&token=faf4f8f5-5ea5-410a-81d7-8365a9c290cd)

### 19.4.4 Creating an AD FS Name ID Claim <a href="#id-19-4-4-creating-an-a-d-fs-name-id-claim" id="id-19-4-4-creating-an-a-d-fs-name-id-claim"></a>

**To create an AD FS claim:**&#x200C;

1. Open the ADFS management console. In the main page of the management console, select **Relying Party Trusts** in the left pane.
2. In the middle **Relying Party Trust** pane, select the N2W party (e.g., N2W).
3. In the right pane, select **Edit Claim Rules…**
4. In the **Edit Claim Rules** screen, select **Add Rule**.
5. In the **Claim rule template** list, select **Transform an Incoming Claim** and then select **Next**.
6. Complete the **Add Transform Claim Rule Wizard** screen:
   1. In the **Claim rule name** box, type a name for the claim.
   2. In the **Incoming claim type** list, select **Windows account name**.
   3. In the **Outgoing claim type** list, select **Name ID**.
   4. In the **Outgoing name ID format** list, select **Unspecified**.
   5. Select the **Pass through all claim values** option.
   6. Select **OK**.‌

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHkuWy9sxFw75jmk%2F10.png?alt=media)

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHkvrAeZOxdJln2J%2F11.png?alt=media)

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHkwKCEX8b835t0W%2F12.png?alt=media)

The next step is to add a Token-Groups claim.‌

### 19.4.5 Adding a Token-Group’s Claim <a href="#id-19-4-5-adding-a-token-groups-claim" id="id-19-4-5-adding-a-token-groups-claim"></a>

An ADFS Token-Groups claim must be configured so that AD FS will send N2W the list of groups a user is a member of. To configure the Token Group’s claim, perform steps 1 and 2 of the Configuring Name ID Claim process in section [19.4.4](#19-4-4-creating-an-ad-fs-name-id-claim). Then continue as follows:‌

1. In the **Claim rule template** list, select **Send LDAP Attributes as Claims** and then select **Next.**
2. In the **Claim rule name** box, type a name for the rule you are creating.
3. In the **Attribute store** list, select **Active Directory**. In the **Mapping of LDAP attributes to outgoing claim types** table:
   1. In the left column (**LDAP Attribute**), select **Token-Groups - Unqualified Names**.
   2. In the right column (**Outgoing Claim Type**), type `cpm_user_groups`.‌

![](https://gblobscdn.gitbook.com/assets%2F-MCmcYDqe7zxX8UChJRp%2F-MDUX1mAvqJLI4m7LFHn%2F-MDUZBr9KhhCxOulCTk9%2Fimage.png?alt=media\&token=539297ec-5458-47ea-b9f6-35300305a6db)

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHkyWUuEUCjU4QwM%2F14.png?alt=media)

### 19.4.6 Testing the Connection <a href="#id-19-4-6-testing-the-connection" id="id-19-4-6-testing-the-connection"></a>

At this point AD FS has been configured to work with N2W. It is now possible to perform a connectivity test between N2W and AD FS.‌

**To test the connection between N2W and AD FS:**&#x200C;

1. Go to the N2W <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/HQNp8r5Q6ZPQAjRJy1vm/Server%20settings%20icon.png" alt="" data-size="line"> **Server Settings**.
2. Select the **Identity Provider** tab.
3. In the **Groups** tab, select an Identity Provider.
4. In the **Settings** tab, select **Test Connection.**
5. Type a valid AD username and password on the logon page.
6. Select **Sign in**.

## **19.5 Configuring N2W to Work with Active Directory/AD FS** <a href="#id-19-5-configuring-n-2-ws-to-work-with-active-directory-a-d-fs" id="id-19-5-configuring-n-2-ws-to-work-with-active-directory-a-d-fs"></a>

**To configure N2W to work with the organization’s AD server:**&#x200C;

1. Go to the N2W ​<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/HQNp8r5Q6ZPQAjRJy1vm/Server%20settings%20icon.png" alt="" data-size="line"> **Server Settings**.
2. Select the **Identity Provider** tab.
3. In the Identity Provider list, select a **Group.**
4. To enable the group, select the **Settings** tab, and then select **Identity Provider.** Several IdP related parameters are presented.
5. In the **Entity ID** box, type the AD FS **Federation Service Identifier**, as configured in AD FS. See section [19.5.1](#19-5-1-federation-service-properties) to locate this parameter in AD FS.
6. In the **Sign in URL** box, type the URL to which N2W will redirect users for entering their AD credentials. This parameter is configured as part of AD FS. The AD FS server’s DNS name, or IP address, must be prepended to the URL Path listed in AD FS. See the AD FS Endpoints screen ([19.5.2](#19-5-2-ad-fs-endpoints)) to locate this information.
7. In the **NameID Format** list, select the format of the SAML **NameID** element.
8. In the **x509 cert** box, upload the X509 certificate of the AD FS server. The certificate file can be retrieved from the AD FS management console under **Service -> Certificates**, as shown in section [19.5.3](#19-5-3-exporting-the-idp-certificate).
9. Once all the parameters for N2W have been entered, select **Save** and then select **Test Connection** to verify the connection between N2W and the IdP.‌

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/wxFuGzr8o5NKKbRzz4Uw/19%20IDP%20Integration%204-cropped.png)

### 19.5.1 Federation Service Properties‌ <a href="#id-19-5-1-federation-service-properties" id="id-19-5-1-federation-service-properties"></a>

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHl0Xfz3WwqCntSc%2F17.png?alt=media)

### 19.5.2 AD FS Endpoints‌ <a href="#id-19-5-2-a-d-fs-endpoints" id="id-19-5-2-a-d-fs-endpoints"></a>

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHl1hL3EXBlnIcWR%2F18.png?alt=media)

### 19.5.3 Exporting the IdP Certificate <a href="#id-19-5-3-exporting-the-idp-certificate" id="id-19-5-3-exporting-the-idp-certificate"></a>

The certificate file can be retrieved from the AD FS management console under **Service -> Certificates**:‌

**To export the IdP’s certificate:**&#x200C;

1. Double select the **Token signing** field to open the **Certificate** screen.
2. Select the **Details** tab and then select **Copy to File . . .** on the bottom right.
3. Select **Next** to continue with the Certificate Export Wizard.
4. Select the Base-64 Encoded X.509 (`.crt`) option and then select **Next**.
5. Type a name for the exported file and select **Next**.
6. Select **Finish**.

## 19.6 Configuring an AD FS User Claim <a href="#id-19-6-configuring-an-a-d-fs-user-claim" id="id-19-6-configuring-an-a-d-fs-user-claim"></a>

Once a user attribute has been configured with the correct permissions, an ADFS claim rule with **Outgoing Claim Type** `cpm_user_permissions` must be created before the user-level permissions can take effect.‌

**To create the claim rule:**&#x200C;

1. Open the AD FS management console.
2. In the main page of the management console, in the left pane, select **Relying Party Trusts.**
3. Select the N2W party (e.g., N2W) in the middle pane, and in the right pane, select **Edit Claim Rules**.
4. In the **Edit Claim Rules** screen, select **Add Rule.**
5. In the **Add Transform Claim Rule Wizard** screen (section [19.6.1](#19-6-1-add-transform-claim-rule-wizard)), select **Send LDAP Attributes as Claims** in the **Claim rule template** list, and then select **Next**.
6. The **Claim Rule Wizard** opens the **Edit Rule** screen (section [19.6.2](#19-6-2-edit-rule)). Complete as follows:
   1. In the **Claim rule name** box, type a name for the rule you are creating.
   2. In the **Attribute store** list, select **Active Directory**.
   3. In the **Mapping of LDAP attributes to outgoing claim types** table:
      1. In the left column (**LDAP Attribute**), type the name of the user attribute containing the user permissions (e.g., `msDS-cloudExtensionAttribute1`).
      2. In the right column (**Outgoing Claim Type**), type `cpm_user_permissions`.
7. Select **OK** to create the rule.

Once the user-level claim is enabled, the user will be able to log on to N2W with permissions that are different from the group’s permissions.​​‌

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHl3uk9RcSYQwB7i%2F20.png?alt=media)

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/08lEoZFoKn9QZFYMSeR3/image.png)

### **19.6.1 Add Transform Claim Rule Wizard**‌ <a href="#id-19-6-1-add-transform-claim-rule-wizard" id="id-19-6-1-add-transform-claim-rule-wizard"></a>

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHl5U6iz6zvhkMAl%2F22.png?alt=media)

### 19.6.2 Edit Rule <a href="#id-19-6-2-edit-rule" id="id-19-6-2-edit-rule"></a>

![](https://gblobscdn.gitbook.com/assets%2Fdocumentation%2F-MDQkWtM42cu7At7P6nE%2F-MDQlHl6HgmNINRxtrWN%2F23.png?alt=media)

## 19.7 Configuring Azure AD and N2W IdP Settings <a href="#id-19-7-configuring-azure-a-d-and-n-2-ws-idp-settings" id="id-19-7-configuring-azure-a-d-and-n-2-ws-idp-settings"></a>

This section describes how to configure Microsoft Azure Active Directory and N2W IdP settings to communicate and enable logging.‌

### 19.7.1 Azure AD Configuration <a href="#id-19-7-1-azure-a-d-configuration" id="id-19-7-1-azure-a-d-configuration"></a>

For complete details on how to configure the Azure AD, see <https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims>

### 19.7.2 N2W IdP Configuration <a href="#id-19-7-2-n-2-ws-idp-configuration" id="id-19-7-2-n-2-ws-idp-configuration"></a>

**To view the Azure AD settings for use in N2W configuration:** &#x20;

1. While still in the Azure AD settings, go to single sign-on and switch to the new view ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/vHjhtEm65sDMSvdR7d91/19-8-2%20View%20Azure%20AD%20settings%20experience.png)
2. Scroll down to section ‎4. These parameters will be used to configure the N2W IdP settings. <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/f6h1zNyhokNd5OntYsIa/19-8-2%20View%20Azure%20AD%20settings%20section%204.png" alt="" data-size="original">

**To configure the N2W Azure AD IdP settings:**&#x200C;

1. In the N2W UI, go to **Server Settings** > **Identity Provider**.
2. Select the provider, and then select ​<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q5aOzuQ1b5mnQgt6kktm/edit%20icon.png" alt="" data-size="line"> **Edit**.
3. In the **Settings** tab, complete the following:
   1. **Entity ID -** Copy Azure AD Identifier.
   2. **Sign In URL** - Copy Login URL.
   3. **Sign out URL** - Copy Logout URL.
   4. **NameID Format** - Select **Unspecified.**
   5. **x509 cert** - Upload the certificate exported in section [19.5](#19-5-configuring-n-2-ws-to-work-with-active-directory-ad-fs)**.**
4. Add a new group with the name of the group you added in the Azure Active Directory, *without* the **`cpm`** prefix. Select the **Groups** tab and then select ​<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mTpJiDA1RBi5iMwm7abe/New%20icon.png" alt="" data-size="line"> **New** and add a name for the group.
5. Select **Save**.
6. Return to the **Settings** tab and select **Test Connection.**

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/orUvL0z21Y9x0W1XNxxC/19%20IDP%20Integration%205-cropped.png)

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/xr6FKX8ZjfeLXdojG0dI/19%20IDP%20Integration%206-cropped.png)
