Commit 6351e732 authored by Clément OUDOT's avatar Clément OUDOT

Captcha configuration (#LEMONLDAP-217)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk@2801 1dbb9719-a921-0410-b57f-c3a383c2c641
parent 97d69881
......@@ -419,7 +419,9 @@ install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir
@$(PERL) -000 -i -pe "s#^(persistentStorageOptions\\n\\s+)'[^\\n]*?'\$$#\$${1}\'\\\$$data1 = {&39;Directory&39; => &39;$(APACHEPSESSIONFILEDIR)&39;,&39;LockDirectory&39; => &39;$(APACHEPSESSIONFILELOCKDIR)&39;};'#m" $(RFILECONFIGDIR)/lmConf-1
@$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g;\
s#__SESSIONDIR__#$(APACHESESSIONFILEDIR)#g;\
s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;' $(RFILECONFIGDIR)/lmConf-1
s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;\
s#__CAPTCHADIR__#$(CAPTCHADIR)#g;\
s#__CAPTCHAOUTPUTDIR__#$(CAPTCHAOUTPUTDIR)#g;' $(RFILECONFIGDIR)/lmConf-1
@if [ "$(APACHEUSER)" != "" ]; then \
chown $(APACHEUSER) $(RFILECONFIGDIR) || exit 1; \
if [ "$(APACHEGROUP)" != "" ]; then \
......
......@@ -79,3 +79,9 @@ notificationStorage
notificationStorageOptions
'$data1 = {'dirName' => '__NOTIFICATIONDIR__'};'
captcha_data
'__CAPTCHADIR__'
captcha_output
'__CAPTCHAOUTPUTDIR__'
......@@ -9,7 +9,7 @@ use strict;
use Lemonldap::NG::Common::Conf::SAML::Metadata;
use Lemonldap::NG::Common::Regexp;
our $VERSION = '1.2.3';
our $VERSION = '1.3.0';
## @method protected hashref cstruct(hashref h,string k)
# Merge $h with the structure produced with $k and return it.
......@@ -259,8 +259,10 @@ sub struct {
# PORTAL PARAMETERS
portalParams => {
_nodes => [qw(portal n:portalMenu n:portalCustomization)],
_help => 'portalParams',
_nodes => [
qw(portal n:portalMenu n:portalCustomization n:portalCaptcha)
],
_help => 'portalParams',
portal => 'text:/portal:portal:text',
......@@ -320,6 +322,18 @@ sub struct {
hideOldPassword => 'bool:/hideOldPassword',
mailOnPasswordChange => 'bool:/mailOnPasswordChange',
},
},
portalCaptcha => {
_nodes => [
qw(captcha_login_enabled captcha_mail_enabled captcha_size captcha_data captcha_output)
],
captcha_login_enabled => 'bool:/captcha_login_enabled',
captcha_mail_enabled => 'bool:/captcha_mail_enabled',
captcha_size => 'int:/captcha_size',
captcha_data => 'text:/captcha_data',
captcha_output => 'text:/captcha_output',
},
},
......@@ -1364,9 +1378,14 @@ sub testStruct {
},
msgFail => 'Bad module name',
},
cda => $boolean,
checkXSS => $boolean,
cookieName => {
captcha_login_enabled => $boolean,
captcha_mail_enabled => $boolean,
captcha_size => $integer,
captcha_data => $testNotDefined,
captcha_output => $testNotDefined,
cda => $boolean,
checkXSS => $boolean,
cookieName => {
test => qr/^[a-zA-Z]\w*$/,
msgFail => 'Bad cookie name',
},
......@@ -1895,25 +1914,30 @@ sub defaultConf {
applicationList => {
'default' => { catname => 'Default category', type => "category" }
},
authentication => 'LDAP',
authChoiceParam => 'lmAuth',
CAS_pgtFile => '/tmp/pgt.txt',
casAccessControlPolicy => 'none',
cda => '0',
checkXSS => '1',
cookieName => 'lemonldap',
domain => 'example.com',
failedLoginNumber => '5',
globalStorage => 'Apache::Session::File',
hideOldPassword => '0',
httpOnly => '1',
https => '0',
issuerDBSAMLActivation => '0',
issuerDBSAMLPath => '^/saml/',
issuerDBSAMLRule => '1',
issuerDBCASActivation => '0',
issuerDBCASPath => '^/cas/',
issuerDBCASRule => '1',
authentication => 'LDAP',
authChoiceParam => 'lmAuth',
captcha_login_enabled => '0',
captcha_mail_enabled => '0',
captcha_size => '6',
captcha_data => '/var/lib/lemonldap-ng/captcha/data',
captcha_output => '/var/lib/lemonldap-ng/portal/captcha_output',
CAS_pgtFile => '/tmp/pgt.txt',
casAccessControlPolicy => 'none',
cda => '0',
checkXSS => '1',
cookieName => 'lemonldap',
domain => 'example.com',
failedLoginNumber => '5',
globalStorage => 'Apache::Session::File',
hideOldPassword => '0',
httpOnly => '1',
https => '0',
issuerDBSAMLActivation => '0',
issuerDBSAMLPath => '^/saml/',
issuerDBSAMLRule => '1',
issuerDBCASActivation => '0',
issuerDBCASPath => '^/cas/',
issuerDBCASRule => '1',
issuerDBOpenIDActivation => '0',
issuerDBOpenIDPath => '^/openidserver/',
issuerDBOpenIDRule => '1',
......
......@@ -9,7 +9,7 @@ package Lemonldap::NG::Manager::_i18n;
use strict;
use AutoLoader qw(AUTOLOAD);
our $VERSION = '1.2.3';
our $VERSION = '1.3.0';
## @method string translate(string text,string lang)
# Returns $text translated in $lang.
......@@ -99,6 +99,11 @@ sub en {
deleteNotification => 'Mark notification as done',
deleteSession => 'Delete session',
done => 'done',
captcha_data => 'Directory for data',
captcha_login_enabled => 'Activation in login form',
captcha_mail_enabled => 'Activation in password reset by mail form',
captcha_output => 'Directory for images',
captcha_size => 'Size',
CAS_authnLevel => 'Authentication level',
CAS_CAFile => 'CA file',
CAS_gateway => 'Gateway authentication',
......@@ -260,6 +265,7 @@ sub en {
portal => 'URL',
portalAntiFrame => 'Anti frame protection',
portalAutocomplete => 'Auto complete',
portalCaptcha => 'Captcha',
portalCheckLogins => 'Check last logins',
portalCustomization => 'Customization',
portalDisplayAppslist => 'Applications list',
......@@ -498,57 +504,64 @@ sub en {
sub fr {
use utf8;
return {
_auth => 'Authentification',
_authChoice => 'Choix d\'authentification',
_userDB => 'Utilisateur',
_passwordDB => 'Mot de passe',
_issuerDB => 'Fournisseur',
_timezone => 'Zone horaire',
_session_id => 'Identifiant de session',
_url => "URL d'origine",
_user => 'Identifiant',
_password => 'Mot de passe',
_utime => 'Tampon de la session',
_lastAuthnUTime => 'Tampon d\'authentification ',
_idp => 'Identifiant d\'entité de l\'IDP',
_idpConfKey => 'Clé de configuration de l\'IDP',
_samlToken => ' Jeton SAML ',
_lassoSessionDump => ' Dump session Lasso ',
_lassoIdentityDump => 'Dump identité Lasso',
advancedParams => 'Paramètres avancés',
apacheParams => 'Paramètres Apache',
apacheAuthnLevel => 'Niveau d\'authentification',
applicationList => 'Catégories et applications',
attributesAndMacros => 'Attributs et macros',
authChoiceModules => 'Modules autorisés',
authChoiceParam => 'Parmètre de l\'URL',
authentication => "Module d'authentification",
authenticationLevel => 'Niveau d\'authentification',
authenticationTitle => 'Authentification',
AuthLDAPFilter => 'Filtre d\'authentification',
authParams => "Modules d'authentification",
dbiAuthChain => 'Chaîne',
dbiAuthLoginCol => 'Champ identifiant',
dbiAuthnLevel => 'Niveau d\'authentification',
dbiAuthPassword => 'Mot de passe',
dbiAuthPasswordCol => 'Champ mot de passe',
dbiAuthPasswordHash => 'Schéma de hachage',
dbiAuthTable => 'Table authentification',
dbiAuthUser => 'Utilisateur',
dbiConnection => 'Connexion',
dbiConnectionAuth => 'Authentification',
dbiConnectionUser => 'Utilisateurs',
dbiParams => 'Paramètres DBI',
dbiPassword => 'Mot de passe',
dbiPasswordMailCol => 'Champ mail',
dbiSchema => 'Schéma',
dbiUserChain => 'Chaîne',
dbiUserPassword => 'Mot de passe',
dbiUserTable => 'Table des utilisateurs',
dbiUserUser => 'Utilisateur',
deleteNotification => 'Marquer la notification comme validée',
deleteSession => 'Effacer la session',
done => 'validée',
_auth => 'Authentification',
_authChoice => 'Choix d\'authentification',
_userDB => 'Utilisateur',
_passwordDB => 'Mot de passe',
_issuerDB => 'Fournisseur',
_timezone => 'Zone horaire',
_session_id => 'Identifiant de session',
_url => "URL d'origine",
_user => 'Identifiant',
_password => 'Mot de passe',
_utime => 'Tampon de la session',
_lastAuthnUTime => 'Tampon d\'authentification ',
_idp => 'Identifiant d\'entité de l\'IDP',
_idpConfKey => 'Clé de configuration de l\'IDP',
_samlToken => ' Jeton SAML ',
_lassoSessionDump => ' Dump session Lasso ',
_lassoIdentityDump => 'Dump identité Lasso',
advancedParams => 'Paramètres avancés',
apacheParams => 'Paramètres Apache',
apacheAuthnLevel => 'Niveau d\'authentification',
applicationList => 'Catégories et applications',
attributesAndMacros => 'Attributs et macros',
authChoiceModules => 'Modules autorisés',
authChoiceParam => 'Parmètre de l\'URL',
authentication => "Module d'authentification",
authenticationLevel => 'Niveau d\'authentification',
authenticationTitle => 'Authentification',
AuthLDAPFilter => 'Filtre d\'authentification',
authParams => "Modules d'authentification",
dbiAuthChain => 'Chaîne',
dbiAuthLoginCol => 'Champ identifiant',
dbiAuthnLevel => 'Niveau d\'authentification',
dbiAuthPassword => 'Mot de passe',
dbiAuthPasswordCol => 'Champ mot de passe',
dbiAuthPasswordHash => 'Schéma de hachage',
dbiAuthTable => 'Table authentification',
dbiAuthUser => 'Utilisateur',
dbiConnection => 'Connexion',
dbiConnectionAuth => 'Authentification',
dbiConnectionUser => 'Utilisateurs',
dbiParams => 'Paramètres DBI',
dbiPassword => 'Mot de passe',
dbiPasswordMailCol => 'Champ mail',
dbiSchema => 'Schéma',
dbiUserChain => 'Chaîne',
dbiUserPassword => 'Mot de passe',
dbiUserTable => 'Table des utilisateurs',
dbiUserUser => 'Utilisateur',
deleteNotification => 'Marquer la notification comme validée',
deleteSession => 'Effacer la session',
done => 'validée',
captcha_data => 'Répertoire des données',
captcha_login_enabled =>
"Activation dans le formulaire d'authentification",
captcha_mail_enabled =>
'Activation dans le formulaire de réinitialisation par mail',
captcha_output => 'Répertoire des images',
captcha_size => 'Taille',
CAS_authnLevel => 'Niveau d\'authentification',
CAS_CAFile => 'Fichier d\'AC',
CAS_gateway => 'Authentification transparente',
......@@ -715,6 +728,7 @@ sub fr {
portal => 'URL',
portalAntiFrame => 'Protection anti frame',
portalAutocomplete => 'Auto complétion',
portalCaptcha => 'Captcha',
portalCheckLogins => 'Vérifier l\'historique',
portalCustomization => 'Personnalisation',
portalDisplayAppslist => 'Liste des applications',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment