Table of Contents

LimeSurvey

Présentation

LimeSurvey est un logiciel de sondage écrit en PHP.

HTTP Headers

LimeSurvey has a webserver authentication mode that allows one to integrate it directly into LemonLDAP::NG.

To have a stronger integration, we will configure LimeSurvey to autocreate unknown users and use HTTP headers to fill name and mail.

On suppose que LimeSurvey est installé dans /var/www/html/limesurvey

Configuration de LimeSurvey

In Administration panel, go in Configuration > Parameters > Extensions manager. Select the WebServer module and configure it.

This is enough for the authentication part.

If you are blocked, you can deactivate the plugin with this request in database:
update lime_plugins SET active=0 where name="Authwebserver";

To configure account autocreation, you need to edit application/config/config.php: The configuration is done in config.php:

vi /var/www/html/limesurvey/application/config/config.php
        'config'=>array(
        // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
        // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
        // on your webspace.
        // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
                'debug'=>0,
                'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2
                // Update default LimeSurvey config here
                'auth_webserver_autocreate_user' => true,
                'auth_webserver_autocreate_profile' => Array('full_name' => $_SERVER['HTTP_AUTH_CN'],'email' => $_SERVER['HTTP_AUTH_MAIL'],'lang'=>'en'),
                'auth_webserver_autocreate_permissions' => Array('surveys' => array('create'=>true,'read'=>false,'update'=>false,'delete'=>false)),
                )

See also https://manual.limesurvey.org/Optional_settings#Authentication_delegation_with_automatic_user_import

Hôte virtuel LimeSurvey

Configurer l'hôte virtuel LimeSurvey comme n'importe quel autre hôte virtuel protégé.

Hôte virtuel LimeSurvey dans le manager

Aller dans le manager et créer un nouvel hôte virtuel pour LimeSurvey.

En-têtes

Nom d'en-tête Description
Auth-User nom de connexion
Auth-Cn Nom complet de l'utilisateur
Auth-Mail Email de l'utilisateur

Règles

Nom de la règle Expression Description
Déconnexion /sa/logout$ Règle de déconnexion (par exemple logout_app_sso)
Admin ^/(index\.php/)?admin Allow only admin and superadmin users
Défaut default Autorise seulement les utilisateurs avec un rôle LimeSurvey
Il est possible de mettre l'accès par défaut à :
  • accept : tous les utilisateurs authentifiés peuvent accéder aux surveillances
  • unprotect : aucune authentification n'est nécessaire pour accéder aux surveillances