Merge branch 'feature/served_by_apache' into packaging

This commit is contained in:
Benjamin Bohard 2019-09-02 14:01:58 +02:00
commit 41d64b1263
7 changed files with 608 additions and 456 deletions

View File

@ -2,16 +2,18 @@
<creole>
<files>
<!-- Je suis un commentaire -->
<file filelist='lemon' name='/etc/lemonldap-ng/manager-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemon' name='/etc/lemonldap-ng/handler-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemon' name='/etc/lemonldap-ng/portal-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemon' name='/etc/lemonldap-ng/test-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemonng' name='/etc/lemonldap-ng/manager-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemonng' name='/etc/lemonldap-ng/handler-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemonng' name='/etc/lemonldap-ng/portal-nginx.conf' mkdir='True' rm='True'/>
<file filelist='lemona2' name='/etc/lemonldap-ng/manager-apache2.X.conf' mkdir='True' rm='True'/>
<file filelist='lemona2' name='/etc/lemonldap-ng/handler-apache2.X.conf' mkdir='True' rm='True'/>
<file filelist='lemona2' name='/etc/lemonldap-ng/portal-apache2.X.conf' mkdir='True' rm='True'/>
<file filelist='lemon' name='/etc/lemonldap-ng/lemonldap-ng.ini' mkdir='True' rm='True'/>
<file filelist='lemon' name='/var/lib/lemonldap-ng/conf/lmConf-1.json' mkdir='True' rm='True'/>
<file filelist='lemonCAS' name='/usr/share/php/configCAS/cas.inc.php' source='cas.inc.php.tmpl' mkdir='True'/>
<file filelist='lemonCAS' name='/usr/share/php/CAS/eoleCASConfig.php' source='eoleCASConfig.php.tmpl' mkdir='True'/>
<file filelist='lemonCAS' name='/etc/pam_cas.conf' source="pam_cas_auth.conf"/>
<service>lemonldap-ng-fastcgi-server</service>
<service servicelist='llonnginx'>lemonldap-ng-fastcgi-server</service>
<service_access service='nginx'>
<port service_accesslist="saLemon">80</port>
<port service_accesslist="saLemon">443</port>
@ -76,6 +78,14 @@
</separators>
</variables>
<constraints>
<condition name='disabled_if_in' source='activer_nginx_web'>
<param>non</param>
<target type='filelist'>lemonng</target>
</condition>
<condition name='disabled_if_in' source='activer_apache'>
<param>non</param>
<target type='filelist'>lemona2</target>
</condition>
<fill name='concat' target='managerWebName'>
<param>manager.</param>
<param type='eole'>nom_domaine_local</param>
@ -103,7 +113,8 @@
</group>
<condition name='disabled_if_in' source='activerLemon'>
<param>non</param>
<target type='filelist'>lemon</target>
<target type='filelist'>lemonng</target>
<target type='filelist'>lemona2</target>
<target type='filelist'>lemonCAS</target>
<target type='family'>LemonLDAP</target>
<target type='service_accesslist'>saLemon</target>

206
dicos/71_eolesso_compat.xml Normal file
View File

