Note:12: Difference between revisions

From notes
No edit summary
No edit summary
Line 12: Line 12:
  git tag -l
  git tag -l
  git checkout v2.0.4
  git checkout v2.0.4
composer install


Create a symlink from your webroot to the public directory of the simplesamlphp installation.
Create a symlink from your webroot to the public directory of the simplesamlphp installation. (Need to adjust Apache to serve the additional directory.)


  cd /var/www/html
  cd /var/www/html
Line 29: Line 30:
  cp -r /var/simplesamlphp/metadata/saml20-sp-remote.php.dist simplesamlphp/metadata/saml20-sp-remote.php
  cp -r /var/simplesamlphp/metadata/saml20-sp-remote.php.dist simplesamlphp/metadata/saml20-sp-remote.php


Back on your host system, set the environment variable to indicate to the SimpleSAMLphp library where the config files are located.
If you store the config directory somewhere other than the default location, back on your host system, set the environment variable to indicate to the SimpleSAMLphp library where the config files are located.


  mw docker env set SIMPLESAMLPHP_CONFIG_DIR /var/www/html/w/extensions/SimpleSAMLphp/config
  mw docker env set SIMPLESAMLPHP_CONFIG_DIR /var/www/html/w/extensions/SimpleSAMLphp/config
  mw docker mediawiki create
  mw docker mediawiki create
Follow the instructions at https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#simplesamlphp-configuration-configphp-section_6 to edit config.php.
Follow the instructions at https://simplesamlphp.org/docs/stable/simplesamlphp-sp.html to configure the SP.

Revision as of 07:06, 27 May 2023

Author Cindy Cicalese
Created 26 May 2023 20:24:15
Last Modified 28 May 2023 15:51:43
Tags

These instructions are tested with MediaWiki CLI. They should work with some modifications in other environments as well. This does require making modifications inside the MediaWiki container, which is NOT advisable, but it is necessary to make the SimpleSAMLphp library code accessible to MediaWiki outside the webroot.

At a command prompt inside the MediaWiki container, go to the directory where you want to install SimpleSAMLphp. By default, this should be /var, but it is possible to install it in other locations. Then, clone the repository into a directory called simplesamlphp using git clone. Check for the latest release tag and check out that release.

cd /var
git clone https://github.com/simplesamlphp/simplesamlphp.git
cd simplesamlphp
git tag -l
git checkout v2.0.4
composer install

Create a symlink from your webroot to the public directory of the simplesamlphp installation. (Need to adjust Apache to serve the additional directory.)

cd /var/www/html
ln -s /var/simplesamlphp/public simplesamlphp

Initialize configuration and metadata. You will need to copy the template files into a location in your webroot. It is convenient when using CLI to put them in a subdirectory of the mediawiki directory (possibly a subdirectory of the SimpleSAMLphp extension) so the volume can be accessed from the host system.

cd /var/www/html/w/extensions/SimpleSAMLphp
mkdir simplesamlphp
mkdir simplesamlphp/config
cp -r /var/simplesamlphp/config/config.php.dist simplesamlphp/config/config.php
cp -r /var/simplesamlphp/config/authsources.php.dist simplesamlphp/config/authsources.php
mkdir simplesamlphp/metadata
cp -r /var/simplesamlphp/metadata/saml20-sp-remote.php.dist simplesamlphp/metadata/saml20-sp-remote.php

If you store the config directory somewhere other than the default location, back on your host system, set the environment variable to indicate to the SimpleSAMLphp library where the config files are located.

mw docker env set SIMPLESAMLPHP_CONFIG_DIR /var/www/html/w/extensions/SimpleSAMLphp/config
mw docker mediawiki create

Follow the instructions at https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#simplesamlphp-configuration-configphp-section_6 to edit config.php. Follow the instructions at https://simplesamlphp.org/docs/stable/simplesamlphp-sp.html to configure the SP.