There is enough information available to help you turn a Drupal 7 installation into an Identity Provider (IdP) for Single Signon (SSO) and Single Logout (SLO). In fact that information will help you with accomplishing the same for Drupal 8. However, the amount of configuring that is involved to accomplish this might be too daunting for someone starting out on this venture.
Personally the following links helped me on the way:
- Setting up a Drupal site as a SimpleSAMLphp IdP by Paul Smith
- SimpleSAMLphp site
- Drupalauth: the Drupal 7 module and SimpleSAMLphp module for Drupal 7
The latter delivers a Drupal 7 module and a SimpleSAMLphp module written for Drupal 7 and instructions on how to configure these. They are the same modules used by the author of the blog post in the first link.
Brad Jones has programmed a module inspired by the work done by Steve Moitozo for Drupal 7 (Drupalauth module): saml_idp. This blog describes how to use saml_idp to turn your Drupal 8 installation into an IdP.
The saml_idp module that will be installed with Composer depends on openid/php-openid, which in turn requires the PHP extension GMP to be installed. Most standard PHP installations do not include this extension. You may need to install it first. In my situation I used the Linux shell command:
sudo apt-get install php7.1-gmp
After restarting the webserver the module can be installed using Composer:
composer require drupal/saml_idp
The installation description for saml_idp advises you to run the post installation script. You can do this with Drush from the web root with the command:
drush ev 'Drupal\saml_idp\Install::postInstall()'
What this post installation script does is create the subdirectory /vendor/simplesamlphp/simplesamlphp/modules/drupalauth and in that subdirectory create an empty file with the name 'default_enable'.