@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
</files>
<variables>
<family name='services'>
<variable name='activer_sso' redefine='True' hidden='True'>
</variable>
</family>
<family name='eole sso' icon='group'>
<!-- Configuration -->
<variable name='eolesso_adresse' type='domain_strict' description= "Nom de domaine du serveur d'authentification SSO" hidden='True'/>
<variable name='eolesso_port' type='port' description='Port utilisé par le service EoleSSO' mandatory='True' hidden='True' />
<variable name='eolesso_session_timeout' type='number' description="Durée de vie d'une session sur le serveur SSO (en secondes)" hidden='True' />
<variable name='eolesso_css' type='string' description="CSS par défaut du service SSO (sans le .css)" hidden='True'/>
<!-- LDAP -->
<variable name='eolesso_ldap' type='domain' description='Adresse du serveur LDAP utilisé par EoleSSO' multi='True' hidden='True'/>
<variable name='eolesso_port_ldap' type='port' description='Port du serveur LDAP utilisé par EoleSSO' hidden='True' />
<variable name='eolesso_ldap_use_tls' type='string' description="Le serveur LDAP supporte TLS" mode='expert' hidden='True' />
<variable name='eolesso_base_ldap' type='string' description="Chemin de recherche dans l'annuaire" mandatory='True'/>
<variable name='eolesso_ldap_label' type='string' description="Libellé à présenter aux utilisateurs en cas d'homonymes" mandatory='True'/>
<variable name='eolesso_ldap_infos' type='string' description="Informations supplémentaire dans le cadre d'information sur les homonymes" hidden='True' />
<variable name='eolesso_ldap_reader' type='string' description='Utilisateur de lecture des comptes LDAP (nécessaire pour la fédération)' hidden='True' />
<variable name='eolesso_ldap_reader_passfile' type='filename' description="Fichier de mot de passe de l'utilisateur de lecture" hidden='True' />
<variable name='eolesso_ldap_match_attribute' type='string' description="Attribut de recherche des utilisateurs" hidden='True' />
<variable name='eolesso_ldap_login_otp' type='string' description="Identifiants OTP pour cet annuaire" hidden='True' />
<variable name='eolesso_ldap_filter_user' type='string' description="Filtre d'utilisateurs" hidden='True' />
<variable name='eolesso_ldap_filter_group' type='string' description="Filtre de groupes" hidden='True' />
<variable name='eolesso_ldap_dntree_user' type='string' description="DN racine de l'arbre utilisateurs" hidden='True' />
<variable name='eolesso_ldap_dntree_group' type='string' description="DN racine de l'arbre groupes" hidden='True' />
<variable name='eolesso_ldap_fill_displayname' type='string' description="Champ 'nom d'affichage' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_mail' type='string' description="Champ 'mail' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_fonction' type='string' description="Champ 'fonction' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_categorie' type='string' description="Champ 'categorie' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_rne' type='string' description="Champ 'rne' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_fredurne' type='string' description="Champ 'fredurne' de l'utilisateur" hidden='True' />
<variable name='eolesso_ldap_fill_displaygroup' type='string' description="Champ 'nom d'affichage' du groupe" hidden='True' />
<variable name='eolesso_ldap_apps_params' type='oui/non' description="Information LDAP supplémentaires (applications)" hidden='True' />
<!-- SSO parent -->
<variable name='eolesso_adresse_parent' type='string' description='Adresse du serveur SSO parent' hidden='True' />
<variable name='eolesso_port_parent' type='number' description='Port du serveur SSO parent' hidden='True' />
<!-- federation -->
<variable name='eolesso_entity_name' type='string' description="Nom d'entité SAML du serveur eole-sso (ou rien)" hidden='True' />
<variable name='federation_transparente' type='oui/non' description="Cacher le formulaire lors de l'envoi des informations de fédération" hidden='True' />
<!-- OTP -->
<variable name='eolesso_pam_securid' type='oui/non' description="Gestion de l'authentification OTP (RSA SecurID)" hidden='True' />
<variable name='eolesso_otppass_minsize' type='number' description="Taille minimum du passcode OTP" hidden='True' />
<variable name='eolesso_otppass_maxsize' type='number' description="Taille maximum du passcode OTP" hidden='True' />
<variable name='eolesso_otppass_regx' type='string' description="Expression régulière de détection des passcodes OTP" hidden='True' />
<variable name='eolesso_otp_desync' type='oui/non' description="Gestion locale des clés OTP désynchronisées" hidden='True' />
<variable name='eolesso_otp_portal' type='string' description="Adresse de la mire OTP en cas désynchronisation de clé" hidden='True' />
<!-- Certificats -->
<variable name='eolesso_cert' type='string' description='Chemin du certificat SSL' hidden='True' />
<variable name='eolesso_key' type='string' description='Chemin de la clé privée liée au certificat SSL' hidden='True' />
<variable name='eolesso_ca_location' type='string' description="Chemin de l'autorité de certification (ou rien)" hidden='True' />
<!-- Autres -->
<variable name='eolesso_cas_folder' type='filename' description="Alias d'accès au service SSO (paramètre : __CAS_FOLDER)" mode='expert' hidden='True'/>
<variable name='eolesso_cookie_name' type='string' description="Nom du cookie EoleSSO" mode="expert" hidden='True' />
<variable name='eolesso_cookie_domain' type='string' description= "Domaine du cookie EoleSSO" mode="expert" hidden='True' />
<variable name='eolesso_responsive' type='oui/non' description="Activer la balise meta viewport (CSS responsive)" mode="expert" hidden='True' />
<variable name='eolesso_metrics' type='oui/non' description="Générer des statistiques d'usage du service" mode="expert" hidden='True' />
<variable name='cas_verify_service' type='oui/non' description="Ne pas répondre aux demandes CAS des applications inconnues" mode="expert" hidden='True' />
<variable name='sso_saml_time_adjust' type='number' description="Décalage de temps (en secondes) dans les messages de fédération SAML" mode="expert" hidden='True' />
</family>
<separators>
</separators>
</variables>
<constraints>
<auto name='calc_val' target='eolesso_ldap_label'>
<param></param>
</auto>
<auto name='calc_val' target='eolesso_base_ldap'>
<param type='eole'>ldapUserBaseDN</param>
</auto>
<auto name='calc_val' target='eolesso_port'>
<param type='eole'>ldapServerPort</param>
</auto>
<!--
<fill name='calc_val_first_value' target='eolesso_adresse'>
<param type='eole' optional='True' hidden='False'>web_url</param>
<param type='eole'>nom_domaine_machine</param>
</fill>
<fill name='calc_val_first_value' target='eolesso_base_ldap'>
<param type='eole' optional='True' hidden='False'>ldap_base_dn</param>
<param>o=gouv,c=fr</param>
</fill>
<fill name='concat' target='eolesso_ldap_reader'>
<param>cn=reader,</param>
<param type='eole'>eolesso_base_ldap</param>
</fill>
<fill name='calc_val' target='eolesso_cert'>
<param type='eole' name='valeur'>server_cert</param>
</fill>
<fill name='calc_val' target='eolesso_key'>
<param type='eole' name='valeur'>server_key</param>
</fill>
<condition name='disabled_if_in' source='activer_sso'>
<param>non</param>
<target type='family'>eole sso</target>
<target type='filelist'>ssoclient</target>
</condition>
<condition name='disabled_if_not_in' source='activer_sso'>
<param>local</param>
<target type='servicelist'>sso</target>
<target type='filelist'>sso</target>
<target type='variable'>eolesso_ldap</target>
<target type='variable'>eolesso_port_ldap</target>
<target type='variable'>eolesso_ldap_use_tls</target>
<target type='variable'>eolesso_base_ldap</target>
<target type='variable'>eolesso_ldap_label</target>
<target type='variable'>eolesso_ldap_infos</target>
<target type='variable'>eolesso_ldap_reader</target>
<target type='variable'>eolesso_ldap_reader_passfile</target>
<target type='variable'>eolesso_ldap_match_attribute</target>
<target type='variable'>eolesso_adresse_parent</target>
<target type='variable'>eolesso_port_parent</target>
<target type='variable'>eolesso_cert</target>
<target type='variable'>eolesso_key</target>
<target type='variable'>eolesso_ca_location</target>
<target type='variable'>eolesso_css</target>
<target type='variable'>eolesso_responsive</target>
<target type='variable'>federation_transparente</target>
<target type='variable'>eolesso_entity_name</target>
<target type='variable'>eolesso_pam_securid</target>
<target type='variable'>eolesso_ldap_apps_params</target>
</condition>
<condition name='disabled_if_in' source='eolesso_pam_securid'>
<param>non</param>
<target>eolesso_otp_desync</target>
<target>eolesso_ldap_login_otp</target>
<target>eolesso_otppass_minsize</target>
<target>eolesso_otppass_maxsize</target>
<target>eolesso_otppass_regx</target>
</condition>
<condition name='disabled_if_in' source='eolesso_otp_desync'>
<param>oui</param>
<target>eolesso_otp_portal</target>
</condition>
<condition name='disabled_if_in' source='eolesso_ldap_apps_params'>
<param>non</param>
<target>eolesso_ldap_filter_user</target>
<target>eolesso_ldap_filter_group</target>
<target>eolesso_ldap_dntree_user</target>
<target>eolesso_ldap_dntree_group</target>
<target>eolesso_ldap_fill_displayname</target>
<target>eolesso_ldap_fill_mail</target>
<target>eolesso_ldap_fill_fonction</target>
<target>eolesso_ldap_fill_categorie</target>
<target>eolesso_ldap_fill_rne</target>
<target>eolesso_ldap_fill_fredurne</target>
<target>eolesso_ldap_fill_displaygroup</target>
</condition>
<check name='valid_enum' target='activer_sso'>
<param>['non', 'local', 'distant']</param>
</check>
<check name='valid_enum' target='eolesso_ldap_login_otp'>
<param>['inactifs','identiques','configurables']</param>
</check>
<fill name='calc_libelle_annuaire' target='eolesso_ldap_label'>
<param type='eole'>eolesso_ldap</param>
<param type='eole'>nom_machine</param>
<param type='eole'>nom_domaine_local</param>
</fill>
<group master='eolesso_ldap'>
<slave>eolesso_port_ldap</slave>
<slave>eolesso_ldap_use_tls</slave>
<slave>eolesso_base_ldap</slave>
<slave>eolesso_ldap_label</slave>
<slave>eolesso_ldap_infos</slave>
<slave>eolesso_ldap_reader</slave>
<slave>eolesso_ldap_reader_passfile</slave>
<slave>eolesso_ldap_match_attribute</slave>
<slave>eolesso_ldap_login_otp</slave>
<slave>eolesso_ldap_filter_user</slave>
<slave>eolesso_ldap_filter_group</slave>
<slave>eolesso_ldap_dntree_user</slave>
<slave>eolesso_ldap_dntree_group</slave>
<slave>eolesso_ldap_fill_displayname</slave>
<slave>eolesso_ldap_fill_mail</slave>
<slave>eolesso_ldap_fill_fonction</slave>
<slave>eolesso_ldap_fill_categorie</slave>
<slave>eolesso_ldap_fill_rne</slave>
<slave>eolesso_ldap_fill_fredurne</slave>
<slave>eolesso_ldap_fill_displaygroup</slave>
</group> -->
</constraints>
<help></help>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->

