# Connecting Soffid console

## Introduction

Soffid console has a built-in SAML client, so it can act as a service provider in the Soffid federation. It is interesting to use this configuration, as it allows you to enforce the use of two factors authentication to log into the Soffid console.

### Register Soffid as a service provider

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">1.</span> Enable the SAML protocol in the Soffid console:

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">1.1.</span> Open the **Authentication** page:

`Main Menu > Administration > Configure Soffid > Security settings > Authentication`

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">1.2.</span> You must enable the **External XAML identity provider**.

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">1.3.</span> Then you must fill in the fields:

[![image-1689256229585.png](https://bookstack.soffid.com/uploads/images/gallery/2023-07/scaled-1680-/image-1689256229585.png)](https://bookstack.soffid.com/uploads/images/gallery/2023-07/image-1689256229585.png)

- **Soffid server host name**: URL of the Soffid console.
- **SAML federation metadata URL**: URL where the whole federation metadata can be obtained. It used to be [https://your.primary.sync.server:760/SAML/metadata.xml ](https://your.primary.sync.server:760/SAM/metadata.xml)Sometimes, an error as "unable to find valid certification path to requested target" could be displayed.

In that case, you must obtain the public certificate from the sync server and store in your Java trusted certs repository. To do that, use the keytool command. The trusted certs repository is located at &lt;JAVA\_HOME&gt;/lib/security/cacerts

The command should look like the next one. When prompted for a password type in "changeit"

<table border="0" id="bkmrk-post-https%3A%2F%2Ftargeta" style="width: 98.3951%; border-collapse: collapse; border-style: solid; border-color: #6983a7;"><tbody><tr><td style="width: 100%; border-style: solid; border-color: #33bde0;">root@myserver:~$ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool   
-import -file /tmp/RootCA -trustcacerts -alias syncserver  
-keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts

</td></tr></tbody></table>

- **Cache limit (seconds)**: the amount of time the metadata should be kept in memory before refreshing.
- **Identity provider**: after reading the federation metadata, this drop-down box lets you select any identity provider present at the federation. Usually, you will select the Soffid IdP.

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">2.</span><span style="background-color: #ffffff;"> Download Soffid console metadata: </span>

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">2.1.</span> Open the **Authentication** page:

`Main Menu > Administration > Configure Soffid > Security settings > Authentication`

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">2.1. </span><span style="background-color: #ffffff;">Click the **Download metadata** button and save the file.</span>

[![image-1689329490746.png](https://bookstack.soffid.com/uploads/images/gallery/2023-07/scaled-1680-/image-1689329490746.png)](https://bookstack.soffid.com/uploads/images/gallery/2023-07/image-1689329490746.png)

This XML file is the metadata descriptor for the console, including a self-signed certificate generated to sign SAML requests.

The XML file will be like the next one:

![](https://bookstack.soffid.com/uploads/images/gallery/2021-09/embedded-image-qh53z6p1.png)

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">3.</span> Register Soffid Metadata in the third-party Identity Provider.

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">4.</span> You can use the Wizard to Add Applications

[![image-1689334608813.png](https://bookstack.soffid.com/uploads/images/gallery/2023-07/scaled-1680-/image-1689334608813.png)](https://bookstack.soffid.com/uploads/images/gallery/2023-07/image-1689334608813.png)

<p class="callout info">For more information, visit [the Add Applications page.](https://bookstack.soffid.com/books/configuration-wizard/page/add-applications-qO4)</p>

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">5.</span> Test it

<span style="color: #a6d100; font-weight: bold; font-size: 18px;">5.1.</span> Next time you log into the Soffid console, a new button will appear for **External (XAML) login**

[![image-1640009166065.png](https://bookstack.soffid.com/uploads/images/gallery/2021-12/scaled-1680-/image-1640009166065.png)](https://bookstack.soffid.com/uploads/images/gallery/2021-12/image-1640009166065.png)

**<span style="color: #a6d100; font-weight: bold; font-size: 18px;">5.2.</span>** Click on the External (SAML) login button, and the user will be forwarded to the identity provider.

![](https://bookstack.soffid.com/uploads/images/gallery/2021-09/embedded-image-zhqz8evp.png)