Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:2.0:single_sign_on:saml_dokuwiki [2025/04/25 10:51] – kainhofer | en:2.0:single_sign_on:saml_dokuwiki [2026/09/09 19:19] (current) – [Prerequisites] kainhofer | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| Throughout the document we will assume you have both Admidio and DokuWiki already set up properly at https:// | Throughout the document we will assume you have both Admidio and DokuWiki already set up properly at https:// | ||
| - | As a first step, one needs to **configure Admidio to act as an SAML 2.0 Identity Provider** (IdP). This has to be done once and is not specific to DokuWiki. Please | + | |
| + | As a first step, one needs to **configure Admidio to act as an SAML 2.0 Identity Provider** (IdP). This has to be done once and is not specific to DokuWiki. Please | ||
| {{ : | {{ : | ||
| - | Basically, one (1) needs to **create a cryptographic key** to sign message | + | Basically, one needs to enable SAML 2.0 and **choose a unique EntityID**. |
| - | The page https:// | + | |
| + | The page https:// | ||
| - | ===== TL;DR; - Quick Overview ===== | + | ===== Quick Overview ===== |
| - | Setting up a client (SAML " | + | Setting up a client (SAML " |
| - | * At the **Service Provider (SP)** - DokuWiki | + | * At the **Service Provider (SP)** - Dokuwiki |
| * Configure it either with Admidio' | * Configure it either with Admidio' | ||
| * Choose whether sent messages **should be signed and/or encrypted** (these features require an additional private key and certificate for the SP!), and whether received messages are checked for signatures or encryption is expected. | * Choose whether sent messages **should be signed and/or encrypted** (these features require an additional private key and certificate for the SP!), and whether received messages are checked for signatures or encryption is expected. | ||
| * In **Admidio**, | * In **Admidio**, | ||
| - | * Choose an easily understood **label for the client** (only used in Admidio' | + | * Choose an easily understood **label for the client** (only used in Admidio' |
| * Enter the **ClientID from the SP**, as well as the ACS URL and the SLO response URL. These values must be provided by the client. | * Enter the **ClientID from the SP**, as well as the ACS URL and the SLO response URL. These values must be provided by the client. | ||
| * In Admidio, also choose whether sent messages should be **signed or encrypted**. The crypto key generated in the general SAML setup will be used. | * In Admidio, also choose whether sent messages should be **signed or encrypted**. The crypto key generated in the general SAML setup will be used. | ||
| * Optionally select which **profile fields should be mapped** to SAML attributes and sent to the client, and configure which **group memberships** should be transmitted. | * Optionally select which **profile fields should be mapped** to SAML attributes and sent to the client, and configure which **group memberships** should be transmitted. | ||
| + | |||
| ===== DokuWiki-specific instructions ===== | ===== DokuWiki-specific instructions ===== | ||
| Line 56: | Line 60: | ||
| {{ : | {{ : | ||
| + | {{ : | ||
| - | In addition to the Entity ID and URLs to connect SP and IdP and the certificate, | + | In addition to the Entity ID and URLs to connect SP and IdP and the certificate, |
| - | + | ||
| - | Make sure to use the same SAML field names as the ones mapped in Dokuwiki' | + | |
| {{ : | {{ : | ||
| - | TODO: Describe | + | Dokuwiki does not support |
| - | {{ :en:2.0: | + | |
| Once all settings are done, it is time to enable the saml plugin for login to DokuWiki in the " | Once all settings are done, it is time to enable the saml plugin for login to DokuWiki in the " | ||
| {{ : | {{ : | ||
| + | |||
| + | ==== DokuWiki configuration as text ==== | ||
| + | |||
| + | The settings done above in the graphical interface could also be done in the '' | ||
| + | |||
| + | <code php> | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | MIID4DCCAsigAwIBAgIBADANBg...nS+ViEoHuI2FSMyLpVB5 | ||
| + | -----END CERTIFICATE-----'; | ||
| + | $conf[' | ||
| + | </ | ||
| ==== Setup completed, test Single-Sign-On ==== | ==== Setup completed, test Single-Sign-On ==== | ||
| Line 83: | Line 101: | ||
| ==== Caveats and Things to Consider ==== | ==== Caveats and Things to Consider ==== | ||
| - | * Dokuwiki is picky about signatures. If a SAML response is not signed, login will not be possible, but no corresponding error message will be shown. After an apparent login, the user will arrive at dokuwiki with no user logged in (actually, DokuWiki even silently triggers a logout!). Make sure that in Admidio' | + | * Dokuwiki is **picky about signatures**. If a SAML response is not signed, login will not be possible, but no corresponding error message will be shown. After an apparent login, the user will arrive at dokuwiki with no user logged in (actually, DokuWiki even silently triggers a logout!). Make sure that in Admidio' |
| + | * DokuWiki' | ||
| + | * Instead of the logged-in user, DokuWiki sends its own client ID, so Admidio never knows, which user is supposed to be logged out. Only the browser session ID is available. As a workaround, Admidio looks up all logged-in users attached to that browser session and performs a single-log-out on them. | ||
| + | * Single-Log initiated from another SAML client does not log out DokuWiki. Dokuwiki' | ||
| + | * Bug reports have been filed for DokuWiki' | ||
| + | * With the three simple patches proposed in the bug reports, single-log-out works properly. | ||