View File

@ -1,17 +1,29 @@
#!/bin/bash
ENABLE=$(CreoleGet activerLemon 'non')
CONF_FILES="manager-nginx.conf"
CONF_FILES="${CONF_FILES} handler-nginx.conf"
CONF_FILES="${CONF_FILES} portal-nginx.conf"
CONF_FILES="${CONF_FILES} test-nginx.conf"
if [ "$(CreoleGet activer_nginx_web non)" = 'oui' ];then
SERVER=nginx
else
SERVER=apache2
fi
for CONF_FILE in ${CONF_FILES}
SERVICES="manager"
SERVICES="${SERVICES} handler"
SERVICES="${SERVICES} portal"
for SERVICE in ${SERVICES}
do
if [ -L /etc/nginx/sites-enabled/${CONF_FILE} ];then
rm /etc/nginx/sites-enabled/${CONF_FILE}
if [ -L /etc/nginx/sites-enabled/${SERVICE}-nginx.conf ];then
rm /etc/nginx/sites-enabled/${SERVICE}-nginx.conf
fi
if [ -L /etc/apache2/sites-enabled/${SERVICE}-apache2.conf ];then
a2dissite ${SERVICE}-apache2
fi
if [ "${ENABLE}" = 'oui' ];then
ln -s /etc/nginx/sites-available/${CONF_FILE} /etc/nginx/sites-enabled/${CONF_FILE}
if [ "${SERVER}" = 'nginx' ];then
ln -s /etc/nginx/sites-available/${SERVICE}-nginx.conf /etc/nginx/sites-enabled/${SERVICE}-nginx.conf
elif [ "${SERVER}" = 'apache2' ];then
a2ensite ${SERVICE}-apache2.conf
fi
fi
done
done

