# ADFS

This article outlines the configuration and setup process for Active Directory Federation Services (ADFS) in a Windows environment. ADFS enables secure federated identity and access management by sharing digital identities and entitlement rights across security and enterprise boundaries. It extends single sign-on capabilities to Internet-facing applications, ensuring a seamless and secure authentication experience.

This document includes prerequisites, configuration procedures for ADFS, Directory Services, Federation Services, and Relying Party Trusts, as well as initial login instructions and troubleshooting guidance for common deployment issues.

## Purpose of the document

The purpose of this document is to provide clear, detailed, and professional guidance for configuring ADFS and DSFS to enable secure federated identity management and single sign-on (SSO) functionality for web-based applications.

## Prerequisites

<table><thead><tr><th width="197.75">Requirement</th><th>Details</th></tr></thead><tbody><tr><td>ADFS Setup</td><td>Active Directory Federation Services must be installed and operational.</td></tr><tr><td>Windows Server Access</td><td>Administrative privileges are required</td></tr></tbody></table>

{% hint style="info" %}
Ensure the server is up to date with the latest security patches before proceeding.
{% endhint %}

## Directory Service Configuration

### Create Domain Users

1. Open **Active Directory Users and Computers** on the Windows server.

   <div align="left"><figure><img src="/files/nuj4NchVqRixgBc48UTJ" alt=""><figcaption></figcaption></figure></div>
2. Navigate to the domain and click **User**.

   <div align="left"><figure><img src="/files/RwMMZ6CNsNDSsg0mgzC3" alt=""><figcaption></figcaption></figure></div>
3. Enter the required user details.

   <div align="left"><figure><img src="/files/sOguGzEPqsE1Ibqes8CB" alt=""><figcaption></figcaption></figure></div>

   <div align="left"><figure><img src="/files/b5O89JX7pr8ZYEI2NQe6" alt=""><figcaption></figcaption></figure></div>

   <div align="left"><figure><img src="/files/bysQJRpZ0X1i1OCzWO7A" alt=""><figcaption></figcaption></figure></div>
4. Add an **email address** for the **domain user**.

   <div align="left"><figure><img src="/files/Xw4Skzp9QB6UsBr3ABWY" alt=""><figcaption></figcaption></figure></div>
5. Click **Apply**, then **OK**.
6. Organize users into groups as needed.

{% hint style="warning" %}
Ensure usernames and email addresses follow the organization's naming conventions to avoid authentication issues.
{% endhint %}

## Federation Service Configuration

### Access ADFS Management

1. Open **Administrative Tools** from the **Start menu**.

   <div align="left"><figure><img src="/files/h6mhXgQqGDREqovIUKHl" alt=""><figcaption></figcaption></figure></div>
2. Click **ADFS Management**.

   <figure><img src="/files/IbGowHi1AsPx5Cl92HTZ" alt=""><figcaption></figcaption></figure>

### Download Federation Metadata

1. Go to **Service > Endpoints**.

   <figure><img src="/files/qQbQqgGFJ3NUlKc69IAf" alt=""><figcaption></figcaption></figure>
2. Locate the metadata endpoint.
3. Append the path with **HTTPS** and the **ADFS server hostname or IP**.

**Example:**

```
https://<ADFS-server-hostname>/FederationMetadata/2007-06/FederationMetadata.xml
```

4. Download the **FederationMetadata.xml** file.

   <figure><img src="/files/C5H1iun1OcdkvPkdj1sC" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The metadata URL must be accessible externally if required for integration with external systems.
{% endhint %}

### Import Signing Certificate

1. Obtain the signing certificate file **ADFScert.cer.**
2. Import it into the Tomcat SAML keystore using:

```
keytool -importcert -trustcacerts -alias "adfs" -keystore "C:\path\to\cacerts" -file <path-to-adfs_onprem.cer>
```

{% hint style="warning" %}
Back up the keystore before making changes to prevent loss of critical certificates.
{% endhint %}

### Configure Oasis Properties

| Property                 | Value                                          |
| ------------------------ | ---------------------------------------------- |
| samlHTTPMetadataProvider | Specify the appropriate URL or metadata source |
| entityBaseURL            | Application deployment path                    |

**File Location:**

```
/home/<client>/path/to/extprop/oasis.properties
```

* After updating, **save** the file.

  <figure><img src="/files/PLPXvu2sxTYeKkYah6bc" alt=""><figcaption></figcaption></figure>

## Security Type Configuration

### Windows Configuration

1. Open **tomcat9w\.exe.**
2. Go to **Java** Options.
3. Add the following parameter:

```
-DOVALEDGE_SECURITY_TYPE=saml
```

<figure><img src="/files/VDCClQ6H69hjcLzau9Oz" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/45SUPUvEzkWXUKuD3mSE" alt=""><figcaption></figcaption></figure>

### Linux Configuration

1. Edit the setenv.sh file located at:

```
/home/<username>/tomcat_homepath/bin/setenv.sh
```

2. Add:

