apt-get install apache2 apache2-utils libapache2-mod-php5 php5-mcrypt php5enmod mcrypt service apache2 restart
wget https://simplesamlphp.org/res/downloads/simplesamlphp-1.14.0.tar.gz tar -xzf simplesamlphp-1.14.0.tar.gz mv simplesamlphp-1.14.0/ /var/www/simplesamlphp
ServerName idp.sanglierhurlant.fr <VirtualHost *:80> ... DocumentRoot /var/www/simplesamlphp/www SetEnv SIMPLESAMLPHP_CONFIG_DIR /var/www/simplesamlphp/config ... </VirtualHost>
# 'baseurlpath' => 'simplesaml/', 'baseurlpath' => 'https://mon.serveur.fqdn/', # 'auth.adminpassword' => '123', 'auth.adminpassword' => 'supermotdepasse', # 'secretsalt' => 'defaultsecretsalt', 'secretsalt' => 'qdf54qs5dqs45qds4564dqsf', # 'technicalcontact_name' => 'Administrator', # 'technicalcontact_email' => 'na@example.org', 'technicalcontact_name' => 'Admin', 'technicalcontact_email' => 'admin@mon.serveur.fqdn', # 'timezone' => null, 'timezone' => 'Europe/Paris', # 'language.available' => array( # 'en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'fr', 'it', 'nl', 'lb', 'cs', # 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw', 'ru', 'et', # 'he', 'id', 'sr', 'lv', 'ro', 'eu' # ), 'language.available' => array(fr), # 'language.default' => 'en', 'language.default' => 'fr', # 'enable.saml20-idp' => false, 'enable.saml20-idp' => true,
openssl req -new -x509 -days 3652 -nodes -out /var/www/simplesamlphp/cert/server.crt -keyout /var/www/simplesamlphp/cert/server.pem
<?php $config = array( // This is a authentication source which handles admin authentication. 'admin' => array( // The default is to use core:AdminPassword, but it can be replaced with // any authentication source. 'core:AdminPassword', ), ... 'htpasswd' => array( 'authcrypt:Htpasswd', 'htpasswd_file' => '/var/www/simplesamlphp/config/.htpasswd', 'static_attributes' => array( 'eduPersonAffiliation' => array('member', 'employee'), 'Organization' => array('MonOrganisation'), 'mail' => array('toto@toto.fr'), ), ),
touch /var/www/simplesamlphp/modules/authcrypt/enable touch /var/www/simplesamlphp/config/.htpasswd htpasswd -d /var/www/simplesamlphp/config/.htpasswd toto
<?php /** * SAML 2.0 IdP configuration for SimpleSAMLphp. * * See: https://simplesamlphp.org/docs/stable/simplesamlphp-reference-idp-hosted */ $metadata['__DYNAMIC:1__'] = array( 'host' => '__DEFAULT__', 'privatekey' => 'server.pem', 'certificate' => 'server.crt', 'auth' => 'htpasswd', );