View File

@ -0,0 +1,73 @@
#========================================================================
# Apache configuration for LemonLDAP::NG Handler
#========================================================================
# This file implements the reload virtualhost that permits to reload
# configuration without restarting server, and some common instructions.
# You need then to declare this vhost in reloadUrls (in the manager
# interface if this server doesn't host the manager itself):
#
# KEY : VALUE
# host-or-IP:port : http://reload.example.com/reload
#
# IMPORTANT:
# To protect applications, see test-apache.conf template in example files
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost "*:80"
# Load LemonLDAP::NG Handler
PerlOptions +GlobalRequest
PerlModule Lemonldap::NG::Handler
# Common error page and security parameters
ErrorDocument 403 http://%%authWebName/?lmError=403
ErrorDocument 404 http://%%authWebName/?lmError=404
ErrorDocument 500 http://%%authWebName/?lmError=500
ErrorDocument 502 http://%%authWebName/?lmError=502
ErrorDocument 503 http://%%authWebName/?lmError=503
<VirtualHost "*:443">
ServerName %%reloadWebName
# Configuration reload mechanism (only 1 per physical server is
# needed): choose your URL to avoid restarting Apache when
# configuration change
<Location /reload>
<IfVersion >= 2.3>
Require ip 127 ::1
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Deny from all
Allow from 127.0.0.0/8 ::1
</IfVersion>
SetHandler perl-script
PerlResponseHandler Lemonldap::NG::Handler->reload
</Location>
SSLEngine on
SSLCertificateFile %%apache_cert
SSLCertificateKeyFile %%server_key
SSLProtocol all -SSLv3 -SSLv2
# Uncomment this to activate status module
#<Location /status>
# <IfVersion >= 2.3>
# Require ip 127 ::1
# </IfVersion>
# <IfVersion < 2.3>
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.0/8 ::1
# </IfVersion>
# SetHandler perl-script
# PerlResponseHandler Lemonldap::NG::Handler->status
# # You may have to uncomment the next directive to skip
# # an upper PerlHeaderParserHandler directive
# #PerlHeaderParserHandler Apache2::Const::DECLINED
#</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
</VirtualHost>

View File