```
export CATALINA_OPTS="-DOVALEDGE_SECURITY_TYPE=saml"
```

3. **Save** the file and grant execute permission.
4. Restart **Tomcat**.

{% hint style="info" %}
A restart is required for changes to take effect.
{% endhint %}

## Relying Party Trust (ADFS) Configuration

### Add SAML Metadata

1. Navigate to **Relying Party Trust** in ADFS.

   <figure><img src="/files/skjY1W8g3y55t1onskOK" alt=""><figcaption></figcaption></figure>
2. Click **Start** and add the SAML Metadata for the application.

   <div align="left"><figure><img src="/files/MtXLthijjjivwFmGd6OP" alt=""><figcaption></figcaption></figure></div>
3. The metadata URL can be accessed as:

```
/home/<username>/tomcat_homepath/bin/setenv.sh
```

4. Import the metadata and click **Next**.

   <div align="left"><figure><img src="/files/quS7KjopwPb6IPGBwte0" alt=""><figcaption></figcaption></figure></div>
5. Specify the **Display Name**, and click **Next**.

   <figure><img src="/files/sg7yh1uBvv02IWjgyBCt" alt=""><figcaption></figcaption></figure>
6. Select the **Access Control Policy**, and click **Next**.

   <div align="left"><figure><img src="/files/m7FurJfFcaARDnIsfxBX" alt=""><figcaption></figcaption></figure></div>
7. Click **Next** and finish the wizard.

   <div align="left"><figure><img src="/files/AcTVVBB723hGQDxZ9BzU" alt=""><figcaption></figcaption></figure></div>

   <div align="left"><figure><img src="/files/H5GbBn6BY1QjOoYuwl3i" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Ensure the application URL is accessible before importing metadata.
{% endhint %}

### Configure Advanced Settings

1. Double-click on the added Relying Party Trust.

   <figure><img src="/files/g7XHza6x5sZd2A2OC2qb" alt=""><figcaption></figcaption></figure>
2. Open the added Relying Party Trust.
3. Select the **Advanced** tab.
4. Change **Secure Hash Algorithm** to **SHA1** from **SHA256**.
5. Click **Apply**, then **OK**.

   <div align="left"><figure><img src="/files/e5VsZkrUTdm7aA5m87pj" alt=""><figcaption></figcaption></figure></div>

### Edit Claim Issuance Policy

1. Select the configured Relying Party Trust and click **Edit Claim Issuance Policy.**

   <figure><img src="/files/qfIJWMEqIFvYFn47JCgb" alt=""><figcaption></figcaption></figure>
2. Add a **new rule** using **Send LDAP Attributes as Claims.**

   <div align="left"><figure><img src="/files/yNbXjPcQTAwryXaiENn7" alt=""><figcaption></figcaption></figure></div>
3. Let the Claim Rule Template be sent to the LDAP Attribute as Claims, and click on **Next**.

   <div align="left"><figure><img src="/files/tQZxGxCps0rk6BaQfuhv" alt=""><figcaption></figcaption></figure></div>
4. Specify the **Claim Rule Name**, and select **Active Directory** as the **Attribute Store**.\
   Add the **Attributes** as given in the image below and click on **Finish**.

   <div align="left"><figure><img src="/files/G03YhpkAeHg7J1esxc0O" alt=""><figcaption></figcaption></figure></div>
5. An alternative approach is to use the SAML Account Name if it is not available.

   <div align="left"><figure><img src="/files/Vsg9QXzwNB26SQst7l0R" alt=""><figcaption></figcaption></figure></div>
6. Click on **Apply** and **OK**.

   <div align="left"><figure><img src="/files/HpeedyT3LAdMhEemQpKW" alt=""><figcaption></figcaption></figure></div>
7. Configure **attributes** as per application requirements.

**Example Attribute Mapping:**

| LDAP Attribute   | Outgoing Claim Type |
| ---------------- | ------------------- |
| SAM-Account-Name | Name ID             |
| E-Mail-Addresses | E-Mail Address      |

## Initial Login and Setup

1. Access the application web URL through a browser.

   <figure><img src="/files/zunzFGDi3Fswue3Nb0l2" alt=""><figcaption></figcaption></figure>
2. Log in using **domain admin credentials.**

   <div align="left"><figure><img src="/files/LW7JloXyYUTMXGtrahEF" alt=""><figcaption></figcaption></figure></div>

   <figure><img src="/files/NW6yidOMw6oN3Pd9ng7M" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
At least one user must have the **OE\_ADMIN role**. This must be updated in the database before the initial login.
{% endhint %}

## Troubleshooting

### Issue 1: No assertions found in the response

**Solution:**

1. Open PowerShell on the **ADFS server.**
2. Run:

```
Set-ADFSRelyingPartyTrust -TargetName <targetName> -SamlResponseSignature "MessageAndAssertion"
```

{% hint style="info" %}
Replace \<targetName> with the Display Name of the Relying Party Trust.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/installation-and-settings/authentication-and-sso-setup/adfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
