-
Notifications
You must be signed in to change notification settings - Fork 0
Setup of SimpleSAML installation on the server
This guide will describe the recommended way of handling SimpleSAML setup on the server.
drush en simplesamlphp_auth
Go to you project root folder.
Create empty folder that will keep SimpleSAML configuration:
mkdir simplesamlphp
Set up SimpleSAML folder structure:
cd simplesamlphp
mkdir cert
mkdir data
mkdir log
mkdir metadata
mkdir sqlite
mkdir config
Place all your certificates into cert
folder
creation of the certificates is omitted in this guide
Make sure data
folder has write permissions for you www-data user
Make sure log
folder has write permissions for you www-data user
Place all your metadata files into metadata
folder
creation of the metadata files is omitted in this guide
touch sqlite/sqlitedatabase.sq3
Make sure sqlite/sqlitedatabase.sq3
has write permissions for you www-data user
Create your authsources.php
and place it into config
folder
creation of the authsources.php file is omitted in this guide
Create your config.php
and place it into config
folder
Params in config.php template that need to be adjusted:
...
'baseurlpath' => 'simplesaml/',
'certdir' => '/var/www/simplesamlphp/cert/',
'loggingdir' => '/var/www/simplesamlphp/log/',
'datadir' => '/var/www/simplesamlphp/data/',
'tempdir' => '/tmp/simplesaml',
'technicalcontact_name' => 'Administrator',
'technicalcontact_email' => '[email protected]',
'timezone' => 'Europe/Copenhagen',
'enable.http_post' => false,
'logging.level' => SimpleSAML\Logger::NOTICE,
'logging.handler' => 'file',
'metadata.sources' => [
['type' => 'flatfile', 'directory' => '/var/www/simplesamlphp/metadata'],
],
'store.type' => 'sql',
'store.sql.dsn' => 'sqlite:/var/www/simplesamlphp/sqlite/sqlitedatabase.sq3',
...
Add the following line to your host file:
SetEnv SIMPLESAMLPHP_CONFIG_DIR /var/www/simplesamlphp/config
Alias /simplesaml /var/www/vendor/simplesamlphp/simplesamlphp/www
<Directory /var/www/vendor/simplesamlphp/simplesamlphp/www>
<IfModule !mod_authz_core.c>
# For Apache 2.2:
Order allow,deny
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
# For Apache 2.4:
Require all granted
</IfModule>
</Directory>
- Open
https://[installation]/simplesaml
- Proceed with the login
- You should login successfully and see a list of the user attributes