@ -1,441 +0,0 @@
%set %%ssoFilters = %%getSSOFilters
{
"ldapGroupAttributeNameUser": "dn",
"cfgAuthorIP": "172.16.0.1",
"samlSPMetaDataXML": null,
"facebookAuthnLevel": 1,
"mailConfirmSubject": "[LemonLDAP::NG] Password reset confirmation",
"secureTokenAttribute": "uid",
"singleSession": 0,
"registerConfirmSubject": "[LemonLDAP::NG] Account register confirmation",
"CAS_pgtFile": "/tmp/pgt.txt",
"cookieName": "lemonldap",
"slaveExportedVars": {},
"whatToTrace": "_whatToTrace",
"oidcRPMetaDataOptions": {},
"notifyDeleted": 1,
"useRedirectOnError": 1,
"samlSPMetaDataExportedAttributes": null,
"ldapPwdEnc": "utf-8",
"openIdSPList": "0;",
"samlNameIDFormatMapEmail": "mail",
"samlSPMetaDataOptions": null,
"issuerDBOpenIDRule": 1,
"casStorageOptions": {},
"mailFrom": "noreply@%%nom_domaine_local",
"timeoutActivity": 0,
"oidcRPMetaDataExportedVars": {},
"issuerDBSAMLActivation": 0,
"issuerDBCASPath": "^/%%casFolder/",
"randomPasswordRegexp": "[A-Z]{3}[a-z]{5}.\\d{2}",
"samlIDPSSODescriptorSingleSignOnServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/singleSignOnSOAP;",
"samlSPSSODescriptorSingleLogoutServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn",
"exportedHeaders": {
"test1.%%nom_domaine_local": {
"Auth-User": "$uid"
},
"test2.%%nom_domaine_local": {
"Auth-User": "$uid"
},
"%%managerWebName": {}
},
"vhostOptions": {
"%%managerWebName": {
"vhostHttps" : "1"
},
"test1.%%nom_domaine_local": {},
"test2.%%nom_domaine_local": {}
},
"radiusAuthnLevel": 3,
"dbiAuthnLevel": 2,
"ldapPasswordResetAttribute": "pwdReset",
"ldapGroupObjectClass": "groupOfNames",
"apacheAuthnLevel": 4,
"samlNameIDFormatMapKerberos": "uid",
"groups": {},
"securedCookie": 0,
"httpOnly": 1,
"yubikeyAuthnLevel": 3,
"ADPwdMaxAge": 0,
"samlUseQueryStringSpecific": 0,
"loginHistoryEnabled": 1,
"samlSPSSODescriptorSingleLogoutServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/proxySingleLogoutSOAP;",
"failedLoginNumber": 5,
"samlServicePrivateKeyEncPwd": "",
"portalForceAuthnInterval": 0,
"cfgLog": "",
"samlIDPSSODescriptorSingleLogoutServiceHTTPRedirect": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;#PORTAL#/saml/singleLogout;#PORTAL#/saml/singleLogoutReturn",
"exportedVars": {
"UA": "HTTP_USER_AGENT",
%for att in %%casAttribute
"%%att": "%%att",
%end for
%set %%idx = 0
%set %%size = %%len(%%ssoFilters) - 1
%for key,value in %%ssoFilters
%if %%idx == %%size
"%%key": "%%value"
%else
"%%key": "%%value",
%end if
%set %%idx += 1
%end for
},
"notificationStorage": "File",
"applicationList": {
"1sample": {
"test2": {
"options": {
"name": "Application Test 2",
"logo": "thumbnail.png",
"uri": "https://test2.%%nom_domaine_local/",
"display": "auto",
"description": "The same simple application displaying authenticated user"
},
"type": "application"
},
"type": "category",
"catname": "Sample applications",
"test1": {
"type": "application",
"options": {
"description": "A simple application displaying authenticated user",
"uri": "https://test1.%%nom_domaine_local/",
"logo": "demo.png",
"display": "auto",
"name": "Application Test 1"
}
}
},
"2administration": {
"notifications": {
"options": {
"name": "Notifications explorer",
"display": "auto",
"description": "Explore WebSSO notifications",
"uri": "https://%%managerWebName/notifications.pl",
"logo": "database.png"
},
"type": "application"
},
"manager": {
"options": {
"uri": "https://%%managerWebName/",
"display": "auto",
"description": "Configure LemonLDAP::NG WebSSO",
"logo": "configure.png",
"name": "WebSSO Manager"
},
"type": "application"
},
"type": "category",
"sessions": {
"type": "application",
"options": {
"description": "Explore WebSSO sessions",
"uri": "https://%%managerWebName/sessions.pl",
"logo": "database.png",
"display": "auto",
"name": "Sessions explorer"
}
},
"catname": "Administration"
},
"3documentation": {
"catname": "Documentation",
"officialwebsite": {
"type": "application",
"options": {
"name": "Offical Website",
"description": "Official LemonLDAP::NG Website",
"logo": "network.png",
"display": "on",
"uri": "http://lemonldap-ng.org/"
}
},
"type": "category",
"localdoc": {
"options": {
"logo": "help.png",
"description": "Documentation supplied with LemonLDAP::NG",
"display": "on",
"uri": "https://%%managerWebName/doc/",
"name": "Local documentation"
},
"type": "application"
}
}
},
"userControl": "^[\\w\\.\\-@]+$",
"timeout": 72000,
"portalAntiFrame": 1,
"SMTPServer": "",
"ldapTimeout": 120,
"samlAuthnContextMapPasswordProtectedTransport": 3,
"ldapUsePasswordResetAttribute": 1,
"ldapPpolicyControl": 0,
"casAttributes": {
%for att in %%casAttribute
"%%att": "%%att.casLDAPAttribute",
%end for
%set %%idx = 0
%set %%size = %%len(%%ssoFilters) - 1
%for key,value in %%ssoFilters
%if %%idx == %%size
"%%key": "%%key"
%else
"%%key": "%%key",
%end if
%set %%idx += 1
%end for
},
"issuerDBSAMLPath": "^/saml/",
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
"portalDisplayAppslist": 1,
"confirmFormMethod": "post",
"domain": "%%nom_domaine_local",
"cfgNum": "1",
"authentication": "LDAP",
"samlNameIDFormatMapWindows": "uid",
"authChoiceModules": {},
"ldapGroupAttributeName": "member",
"samlServicePrivateKeySigPwd": "",
"googleAuthnLevel": 1,
"successLoginNumber": 5,
"localSessionStorageOptions": {
"cache_root": "/tmp",
"namespace": "lemonldap-ng-sessions",
"default_expires_in": 600,
"directory_umask": "007",
"cache_depth": 3
},
"samlSPSSODescriptorArtifactResolutionServiceArtifact": "1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/artifact",
"portalRequireOldPassword": 1,
"samlIDPSSODescriptorSingleSignOnServiceHTTPArtifact": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/singleSignOnArtifact;",
"ADPwdExpireWarning": 0,
"yubikeyPublicIDSize": 12,
"ldapGroupAttributeNameGroup": "dn",
"oidcRPMetaDataOptionsExtraClaims": null,
"ldapGroupRecursive": 0,
"mailSubject": "[LemonLDAP::NG] Your new password",
"nginxCustomHandlers": {},
"samlSPSSODescriptorAuthnRequestsSigned": 1,
%if %%llResetPassword == "oui"
"portalDisplayResetPassword": 1,
%else
"portalDisplayResetPassword": 0,
%end if
"openIdSreg_timezone": "_timezone",
"infoFormMethod": "get",
"openIdAuthnLevel": 1,
"openIdSreg_nickname": "uid",
"samlServicePublicKeyEnc": "",
"userDB": "LDAP",
"grantSessionRules": {},
"remoteGlobalStorage": "Lemonldap::NG::Common::Apache::Session::SOAP",
"reloadUrls": {
"%%reloadWebName": "https://%%reloadWebName/reload"
},
"registerTimeout": 0,
"samlIDPSSODescriptorSingleSignOnServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleSignOn;",
"slaveAuthnLevel": 2,
"samlIDPSSODescriptorSingleLogoutServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleLogout;#PORTAL#/saml/singleLogoutReturn",
"Soap": 1,
%set %%RegisterDB=%%getVar('llRegisterDB', 'Demo')
%if %%RegisterDB == "Custom"
"registerDB": "Null",
%else
"registerDB": "%%RegisterDB",
%end if
"locationRules": {
"%%managerWebName": {
"default": "$uid eq \"%%lemonAdmin\""
},
"test1.%%nom_domaine_local": {
"default": "accept",
"^/logout": "logout_sso"
},
"test2.%%nom_domaine_local": {
"default": "accept",
"^/logout": "logout_sso"
}
},
"portalDisplayChangePassword": "$_auth =~ /^(LDAP|DBI|Demo)$/",
"hideOldPassword": 0,
%if %%is_file(%%ldapBindUserPassword)
"managerPassword": "%%readPass("", %%ldapBindUserPassword)",
%else
"managerPassword": "%%ldapBindUserPassword",
%end if
"authChoiceParam": "lmAuth",
"lwpSslOpts": {},
"portalSkinRules": {},
"issuerDBOpenIDPath": "^/openidserver/",
"redirectFormMethod": "get",
"portalDisplayRegister": 1,
"secureTokenMemcachedServers": "127.0.0.1:11211",
"notificationStorageOptions": {
"dirName": "/var/lib/lemonldap-ng/notifications"
},
"browserIdAuthnLevel": 1,
"portalUserAttr": "_user",
"ldapVersion": 3,
"sessionDataToRemember": {},
"samlNameIDFormatMapX509": "mail",
"managerDn": "%%ldapBindUserDN",
"mailSessionKey": "mail",
"openIdSreg_email": "mail",
"localSessionStorage": "Cache::FileCache",
"persistentStorage": "Apache::Session::File",
"mailOnPasswordChange": 0,
"captchaStorage": "Apache::Session::File",
"remoteGlobalStorageOptions": {
"proxy": "https://%%authWebName/index.pl/sessions",
"ns": "https://%%authWebName/Lemonldap/NG/Common/CGI/SOAPService"
},
"passwordDB": "LDAP",
"captcha_size": 6,
"mailCharset": "utf-8",
"facebookExportedVars": {},
"nullAuthnLevel": 2,
"singleIP": 0,
"dbiExportedVars": {},
"portalSkin": "bootstrap",
"storePassword": 0,
"hiddenAttributes": "_password",
"samlServicePrivateKeySig": "",
"globalStorage": "Apache::Session::File",
"notificationWildcard": "allusers",
"portalForceAuthn": 0,
"samlMetadataForceUTF8": 1,
"secureTokenUrls": ".*",
"secureTokenAllowOnError": 1,
"samlAuthnContextMapTLSClient": 5,
"ldapAllowResetExpiredPassword": 0,
"oidcOPMetaDataExportedVars": {},
"notifyOther": 0,
"secureTokenExpiration": 60,
"captcha_mail_enabled": 0,
"samlStorageOptions": {},
"samlOrganizationDisplayName": "Example",
"trustedProxies": "",
"secureTokenHeader": "Auth-Token",
"issuerDBCASActivation": 1,
"samlIDPSSODescriptorSingleSignOnServiceHTTPRedirect": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;#PORTAL#/saml/singleSignOn;",
"samlSPSSODescriptorSingleLogoutServiceHTTPRedirect": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn",
"samlIDPMetaDataXML": {},
"oidcStorageOptions": {},
"cfgDate": 1519998069,
"samlAuthnContextMapPassword": 2,
"portalDisplayLoginHistory": 1,
"ldapPasswordResetAttributeValue": "TRUE",
"ldapServer": "%%ldapScheme://%%ldapServer",
"samlIDPSSODescriptorSingleLogoutServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/singleLogoutSOAP;",
"samlIDPMetaDataExportedAttributes": null,
"samlServicePrivateKeyEnc": "",
"useRedirectOnForbidden": 0,
"captcha_login_enabled": 0,
"https": 0,
"checkXSS": 1,
"ldapSetPassword": 0,
"portalPingInterval": 60000,
"captchaStorageOptions": {
"Directory": "/var/lib/lemonldap-ng/captcha/"
},
"useSafeJail": 1,
"registerDoneSubject": "[LemonLDAP::NG] Your new account",
"issuerDBCASRule": 1,
"samlAuthnContextMapKerberos": 4,
"ldapGroupAttributeNameSearch": "cn",
"logoutServices": {},
"samlIDPSSODescriptorWantAuthnRequestsSigned": 1,
"portalDisplayLogout": 1,
"issuerDBGetParameters": {},
"googleExportedVars": {},
"openIdSreg_fullname": "cn",
"samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact": "1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/proxySingleSignOnArtifact",
"demoExportedVars": {
"mail": "mail",
"uid": "uid",
"cn": "cn"
},
"oidcOPMetaDataJSON": null,
"samlIdPResolveCookie": "lemonldapidp",
"samlRelayStateTimeout": 600,
"samlOrganizationURL": "https://auth.%%nom_domaine_local",
"globalStorageOptions": {
"Directory": "/var/lib/lemonldap-ng/sessions",
"LockDirectory": "/var/lib/lemonldap-ng/sessions/lock"
},
"ldapExportedVars": {
"mail": "mail",
"cn": "cn",
"uid": "uid"
},
"webIDExportedVars": {},
"activeTimer": 1,
"cda": 0,
"samlServicePublicKeySig": "",
%if %%llCheckLogins == "oui"
"portalCheckLogins": 1,
%else
"portalCheckLogins": 0,
%end if
"CAS_authnLevel": 1,
"macros": {
"_whatToTrace": "$_auth eq 'SAML' ? \"$_user\\@$_idpConfKey\" : \"$_user\""
},
"samlIDPMetaDataOptions": null,
"twitterAuthnLevel": 1,
"openIdExportedVars": {},
"captcha_register_enabled": 1,
"oidcOPMetaDataJWKS": null,
"webIDAuthnLevel": 1,
"issuerDBOpenIDActivation": "1",
%if %%is_empty(%%llResetUrl)
"mailUrl": "https://%%authWebName/mail.pl",
%else
"mailUrl": "%%llResetUrl",
%end if
"maintenance": 0,
"jsRedirect": 0,
"cfgAuthor": "Cadoles",
"persistentStorageOptions": {
"LockDirectory": "/var/lib/lemonldap-ng/psessions/lock",
"Directory": "/var/lib/lemonldap-ng/psessions"
},
"SSLAuthnLevel": 5,
"oidcServiceMetaDataAuthnContext": {},
"samlIDPSSODescriptorArtifactResolutionServiceArtifact": "1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/artifact",
"notification": 1,
"ldapChangePasswordAsUser": 0,
"CAS_proxiedServices": {},
"key": "e\"bTCt3*eU9^\\V%b",
"portal": "https://%%authWebName/",
"singleSessionUserByIP": 0,
"portalOpenLinkInNewWindow": 0,
"post": {
"test2.%%nom_domaine_local": {},
"test1.%%nom_domaine_local": {},
"%%managerWebName": {}
},
"samlSPSSODescriptorAssertionConsumerServiceHTTPPost": "0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleSignOnPost",
"issuerDBSAMLRule": 1,
"samlCommonDomainCookieActivation": 0,
"syslog": "",
"ldapBase": "%%ldapUserBaseDN",
"ldapAuthnLevel": 2,
"mailTimeout": 0,
"samlEntityID": "#PORTAL#/saml/metadata",
"oidcOPMetaDataOptions": null,
"samlSPSSODescriptorWantAssertionsSigned": 1,
"samlOrganizationName": "%%samlOrganizationName",
%if %%RegisterDB == "Custom"
"registerUrl": "%%llRegisterURL",
%else
"registerUrl": "https://%%authWebName/register.pl",
%end if
"casAccessControlPolicy": "none",
"multiValuesSeparator": ";",
"ldapPort": %%ldapServerPort
}

