Diese Seite wurde noch nicht vollständig übersetzt. Bitte helfen Sie bei der Übersetzung.
(diesen Absatz entfernen, wenn die Übersetzung abgeschlossen wurde)
Ab Version 5.0 kann Admidio von anderen Anwendungen genutzt werden, um Benutzer per Single-Sign-On (SSO) anhand der Admidio-Benutzerdatenbank zu authentifizieren. Wenn ein Login in der Anwendung initiiert wird, wird der Benutzer zum Login zu Admidio weitergeleitet und nach erfolgreicher Authentifizierung zurück zur Client-Anwendung geleitet und dort angemeldet. Der Benutzer muss sich nur bei Admidio anmelden und erhält automatisch Zugang zu anderen (konfigurierten) Anwendungen. Die anderen Anwendungen müssen keine Passwörter speichern oder verarbeiten.
Die beiden dominierenden Protokolle sind das XML-basierte SAML 2.01)) und das JSON-basierte OpenID Connect (OIDC)2)). Admidio kann für beide Protokolle als Identity Provider (IdP) fungieren. Wir werden die Konfiguration im Allgemeinen für beide Protokolle für die folgenden Systeme beschreiben:
Andere Systeme wie Prestashop bieten keine frei verfügbaren SAML- oder OpenID-Plugins an, nur einige sehr teure kommerzielle Erweiterungen.
Alle Beispiele hier verwenden die Domain https://admidio.demo.open-tools.net/ oder https://admidio.local als Admidio-Domain und https://[appname].demo.open-tools.net/ oder https://[appname].local für die Client-Anwendungen.
Um eine Webanwendung eines Drittanbieters so einzurichten, dass sie Single-Sign-On über Admidio als SAML 2.0 Identity Provider verwendet (damit andere Anwendungen die Benutzerkonten von Admidio für ihre Logins nutzen), sind drei Schritte erforderlich:
Diese Seite beschreibt die generische Einrichtung eines Admidio- und eines SAML 2.0-Clients. Sie wurde mit mehreren SAML-fähigen Anwendungen getestet, und clientspezifische Anweisungen sind auf separaten Seiten verfügbar.
Um eine Webanwendung eines Drittanbieters (die “Relying Party”, kurz RP) so einzurichten, dass sie Single-Sign-On über Admidio als OpenID Connect Identity Provider verwendet (damit andere Anwendungen die Benutzerkonten von Admidio für ihre Logins nutzen), sind drei Schritte erforderlich:
Diese Seite beschreibt die generische Einrichtung eines Admidio- und eines OpenID-Clients. Sie wurde mit mehreren OpenID-fähigen Anwendungen getestet, und clientspezifische Anweisungen sind auf separaten Seiten verfügbar.
Der Standard-Login-Prozess für eine Anwendung (den “Service Provider”, d.h. SP) funktioniert mit den folgenden Schritten:
Schritt 2 wird in diesem Fall von der Anwendung durchgeführt, aber es gibt dafür keine technische Voraussetzung. Im Prinzip kann die Entscheidung, dass ein Benutzer erfolgreich angemeldet ist, von jedem vertrauenswürdigen System getroffen werden. Hier setzt Single-Sign-On an: Anstatt dass jede Anwendung Passwörter anfordert und verarbeitet, wird Schritt 2 an einen sogenannten Identitätsanbieter (“IdP”) delegiert. Dieser Identitätsanbieter muss vertrauenswürdig sein und übernimmt den Teil der Überprüfung, ob ein Benutzer Zugriffsrechte hat (z.B. durch Eingabe eines Passworts oder Verwendung eines Fingerabdrucks usw.).
Es gibt zwei etablierte technische Protokolle für Single-Sign-On: SAML 2.0 (XML-basiert, weit verbreitet in großen Geschäftsanwendungen und z.B. Microsoft ADFS) und OpenID Connect (OIDC) (JSON-basiert mit “Tokens”; verwendet von vielen Web-/Social-Apps wie Google, Facebook usw.).
SAML 2.0 basiert auf XML-Nachrichten und lagert im Grunde nur das Anmeldeformular und die daraus resultierende Anmeldeentscheidung an den IdP aus. Wenn der Login erfolgreich ist, sendet der IdP diese Informationen (zusammen mit dem Benutzernamen und optional weiteren Profilfeldern) als kryptografisch signiertes XML an den SAML-Client.
Im SAML-Fall ändert sich der oben beschriebene Login-Flow wie folgt. Aus Benutzersicht werden jedoch die gleichen Schritte der Passworteingabe durchgeführt, nur auf einem anderen System. Die im Flow involvierten Browser-Weiterleitungen werden vom Benutzer kaum bemerkt und erfordern keine Benutzerinteraktion.
Es gibt einige Dinge zu beachten, wie die SAML-Authentifizierung funktioniert:
OpenID Connect basiert auf dem Austausch von Daten mit JSON-Objekten. Es ist eine Erweiterung des OAuth 2.0-Protokolls, das nur die Authentifizierung handhabt. Die OpenID-Schicht fügt zusätzliche Profilinformationen und Berechtigungen hinzu, verwendet aber OAuth für die grundlegende Autorisierung.
Anstatt nur mit Browser-Weiterleitungen wie SAML zu arbeiten, basiert OpenID auf OAuth und nutzt ausgiebig die direkte Kommunikation (“Backchannel”) zwischen der Relying Party und dem IdP. Anstatt nur eine erfolgreiche Anmeldung zu dokumentieren, trennt OpenID Authentifizierung (erfolgreiche Anmeldung) und Autorisierung (Rollen, die Benutzerrechte gewähren). Es ist auch nicht auf eine aktive Sitzung beim IdP angewiesen. Stattdessen generiert es ein dediziertes Passwort (das “Token”) für den Client und ersetzt somit das individuelle Passwort des Benutzers durch app-spezifische Passwörter, die intern vom Client und dem IdP gehandhabt werden, ohne dass der Benutzer es bemerkt. Wenn ein solches Token abläuft, kann ein anderes (Refresh-)Token verwendet werden, um ein neues Token zu erstellen, sodass kein neuer Login erforderlich ist. All dies geschieht im Hintergrund und die Benutzererfahrung ist im Grunde die gleiche wie bei einem direkten Login oder mit SAML.
todo box
Admidio's SSO configuration is done in the preferences (Tab “Modules”, section “Single-Sign-On (SAML 2.0, OpenId Connect)”).
The Preferences page also lists all the relevant data to set up the client as a Service Provider. Particularly useful will be the Metadata URL, which provides all data to set up a client (SP) in XML format. You don't need to do anything, the SSO plugin for Admidio provides this out of the box. Here is an example of such a metadata xml:
Notice that it contains both the public key / certificate of the signing and encryption keys, as well as the URLs to the SingleSignOnService (SSO) and the SingleLogOutService (SLO) at the admidio installation. Furthermore, the first half of the XML contains the cryptographic signature of the XML, signed with the private key to prove that the metadata file actually comes from the admidio installation and not from some adversary.
Admidio is now ready to provide single-sign-on functionality to Service Providers.
Each SP first needs to be set up with the URLs (and keys) to connect to Admidio. This can ideally be done by providing the SP with the link to the metadata. After that, Admidio needs to be configured to accept login requests from the SP. Again, each SP typically provides the required data as a metadata XML, which can be loaded in Admidio to set up the client for Single-sign-on functionality. The details depend on the actual client app.
Once Admidio is set up to act as a SAML 2.0 IdP, the clients (Service Providers, “SP”) can be configured to use Admidio as their login provider. Many systems either support SAML 2.0 out of the box or with some plugin. The following settings are needed for setup. They are also available for copying at Admidio's SSO preferences page, as well as in the metadata xml.
In addition each client typically has settings to require sent or received SAML messages to be signed and/or encrypted to ensure a secure login process. The details depend on the capabilities of the client. Some clients do not support encryption, other require all SAML messages to be signed (for good reason!). Also, some clients offer a setting that SAML login is only possible for users that are already manually created in the SP, while others offer a setting to automatically create user accounts on successful SAML login.
The details always depend on the particular client. See the client-specific instructions for details for a particular client. Other clients should work, too, if they properly implement SAML. The configuration will be similar to the documented clients.
Once the client is set up to send authentication requests to Admidio, Admidio needs to be configured to respond to them. All SAML clients (Service Providers) are configured in the SSO Client Administration page, which can be reached from the SSO Preferences page (https://admidio.demo.open-tools.net/modules/preferences.php?panel=sso) from the SSO SAML preferences page.
To ensure only legitimate login requests from the real client are processed, Admidio needs the entity ID, the URL for redirect as well as the x509 certificate (if messages are cryptographically signed). The following settings are needed for setup. They MUST be consistent with the settings configured in the SAML client (SP). Many SPs provide a Metadata XML link or file with all required settings included for automatic client setup. In Admidio's SAML client section, one can input the metadata URL and Admidio will pre-configure the client, but manual adjustments are possible (and in many areas even needed).
In addition each client typically has settings to require sent or received SAML messages to be signed and/or encrypted to ensure a secure login process. The details depend on the capabilities of the client. Some clients do not support encryption, other require all SAML messages to be signed (for good reason!).
Admidio's general SSO configuration is done in the preferences (Tab “Modules”, section “Single-Sign-On (SAML 2.0, OpenId Connect)”).
The Preferences page also lists all the relevant URLs (endpoints) to set up the client as a Relying Party. Particularly useful will be the Discovery URL, which provides all data to set up a client (RP) in JSON format. If an app supports automatic discovery, this will automatically do the basic setup. Otherwise you will have to copy the provided endpoint URLs to the client's config. Here is an example of such a discovery JSON:
In contrast to SAML, the metadata does not contain the public certificate. In OpenID, there is a separate endpoint (the “jwks_uri” in the discovery document) that provides the current key in “JSON Web Key Sets” (JWKS) format. Also notice that the discovery document lists all allowed scopes and technical details about the internal OpenID settings.
Admidio is now ready to provide single-sign-on functionality to Relying Parties.
Each RP first needs to be set up with the URLs to connect to Admidio. This can ideally be done by providing the RP with the discovery link. After that, Admidio needs to be configured to accept login requests from the RP. Unfortunately, OpenID Connect does not provide an automatic way to transfer configuration data from the RP to the IdP, so the client ID and the Redirect URL needs to be manually copied from the RP to Admidio's OpenID client settings. The details on where to find these depend on the actual client app.
Once Admidio is set up to act as an OpenID IdP, the clients (Relying Parties, “RP”) can be configured to use Admidio as their login provider. Many systems either support OpenID Connect out of the box or with some plugin. The following settings are needed for setup. They are also available for copying at Admidio's SSO preferences page, as well as in the metadata json (from the discovery URL).
In addition each client typically has settings to for further customization. Also, some clients offer a setting that SAML login is only possible for users that are already manually created in the RP, while others offer a setting to automatically create user accounts on successful SAML login.
The details always depend on the particular client. See the client-specific instructions for details for a particular client. Other clients should work, too, if they properly implement SAML. The configuration will be similar to the documented clients.
Once the client is set up to send authentication requests to Admidio, Admidio needs to be configured to respond to them. All OpenID clients (Relying Parties) are configured in the SSO Client Administration page, which can be reached from the SSO Preferences page (https://admidio.local/modules/preferences.php?panel=sso) from the SSO OIDC preferences page.
To ensure only legitimate login requests from the real client are processed, Admidio needs the entity ID and the Redirect URI. In addition, Admidio will generate a Client Secret (a random string) that needs to be copied to the client's configuration and acts as a client password. The following settings are needed for setup. They MUST be consistent with the settings configured in the OpenID Connect client (RP).
In addition each client typically has some more settings regarding fields ⇔ claims mapping, groups, auto-generating accounts for new logins, etc. The details depend on the capabilities of the client.