> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/nl/features/settings/sso/openid.md).

# OpenId

Een SSO-verbinding configureren met het protocol OpenId, met een geheime sleutel of een privésleutel JWT.

## Werkingsprincipe

De OpenId-specificaties vindt u [hier](https://openid.net/connect/).

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-abe11b916b530f9f6df30dc5153a96ba7839c7d2%2Fopenid1.png?alt=media" alt="Autorisatiecodeflow van OpenID Connect tussen de relying party, de OpenID-provider, het tokeneindpunt en het UserInfo-eindpunt"><figcaption></figcaption></figure>

SSO instellen met OpenId gebeurt in drie stappen:

* de authenticatieprovider configureren: Active Directory, Google Workspace enzovoort;
* de serviceprovider configureren: Dastra;
* de authenticatie testen.

## 1. De authenticatieprovider configureren

Stel een OpenId-configuratie in bij uw authenticatieprovider.

Voor Active Directory: <https://learn.microsoft.com/nl-nl/entra/identity-platform/v2-protocols-oidc>

Om de lokale accounts (die in Dastra worden gehost) aan de accounts van uw provider te koppelen, heeft Dastra een eigenschap nodig die het e-mailadres van de gebruiker bevat. Het veld **De naam van de claim met het e-mailadres** in stap 2 is vooraf ingevuld met `email`. Ontbreekt deze claim, dan zoekt Dastra ook naar de eigenschap met de naam <http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress>.

Dit zijn de gegevens die u bij de serviceprovider moet invullen:

* **Autoriteit/domein**, bijvoorbeeld `https://account.oauth.sso.com`;
* **ID van de client (clientId)**;
* **Geheime sleutel**, of de onderdelen van de privésleutel JWT (zie de clientauthenticatiemethode in stap 2);
* **Type reactie (Standaard: id\_token)**, standaard `id_token`;
* **Scope**, standaard `openid profile email`.

Om uw authenticatieprovider te configureren hebt u de **Redirect URL** nodig die in het formulier van Dastra staat, in de vorm `https://account.dastra.eu/signin-{connection identifier}`. Deze URL is specifiek voor elke verbinding.

## 2. De serviceprovider configureren

Open in Dastra de [SSO-beheerpagina](https://app.dastra.eu/general-settings/sso) (**Instelling van de organisatie** > **Eenmalig inloggen**, alleen beschikbaar voor eigenaren van de organisatie) en klik op **Voeg een SSO-login toe**. Kies het protocol **OpenID**.

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-9f0b0d5a9f4dca0e4d25881de28162a2914a750c%2Fsettings-sso-liste-logins.png?alt=media" alt="De pagina Eenmalig inloggen met de lijst met SSO-logins en de knop Voeg een SSO-login toe"><figcaption></figcaption></figure>

Vul de velden van het formulier in met de gegevens van uw authenticatieprovider:

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-8e9d1799a2e2312388c861c029863043f0cce86c%2Fsettings-sso-openid-config-modal.png?alt=media" alt="Het formulier voor een OpenID-SSO-login in Dastra"><figcaption></figcaption></figure>

Het formulier toont ook de waarden die u bij uw authenticatieprovider moet declareren:

* **Redirect URL**;
* **Afmeld-URL (Back-channel logout url)**, optioneel;
* **JSON openbare sleutel URI (JWK Private Key)**, alleen bij de privésleutel JWT. Sla het formulier eenmaal op om dit eindpunt te laten werken.

Declareer de **Afmeld-URL (Back-channel logout url)** bij uw provider als u wilt dat een afmelding bij de provider ook de Dastra-sessie beëindigt. Dastra ondersteunt OpenID Connect Back-Channel Logout: wanneer uw provider een logouttoken voor een gebruiker of een sessie verstuurt, trekt Dastra de bijbehorende sessies in, zodat de gebruiker zich opnieuw moet aanmelden.

### Clientauthenticatiemethode: geheime sleutel of privésleutel JWT

Kies hoe Dastra zich bij uw identiteitsprovider authenticeert:

* **Geheime sleutel**: Dastra en uw provider bewaren allebei hetzelfde clientgeheim. Vul het in bij het veld **Geheime sleutel**.
* **Privésleutel JWT (private jwt assertion)**: Dastra ondertekent zijn authenticatie met de privésleutel die u opgeeft, en uw provider controleert de handtekening met de openbare sleutel. Er is geen gedeeld geheim nodig, wat het risico op lekken verkleint. Controleer of uw identiteitsprovider deze methode ondersteunt.

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-b491ce543d800c7e2475eff2704ac0bf87259bf4%2Fsettings-sso-openid-jwt-private-key.png?alt=media" alt="Het OpenID-formulier met de optie privésleutel JWT geselecteerd"><figcaption></figcaption></figure>

Bij **Privésleutel JWT (private jwt assertion)** schakelt het **Type reactie (Standaard: id\_token)** over op `code` en vraagt het formulier om:

* **Privésleutel in de PEM-tekst (RAW)**: eenmaal opgeslagen wordt de sleutel niet meer getoond. Klik op **Replace private key** om hem te vervangen;
* **Inhoud van het certificaat (RAW-formaat), verplicht voor Entra Id**;
* **Sleutelidentificatie (kid)**, optioneel: vul de sleutel-ID in die uw provider heeft toegekend toen u de openbare sleutel uploadde, of laat het veld leeg zodat Dastra de JWK-thumbprint (RFC 7638) van de privésleutel gebruikt.

Declareer daarna de **JSON openbare sleutel URI (JWK Private Key)** bij uw provider, zodat die de openbare sleutel van de verbinding kan ophalen.

Het veld **Beheerder** is optioneel. Is het ingevuld, dan controleert Dastra dat het ontvangen token door deze uitgever is afgegeven, bijvoorbeeld `https://login.microsoftonline.com/{tenantid}/v2.0`.

{% hint style="danger" %}
U kunt alle gebruikers van de organisatie dwingen een bepaalde SSO te gebruiken (optie **Forceer voor alle gebruikers**). Wees voorzichtig: als de SSO uitvalt, hebt u als beheerder geen toegang meer tot uw account. Houd een lokaal reserveaccount aan, of stel gebruikers vrij met het veld **Specifieke gebruikers die zijn vrijgesteld van SSO (bijv. beveiligingsbeheerders)** (zie [Single Sign On (SSO)](https://doc.dastra.eu/nl/features/settings/sso.md)). SSO per gebruiker beheren verdient de voorkeur.
{% endhint %}

{% hint style="warning" %}
Bijzonder geval van externe gebruikers: alleen accounts die intern zijn voor een abonnement vallen onder SSO. Accounts van externe gebruikers (met een extra abonnement) vallen er niet onder.
{% endhint %}

## 3. De SSO testen met OpenId

Test de authenticatie wanneer de configuratie klaar is door rechts van de verbinding in de lijst op **Testen** te klikken. Loopt u tegen een probleem aan, open dan een ticket via de [supportpagina](https://app.dastra.eu/general-settings/support).

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-498f2f0081a33df7091e11b838f685dc49a78d48%2Fsettings-sso-openid-card-status.png?alt=media" alt="Een SSO-verbinding in de lijst, met de status en de knop Testen"><figcaption></figcaption></figure>


---

# 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://doc.dastra.eu/nl/features/settings/sso/openid.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.
