> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/system-management/settings/single-sign-on-sso/forgerock-sso.md).

# ForgeRock SSO

You can configure ForgeRock as your single sign-on SAML provider for logging into DoControl.

{% hint style="success" %}
After you configure ForgeRock as your generic SAML, you can use your ForgeRock credentials to login via DoControl. Note that DoControl supports only service provider initiated SSO via DoControl's login page.
{% endhint %}

To integrate DoControl with ForgeRock SSO, you need to:

1. [Create ForgeRock connection](#create-forgerock-connection)
   * [Add hosted entity provider](#add-hosted-entity-provider)
   * [Add remote entity provider](#add-remote-entity-provider)
   * [Add attribute mapping](#add-attribute-mapping)
   * [Add service](#add-service)
   * [Add identities](#add-identities)
2. [Add a generic SAML connection](#add-generic-saml-connection)

## Create ForgeRock connection

1. Login to your ForgeRock account, using admin permissions.&#x20;

2. Go to **Realms** and click **+New Realm.**<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FmbU2w8p7tysLOMGE1mwk%2Fforgerock%20realms.png?alt=media&amp;token=722be0fe-9df7-4a3f-976b-da3d4b9e9b57" alt=""><figcaption></figcaption></figure>

3. Name the Realm “DoControl” and click **Create**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FXYGTGEdWBOmOf3aSOC88%2FForgeRock%20new%20realm.png?alt=media&amp;token=67ae5f0a-8d0b-4555-8863-f51eede99ed5" alt=""><figcaption></figcaption></figure>

4. In the Realm Overview page, click **SAML Applications**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FXMa61Vw7V77caN94n8mA%2FForgeRock%20SAML%20app.png?alt=media&amp;token=b62a6271-fca5-4ec9-9ce9-5227a82b1f94" alt=""><figcaption></figcaption></figure>

5. In the Entity Providers page, go to the side bar and click **Applications > Federation > Circle of Trust**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fci6wppLokk4JJlmT36K8%2FForgeRock%20add%20circle%20of%20trust.png?alt=media&amp;token=6ca577d2-fdd8-448c-af02-43b902c582dc" alt=""><figcaption></figcaption></figure>

6. Click **+Add Circle of Trust**. Name it "DoControl" and click **Create**.

7. In the Circle of Trust DoControl page, make sure the **Status** is Active. Click **Save Changes**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FKirV6HTHZVkFyoP2fv6t%2FForgeRock%20new%20circle%20of%20trust2.png?alt=media&amp;token=b32c5b93-e2b5-4fec-8407-590b021b0017" alt=""><figcaption></figcaption></figure>

### Add hosted entity provider

1. In the side bar, go to **Applications > Federation > Entity Providers**.
2. &#x20;Select **Add Entity Provider > Hosted**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FfBaXfJmC8YcR20G5p08d%2FForgeRock%20entity%20providers.png?alt=media&amp;token=7ebccdcc-2e37-4844-bcb2-5f57fe7b12c7" alt=""><figcaption></figcaption></figure>
3. &#x20;In the New Hosted Entity Provider page, enter these attribute values:<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FHdnh8BKJJXeL0jdSYru0%2FForgeRock%20new%20hosted%20entity.png?alt=media&amp;token=3494ce3e-b6c2-49b7-aa2d-a4b13d543049" alt=""><figcaption></figcaption></figure>

   * For **Entity ID**, enter docontrol.
   * For **Entity Provider Base URL**, make sure to include your ForgeRock domain in this structure: `https://{{ForgeRock-DOMAIN}}/openam`
   * For **Identity Provider Meta Alias**, enter docontrol.
   * For **Service Provider Meta Alias**, keep empty.
   * For **Circles of Trust**, enter DoControl.
   * Click **Create.**

{% hint style="info" %}

* The `{{ForgeRock-DOMAIN}}`can be found in the ForgeRock URL domain, after the ‘https\://’ and before the first ‘/’
* For example, in `https://idp.docontrol.io/openam/ui-admin,`the {{ForgeRock-DOMAIN}} is `idp.docontrol.io`.&#x20;
  {% endhint %}

4. Go to **Assertion Content > NameID Format**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FDXaIOyQKE7qMbQQq8i6a%2FForgeRock%20NameID%20format.png?alt=media&amp;token=6ca32ef3-605c-459a-a072-15615808371e" alt=""><figcaption></figcaption></figure>

5. Add the following key and value to the NameID value map:
   * **key**: `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`&#x20;
   * **value**: mail

6. Keep the binary toggle off. Click **Add**, then **Save Changes**.

7. Go to the **Assertion processing tab > Local Configuration**

8. For **External Application Logout URL**, enter <https://app.docontrol.io/>&#x20;

9. Click **Save Changes**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FA9RbCwizyJMlUnBifgID%2FScreenshot%202023-08-02%20at%2016.54.08.png?alt=media&amp;token=a707a3cd-7ec4-4369-ac68-80593d5c9efe" alt=""><figcaption></figcaption></figure>

10. Go to the **Advanced tab > SAE Configuration**.<br>

    <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FRjQWqjpDbjeDd9u4B4l9%2FForgeRock%20nameID.png?alt=media&amp;token=21b49afb-18c7-44a6-ae51-39450bea59d5" alt=""><figcaption></figcaption></figure>

11. Make sure the **IDP URL** follows this structure:\
    `https://{{ForgeRock-DOMAIN}}/openam/idpsaehandler/metaAlias/DoControl/docontrol`<br>

12. Go to Relay State URL List.<br>

    <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FzFBbSat2mbVyROJwPuHe%2FForgeRock%20state%20URL.png?alt=media&amp;token=d3bfe2c9-3fb3-4ad7-b730-518785cf0ce4" alt=""><figcaption></figcaption></figure>

13. For the **Relay State URL List,** enter `https://app.docontrol.io/`&#x20;

14. Click **Add** and **Save Changes.**

### Add remote entity provider

1. On the side bar select **Applications > Federation > Entity Providers**.

2. Select **Add Entity Provider > Remote**.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FR8IDZOXbWDB7d4OfC8hX%2FForgeRock%20entity%20providers2.png?alt=media&amp;token=2cdb29ac-2418-4f22-8bf1-eaae5d0e3aa9" alt="" width="543"><figcaption></figcaption></figure></div>

3. Use this [link](https://app.docontrol.io/saml/download.html) to download the XML file for the next step

4. In the New Remote Entity Provider page, drag the XML file or click to browse and upload the XML file.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fel6Z4ZnoDYMEQK1ZJucq%2FForgeRock%20new%20remote%20entity%20prov.png?alt=media&amp;token=402dc681-fd10-4253-82ce-2936fb3e5c64" alt="" width="563"><figcaption></figcaption></figure></div>

5. For `Circles of Trust`, enter DoControl.

6. Click **Create**.

7. In the Entity Providers page, click `urn:amazon:cognito:sp:us-east-1_Tx9u9xQ4d`<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FFn2cMHSM8vAYdPCpaGZC%2FForgeRock%20Amazon%20provider.png?alt=media&amp;token=7a33a01f-ddcb-4409-878d-e913691dfa65" alt=""><figcaption></figcaption></figure>

8. Open the **Assertion Content** tab.&#x20;

9. Under NameID Format, keep the **Disable NameID persistence** toggle **off**.  <br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FvB5SGANfOaFLZidevZYk%2FForgeRock%20Amazon%20ID.png?alt=media&amp;token=50514bdd-7e74-46bc-afc9-f19e5c356cb5" alt=""><figcaption></figcaption></figure>

10. Open the **Services** tab > **SP Service Attributes**.<br>

    <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fxf4XFsacFmsHbhCiW3Wg%2FSP%20service%20attributes.png?alt=media&amp;token=4b9ff414-9b4c-4635-b6a2-2569a62acb9d" alt=""><figcaption></figcaption></figure>

11. Add the following values to the **Single Logout Service**:

    * For **Predefined Binding,** select: HTTP-REDIRECT.
    * For **Location**, enter:  <https://app.docontrol.io/&#x20>;

12. Click **Add** and **Save Changes.**

### Add attribute mapping

1. Open the Assertion Processing tab.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F6bgmQHQwzFBQbFvkkpqS%2FForgeRock%20Amazon2.png?alt=media&amp;token=cb24e5c2-3e23-4aed-8032-9a8c323cc96d" alt=""><figcaption></figcaption></figure>
2. In the Attribute Mapper section, enter these attribute values:

**Attribute number 1**

* Name format Uri: Leave empty
* SAML attribute: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname`
* Local attribute: givenName
* Binary: keep toggle off
* Click **Add**

**Attribute number 2**

* Name format Uri: Leave empty
* SAML attribute: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname`
* Local attribute: sn
* Binary: keep toggle off
* Click **Add**

**Attribute number 3**

* Name format Uri: Leave empty
* SAML attribute: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`
* Local attribute: mail&#x20;
* Binary: keep toggle off&#x20;
* Click **Add**

3. Under Artifact Message Encoding, make sure the Artifact Message Encoding is set to `URI`.&#x20;
4. Click **Save Changes**. <br>

### Add service

1. On the side bar select **Services > Add service**.
2. Under **service type**, select Validation Service.\
   &#x20;

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FPZEGctohPGTqqVqiPGqk%2FForgeRock%20new%20service.png?alt=media&amp;token=5cf9eca0-0aa9-423e-a31b-5d5d6a06d195" alt="" width="563"><figcaption></figcaption></figure></div>
3. For the **Valid goto URL Resources** value, enter:\
   `http://{{ForgeRock-DOMAIN}}/openam/saml2/continue/metaAlias/docontrol/docontrol?secondVisitUrl=/openam/SSORedirect/metaAlias/docontrol/docontrol?*` <br>
4. Click **Save Changes**.

### Add identities

1. On the side bar, go to **Identities.**
2. Assign the relevant people or groups to connect DoControl with your identity provider.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FlyIqlX4U3Nave678TYqe%2FForgeRock%20identities.png?alt=media&amp;token=7bae794d-4db1-4dfd-9230-663f470c5bcb" alt=""><figcaption></figcaption></figure>
3. Make sure that all listed people and groups exist in DoControl as team members.&#x20;

{% hint style="warning" %}
User names are case-sensitive.&#x20;
{% endhint %}

## Add generic SAML connection

SAML (Security Assertion Markup Language) 2.0 is an open standard that allows DoControl to connect to your organization's IdP, such as ForgeRock.

SAML makes single sign-on (SSO) possible by authenticating a user once and then communicating that authentication to DoControl.

{% hint style="success" %}
To enable users to login to DoControl with their ForgeRock credentials, follow the instructions to configure a [generic SAML](/docontrol-user-guide/system-management/settings/single-sign-on-sso/generic-saml.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/system-management/settings/single-sign-on-sso/forgerock-sso.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