130
tmpl/manager-apache2.X.conf Normal file
View File

@ -0,0 +1,130 @@
#====================================================================
# Apache configuration for LemonLDAP::NG Manager
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost "*:80"
# Manager virtual host (manager.example.com)
<VirtualHost "*:443">
ServerName %%managerWebName
LogLevel notice
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log
#CustomLog ${APACHE_LOG_DIR}/lm.log combined
# FASTCGI CONFIGURATION
# ---------------------
# 1) URI management
RewriteEngine on
RewriteRule "^/$" "/psgi/manager-server.fcgi" [PT]
# For performances, you can delete the previous RewriteRule line after
# puttings html files: simply put the HTML results of differents modules
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
SSLEngine on
SSLCertificateFile %%apache_cert
SSLCertificateKeyFile %%server_key
SSLProtocol all -SSLv3 -SSLv2
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [PT]
Alias /psgi/ /usr/share/lemonldap-ng/manager/psgi//
# 2) FastCGI engine
# You can choose any FastCGI system. Here is an example using mod_fcgid
# mod_fcgid configuration
FcgidMaxRequestLen 2000000
<Directory /usr/share/lemonldap-ng/manager/psgi/>
SetHandler fcgid-script
Options +ExecCGI
</Directory>
# If you want to use mod_fastcgi, replace lines below by:
#FastCgiServer /usr/share/lemonldap-ng/manager/psgi/manager-server.fcgi
# Or if you prefer to use CGI, use /psgi/manager-server.cgi instead of
# /psgi/manager-server.fcgi and adapt the rewrite rules.
# GLOBAL CONFIGURATION
# --------------------
DocumentRoot /usr/share/lemonldap-ng/manager/
<Location />
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +FollowSymLinks
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</Location>
# Static files (javascripts, HTML forms,...)
Alias /static/ /usr/share/lemonldap-ng/manager/static//
<Directory /usr/share/lemonldap-ng/manager/static/>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +FollowSymLinks
</Directory>
# On-line documentation
Alias /doc/ /usr/share/doc/lemonldap-ng-doc/
Alias /lib/ /usr/share/doc/lemonldap-ng-doc/pages/documentation/current/lib/
<Directory /usr/share/doc/lemonldap-ng-doc/>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ /usr/share/doc/lemonldap-ng-fr-doc/
<Directory /usr/share/doc/lemonldap-ng-fr-doc/>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
</VirtualHost>

