> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/authentication/admin-portal/settings/identity-provider-idp-configuration.md). Agents can also search and read this documentation through its [MCP server](https://docs.1kosmos.com/~gitbook/mcp).

# Identity Provider (IdP) Configuration

Connect your identity provider to AdminX and unlock user-friendly features like single sign-on. This page walks you through adding an IdP and configuring its metadata, endpoints, and certificates.

***

{% hint style="info" %}
**Note:** Only one identity provider can be added to your tenant at a time.
{% endhint %}

### Add your identity provider

1. Log in to your tenant as a community administrator.
2. Navigate to **Settings > IdP Configuration**. The list page shows any currently configured providers.
3. Click **Create Identity Provider**.

### Configure your identity provider

#### Core configuration

* **Name** — enter a name used to generate an Entity ID (for example, `1Kosmos`).
* **Authentication Request** — choose whether the request is signed. **Signed** is recommended.

#### SAML metadata

Download a copy of your SAML metadata from this section. Under **Download Metadata For**, choose which signing certificate(s) the metadata file contains, then click **Download Metadata**.

* **Primary Certificate** (default) — the metadata contains the primary signing certificate.
* **Secondary Certificate** — the metadata contains the secondary signing certificate.
* **Both** — the metadata contains both signing certificates.

<figure><img src="https://281557795-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOTUyFysR7VGBxLPNQgq%2Fuploads%2FPKdq0pKyYaa0Sa83Zsqr%2FFrame%201267.png?alt=media&amp;token=3d055925-47d9-4e7f-b7cd-36b0c13ea8a7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In the above screenshot, both the **Secondary Certificate** and **Both** options remain disabled until you add a secondary signing certificate.
{% endhint %}

#### Service URL endpoints

Identify your SAML service URL endpoints:

* **Single SignOn Service** — your SSO URL endpoint.
* **Single Logout Service** — your SLO URL endpoint.

#### Signing & encryption certificates

The **Signing Certificate** and **Encryption Certificate** sections work the same way: upload a new certificate, generate a self-signed certificate, or view/download your current one (the expiration date is shown if a certificate already exists). For each, open the **Options** menu and choose one of the following.

**View & download the current certificate** — select **Options > View & Download Certificate**, then:

* Click the **copy** icon under **Certificate** to copy the certificate.
* Click the **copy** icon under **Private Key** to copy the private key.
* Click **Download Certificate** to save it.

**Upload a new certificate** — select **Options > Upload New Certificate**, then:

* **PEM-Encoded X.509 Certificate** — paste it in the box, or click the **cloud icon** to upload directly (recommended).
* **PEM-Encoded Private Key** — paste it in the box, or click the **cloud icon** to upload directly (recommended).
* Click **Save**.

**Generate a self-signed certificate** — select **Options > Generate Self-Signed Certificate**, choose your key details, then click **Generate Certificate**. Click **Download Certificate** to save a copy.

* **Algorithm** — SHA1 or SHA256
* **Key Size** — 1024 or 2048
* **Expiry** — 1, 3, or 5 years

#### **Secondary signing certificate**

When your signing certificate is close to expiry, replacing it changes the certificate for every application at once. Any application that has not yet been updated to trust the new certificate stops accepting sign-ins.

To avoid this, add a **Secondary Signing Certificate** next to the existing (primary) signing certificate. You can then choose, for each SAML2.0 Generic application, which certificate signs its responses, and move applications to the new certificate one at a time.&#x20;

**Before you begin**

* You must be logged in as a community administrator. Only community administrators can add or change the secondary signing certificate.
* An IdP configuration and a primary signing certificate must already exist.

**Adding a secondary signing certificate**

1. Navigate to **Settings > IdP Configuration**.
2. In the **Secondary Signing Certificate** section, below **Signing Certificate**, click **Add Secondary Signing Certificate**.
3. Upload a new certificate or generate a self-signed certificate. The steps are the same as for the **Signing Certificate** described above.

After you add the certificate, the section shows the status **Uploaded** and the **Expires on** date. The **Options** menu offers the same actions as the **Signing Certificate** section.

Adding a secondary certificate does not change how any application is signed. All applications keep using the primary certificate until you select the secondary certificate for them.

{% hint style="warning" %}
You are responsible for making sure that at least one of the primary and secondary signing certificates is valid (not expired) at all times, and that each application uses a valid certificate.
{% endhint %}

**Replacing an expiring signing certificate without downtime**

1. Add the new certificate as the secondary signing certificate.
2. Download the metadata and share it with each application owner, so they can configure their application to trust the new certificate.
3. For each application, set **Community Signing Certificate** to **Secondary Certificate**.&#x20;
4. Sign in to the application to confirm it works. If sign-in fails, switch it back to **Primary Certificate** until the application owner finishes the update.

{% hint style="warning" %}
Switch every application to the secondary certificate before the primary certificate expires. Applications still using an expired certificate cannot authenticate.
{% endhint %}

#### Create a self-signed certificate using OpenSSL

Prefer the command line? Use `openssl` to generate a PEM-encoded X.509 certificate and private key:

**1. Create a 2048-bit private key**

```shell
openssl genrsa -traditional -out private_key.pem 2048
```

**2. Generate a certificate request (SHA256, 365-day lifetime)**

```shell
openssl req -new -key private_key.pem -out cert_request.pem -sha256 -days 365
```

> 💡 **Tip:** Fill out the metadata correctly to specify the right **Organizational Unit** parameter.

**3. Generate a certificate from the request**

```shell
openssl x509 -req -days 365 -in cert_request.pem -signkey private_key.pem -out signing_certificate.pem
```

**4. Upload your signing certificate and key** — follow the **Upload a new certificate** steps above, clicking the **cloud icon** to upload your files directly, then click **Save**.

### Next steps

Click **Save** at the bottom of the page to finalize your IdP configuration. Then log in to your Service Provider (SP) account and set it up for SSO using the **Signing Certificate**, **Encryption Certificate**, **SAML Metadata**, and **Service URL End Points**. The process differs slightly per provider — refer to your SP's documentation for configuring your IdP from their panel.


---

# 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.1kosmos.com/authentication/admin-portal/settings/identity-provider-idp-configuration.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.
