Starting with version 5.0, Admidio can be used by other applications to authenticate users against Admidio's user base. These instructions will guide you through the process of connecting Plesk to Admidio to use Admidio's login. For general instructions, and other apps, please visit the general Single-Sign-On overview page.
Plesk provides OpenID Connect login through the OAuth Login plugin. This is not a free plugin, but charges a yearly or monthly license fee. In this tutorial, we will describe how to set it up properly for single-sign on using Admido's user accounts.
Throughout the document we will assume you have both Admidio and Plesk already set up properly at https://admidio.local/ and https://plesk.local/. Please modify these URLs to your actual installation.
As a first step, one needs to configure Admidio to act as an OpenID Provider (OP). This has to be done once and is not specific to Plesk. Please follow this guide: #a_basic_setup_for_admidio_as_an_oidc_id_provider
Basically, one (1) needs to create a cryptographic key to sign message and choose a unique EntityID. The page https://admidio.local/adm_program/modules/preferences.php?panel=sso also provides the link to the metadata xml, and the individual settings in case a client does not support auto-configuration via metadata.
Setting up a client (OpenID “Relying Party” - short RP) to use Admidio's user accounts for logging in consists of two steps: (1) The client (RP, Plesk in our case) needs to be set up with the data about the OpenID Provider (OP). One has to manually paste the Admidio endpoint URLs of the OpenID provider into the client's configuration. Admidio provides copy buttons in the preferences screen, so this is rather straightforward. (2) Admidio needs to be told about the client. In particular, the entity ID and the redirect URL must be given, and a custom-generated (random) secret must be copied to the client configuration.
The concrete steps are:
First, install the OAuth Login plugin in Plesk from the plugin directory:
The next step is to set up Admidio to receive login requests from Plesk. This is done by adding an OpenID client in Admidio.
Return to Admidio's SSO preferences page, go to the “Single-Sign-On Client Administration” (the button right below the endpoint URLs and above the “Save” button), and create a new client.
The settings in Plesk's and Admidio's OpenID setup need to match. Most of the settings can be copied over from Admidio to Plesk or vice versa:
After saving the changes (both in Plesk and Admidio), the apps should should now be set up for single-sign-on in Plesk.
OpenID Login in Plesk does not work for the main administrator, but only for “additional administrator acounts”. They can be set up as main administrator in the “Tools & Settings” area:
The email address will be used to match logins to existing additional admin accounts.
Admidio and Plesk should now be set up to use Admidio for logging in to Plesk. If you log out of Plesk and try to log in again, you will be shown the Admidio login screen and then redirected back to Plesk after a successful login.