161
tmpl/portal-apache2.X.conf Normal file
View File

@ -0,0 +1,161 @@
#====================================================================
# Apache configuration for LemonLDAP::NG Portal
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost "*:80"
# Portal Virtual Host (auth.example.com)
<VirtualHost "*:443">
ServerName %%authWebName
# DocumentRoot
DocumentRoot /var/lib/lemonldap-ng/portal/
<Directory /var/lib/lemonldap-ng/portal/>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +ExecCGI +FollowSymLinks
</Directory>
SSLEngine on
SSLCertificateFile %%apache_cert
SSLCertificateKeyFile %%server_key
SSLProtocol all -SSLv3 -SSLv2
# Perl script
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
#CGIPassAuth on
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
# SOAP functions for sessions management (disabled by default)
<Location /index.pl/adminSessions>
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Deny from all
</IfVersion>
</Location>
# SOAP functions for sessions access (disabled by default)
<Location /index.pl/sessions>
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Deny from all
</IfVersion>
</Location>
# SOAP functions for configuration access (disabled by default)
<Location /index.pl/config>
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Deny from all
</IfVersion>
</Location>
# SOAP functions for notification insertion (disabled by default)
<Location /index.pl/notification>
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Deny from all
</IfVersion>
</Location>
# SAML2 Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/saml/metadata /metadata.pl
RewriteRule ^/saml/.* /index.pl
</IfModule>
# CAS Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/cas/.* /index.pl
</IfModule>
# OpenID Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/openidserver/.* /index.pl
</IfModule>
# OpenID Connect Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{HTTP:Authorization} .
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^/oauth2/.* /index.pl
RewriteRule ^/.well-known/openid-configuration$ /openid-configuration.pl
</IfModule>
# Get Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/get/.* /index.pl
</IfModule>
# Public pages
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/public* /public.pl
</IfModule>
<Location />
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</Location>
<Location /skins/>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
</VirtualHost>
##############################################
## Best performance under ModPerl::Registry ##
##############################################
# Uncomment this to increase performance of Portal:
<Perl>
#require Lemonldap::NG::Portal::SharedConf;
#Lemonldap::NG::Portal::SharedConf->compile(
# qw(delete header cache read_from_client cookie redirect unescapeHTML));
# Uncomment this line if you use Lemonldap::NG menu
#require Lemonldap::NG::Portal::Menu;
# Uncomment this line if you use portal SOAP capabilities
#require SOAP::Lite;
</Perl>