Compare commits
68 Commits
fix-nginx
...
pkg/dev/eo
Author | SHA1 | Date | |
---|---|---|---|
b56146d6a0 | |||
44d79bf8ea | |||
5024b197ff | |||
b6ebaa9bc9 | |||
742fcd9609 | |||
53d0c05751 | |||
934431b738 | |||
9dac24287e | |||
41d64b1263 | |||
223e7cc2c6 | |||
dffa82dad9 | |||
c718ff2bbf | |||
85f8f7b079 | |||
2d8082913c | |||
a53fe39db1 | |||
44ee4421c1 | |||
24a5264933 | |||
e0c7ca8f5e | |||
73fb96c026 | |||
abb1d10a87 | |||
30e142fa98 | |||
f5631ff980 | |||
c9eebbb0a5 | |||
6c3adaab2b | |||
c7c5f08b7a | |||
050e559f75 | |||
889010cfe7 | |||
eef533bfe6 | |||
f0d6325cf5 | |||
e84ba19b68 | |||
3b4d3ccb41 | |||
66be6dc37e | |||
b7aefb7a8b | |||
08ed6a21dc | |||
5f5c5359f7 | |||
51519eae55 | |||
2afe4dceb4 | |||
0f25183778 | |||
a4a3d52746 | |||
a5ce48110d | |||
faf2a361db | |||
61b982607e | |||
7ae579b670 | |||
a91abb36f3 | |||
baa4dca9de | |||
710ea85f96 | |||
849c3f0a88 | |||
d3897f1e4a | |||
6f1cb45eac | |||
4916317d30 | |||
19fc15c324 | |||
b7556a03b8 | |||
f1defd2626 | |||
7269e252de | |||
9e64f5ca8d | |||
84f41d0196 | |||
b90eb474f5 | |||
d69f20c896 | |||
658013c177 | |||
35edad1538 | |||
32d336e37b | |||
4b26fc5c38 | |||
904abd02a4 | |||
e2f656f9f8 | |||
e5ada4d3eb | |||
dab8085a83 | |||
ad490d3810 | |||
0fc774cd05 |
@ -26,3 +26,42 @@ def readPass(encoder,reader):
|
||||
|
||||
except:
|
||||
return "mot de passe inconnu"
|
||||
|
||||
def getSSOFilters():
|
||||
""" Convert former eole-sso filters to LemonLDAP filters
|
||||
"""
|
||||
import glob
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
try:
|
||||
filters = { 'uid': "uid", "mail": "mail" }
|
||||
filterDirectory = "/usr/share/sso/app_filters/"
|
||||
filterExtention = ".ini"
|
||||
filterSection = "utilisateur"
|
||||
filterFiles = glob.glob("{0}/*{1}".format(filterDirectory, filterExtention))
|
||||
toClean = [ "__name__" ]
|
||||
if len(filterFiles) != 0:
|
||||
for fi in filterFiles:
|
||||
# Don't parse "applications.ini"
|
||||
config = ConfigParser()
|
||||
config.read(fi)
|
||||
if filterSection in config._sections:
|
||||
filters.update(config._sections[filterSection].items())
|
||||
for key in toClean:
|
||||
if key in filters.keys():
|
||||
del(filters[key])
|
||||
res = {}
|
||||
index=0
|
||||
size=len(filters)
|
||||
return(filters.items())
|
||||
"""
|
||||
for k,v in filters.items():
|
||||
res[k] " \"{0}\": \"{1}\"".format(k,v)
|
||||
index += 1
|
||||
if index != size:
|
||||
res += ",\n"
|
||||
return(res)
|
||||
"""
|
||||
except:
|
||||
return "Error Generating Filters"
|
||||
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
9
|
38
debian/control
vendored
Normal file
38
debian/control
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
Source: eole-lemonldap
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <eole@ac-dijon.fr>
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: https://forge.cadoles.com/Cadoles/eole-lemonldap
|
||||
Vcs-Git: https://forge.cadoles.com/Cadoles/eole-lemonldap.git
|
||||
Vcs-Browser: https://forge.cadoles.com/Cadoles/eole-lemonldap
|
||||
|
||||
Package: eole-lemonldap
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, lemonldap-ng, lemonldap-ng-doc, lemonldap-ng-fastcgi-server,
|
||||
libxml-libxml-perl, libxml-libxslt-perl, libcgi-emulate-psgi-perl, libauthen-captcha-perl, liblasso-perl,
|
||||
libxml-simple-perl, libcgi-compile-perl, libmouse-perl,
|
||||
libio-string-perl,
|
||||
libnet-openid-server-perl,
|
||||
libemail-sender-perl,
|
||||
libgd-securityimage-perl,
|
||||
libimage-magick-perl
|
||||
Conflicts: eole-sso, eole-sso-client, eole-sso-server
|
||||
Provides: eole-sso, eole-sso-client, eole-sso-server
|
||||
Replaces: eole-sso, eole-sso-client, eole-sso-server
|
||||
Description: Dictionnaires et templates pour la configuration d'un serveur LemonLDAP::NG, testée uniquement avec eolebase
|
||||
.
|
||||
Pour toute information complémentaire, veuillez vous rendre sur la forge Cadoles.
|
||||
|
||||
Package: eole-lemonldap-pkg
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, lemonldap-ng, lemonldap-ng-doc, lemonldap-ng-fastcgi-server,
|
||||
libxml-libxml-perl, libxml-libxslt-perl, libcgi-emulate-psgi-perl, libauthen-captcha-perl, liblasso-perl,
|
||||
libxml-simple-perl, libcgi-compile-perl, libmouse-perl, libio-string-perl, libnet-openid-server-perl,
|
||||
libemail-sender-perl, libgd-securityimage-perl, libimage-magick-perl, libnet-ldap-perl,
|
||||
libunicode-string-perl, libsoap-lite-perl, libhtml-template-perl, libcache-cache-perl,
|
||||
libdbi-perl, perl-modules, libwww-perl
|
||||
Description: Paquet de dépendances pour eole-lemonldap.
|
||||
.
|
||||
Pour toute information complémentaire, veuillez vous rendre sur la forge Cadoles.
|
44
debian/copyright
vendored
Normal file
44
debian/copyright
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: {PROJECT}
|
||||
Source: {URL}
|
||||
|
||||
Files: *
|
||||
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
|
||||
License: {UPSTREAM LICENSE}
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2012 Équipe EOLE <eole@ac-dijon.fr>
|
||||
License: CeCILL-2
|
||||
|
||||
License: {UPSTREAM LICENSE}
|
||||
{TEXT OF THE LICENSE}
|
||||
|
||||
License: CeCILL-2
|
||||
This software is governed by the CeCILL-2 license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and or redistribute the software under the terms of the CeCILL-2
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info";.
|
||||
.
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited
|
||||
liability.
|
||||
.
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL-2 license and that you accept its terms.
|
||||
.
|
||||
On Eole systems, the complete text of the CeCILL-2 License can be found
|
||||
in '/usr/share/common-licenses/CeCILL-2-en'.
|
1
debian/eole-lemonldap.install
vendored
Normal file
1
debian/eole-lemonldap.install
vendored
Normal file
@ -0,0 +1 @@
|
||||
usr
|
3
debian/gbp.conf
vendored
Normal file
3
debian/gbp.conf
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Set per distribution debian tag
|
||||
[DEFAULT]
|
||||
debian-tag = debian/eole/%(version)s
|
8
debian/rules
vendored
Executable file
8
debian/rules
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
BIN
debian/source/.format.un~
vendored
Normal file
BIN
debian/source/.format.un~
vendored
Normal file
Binary file not shown.
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (native)
|
@ -2,12 +2,18 @@
|
||||
<creole>
|
||||
<files>
|
||||
<!-- Je suis un commentaire -->
|
||||
<file filelist='lemon' name='/etc/nginx/sites-available/manager-nginx.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemon' name='/etc/nginx/sites-available/handler-nginx.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemon' name='/etc/nginx/sites-available/portal-nginx.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemon' name='/etc/nginx/sites-available/test-nginx.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemon' name='/var/lib/lemonldap-ng/conf/lmConf-1.js' mkdir='True' rm='True'/>
|
||||
<service>lemonldap-ng-fastcgi-server</service>
|
||||
<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.conf' source='manager-apache2.4.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemona2' name='/etc/lemonldap-ng/handler-apache2.conf' source='handler-apache2.4.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='lemona2' name='/etc/lemonldap-ng/portal-apache2.conf' source='portal-apache2.4.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 servicelist='llonnginx'>lemonldap-ng-fastcgi-server</service>
|
||||
<service_access service='nginx'>
|
||||
<port service_accesslist="saLemon">80</port>
|
||||
<port service_accesslist="saLemon">443</port>
|
||||
@ -38,14 +44,48 @@
|
||||
</variable>
|
||||
<variable name="casAttribute" description="Nom de l'attribut CAS" type="string" mode="expert" multi="True"/>
|
||||
<variable name="casLDAPAttribute" description="Attribut LDAP équivalent" type="string" mode="expert"/>
|
||||
<variable name="casFolder" description="Endpoint du service cas" type="string" mode="expert">
|
||||
<value>cas</value>
|
||||
</variable>
|
||||
<variable name='cas_send_logout' type='oui/non' description="Activer le logout centralisé du serveur SSO" hidden='True'>
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
<variable name='ssoCALocation' type='string' description="Chemin de l'autorité de certification (ou rien)" mode="expert"/>
|
||||
<variable name='ssoDebug' type='string' description="Activer le Debug pour la lib php-CAS" mode="expert">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable name='llSkin' type='string' description="Skin utilisé par LemonLDAP::NG">
|
||||
<value>bootstrap</value>
|
||||
</variable>
|
||||
<variable name='llCheckLogins' type='oui/non' description="Permettre aux utilisateurs d'afficher l'historique de connection">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable name='llResetPassword' type='oui/non' description="Permettre aux utilisateurs de réinitialiser leurs mots de passe">
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
<variable name='llResetUrl' type='string' description="Adresse de l'application pour réinitialiser leurs mots de passe" />
|
||||
<variable name='llRegisterAccount' type='oui/non' description="Permettre aux utilisateurs de créer un compte">
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
<variable name='llRegisterDB' type='string' description="Base de comptes pour l'enregistrement"/>
|
||||
<variable name='llRegisterURL' type='string' description="Adresse de l'application de création de compte"/>
|
||||
</family>
|
||||
<separators>
|
||||
<separator name="managerWebName">Configuration DNS</separator>
|
||||
<separator name="ldapScheme">Configuration LDAP</separator>
|
||||
<separator name="casAttribute">Configuration CAS</separator>
|
||||
<separator name="llSkin">Personnalisation de la mire SSO</separator>
|
||||
</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>
|
||||
@ -64,16 +104,37 @@
|
||||
</fill>
|
||||
<check name="valid_enum" target="ldapScheme">
|
||||
<param>['ldaps','ldap']</param>
|
||||
</check>
|
||||
<check name="valid_enum" target="llRegisterDB">
|
||||
<param>['LDAP','Demo','Custom']</param>
|
||||
</check>
|
||||
<group master="casAttribute">
|
||||
<slave>casLDAPAttribute</slave>
|
||||
</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>
|
||||
</condition>
|
||||
<condition name='disabled_if_in' source='llRegisterAccount'>
|
||||
<param>non</param>
|
||||
<target type='variable'>llRegisterDB</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_not_in' source='llRegisterDB'>
|
||||
<param>Custom</param>
|
||||
<target type='variable'>llRegisterURL</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_in' source='llResetPassword'>
|
||||
<param>non</param>
|
||||
<target type='variable'>llResetUrl</target>
|
||||
</condition>
|
||||
<check name='valid_enum' target='llSkin'>
|
||||
<param>['bootstrap','dark','impact','pastel']</param>
|
||||
<param name="checkval">False</param>
|
||||
</check>
|
||||
</constraints>
|
||||
<help>
|
||||
<variable name='activerLemon'>Activer l'hébergement d'une place de marché HTTP pour OpenNebula</variable>
|
||||
@ -81,5 +142,6 @@
|
||||
<variable name='authWebName'>Nom DNS de service d'authentification de LemonLDAP::NG ex:auth.cadoles.com</variable>
|
||||
<variable name='ldapUserBaseDN'>DN de l'utilisateur de connection en lecture à l'annuaire (ex: cn=reader,o=gouv,c=fr)</variable>
|
||||
<variable name='nginxBucketSize'>server_names_hash_bucket_size Taille du hash des noms de serveur pour NGINX</variable>
|
||||
<variable name='llCheckLogins'>Affiche une case à cocher sur la mire SSO qui permet a l'utilisateur de voir l'historique de connection de son compte avant d'être redirigé vers le service demandé</variable>
|
||||
</help>
|
||||
</creole>
|
||||
|
206
dicos/71_eolesso_compat.xml
Normal file
206
dicos/71_eolesso_compat.xml
Normal 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
|
||||
-->
|
9
postservice/99-lemonldap-ng
Normal file
9
postservice/99-lemonldap-ng
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Updating Configuration cache
|
||||
|
||||
cmd="/usr/share/lemonldap-ng/bin/lemonldap-ng-cli update-cache"
|
||||
opt="update-cache"
|
||||
|
||||
res=$(${cmd} ${opt} 2>&1)
|
||||
exit ${?}
|
@ -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
|
||||
|
27
tmpl/cas.inc.php.tmpl
Normal file
27
tmpl/cas.inc.php.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
define("__CAS_SERVER", "%%authWebName");
|
||||
define("__CAS_VERSION", "2.0");
|
||||
define("__CAS_FOLDER", "%%casFolder");
|
||||
define("__CAS_PORT", 443);
|
||||
define("__CAS_PROTO", "https");
|
||||
%if %%cas_send_logout == 'oui'
|
||||
define("__CAS_LOGOUT", true);
|
||||
%else
|
||||
define("__CAS_LOGOUT", false);
|
||||
%end if
|
||||
%if %%getVar('activer_web_valider_ca', 'non') == 'oui'
|
||||
define("__CAS_VALIDER_CA", true);
|
||||
%else
|
||||
define("__CAS_VALIDER_CA", false);
|
||||
%end if
|
||||
%if %%is_empty(%%getVar('ssoCALocation', ''))
|
||||
define("__CAS_CA_LOCATION", "/etc/ssl/certs/ca.crt");
|
||||
%else
|
||||
define("__CAS_CA_LOCATION", "%%ssoCALocation");
|
||||
%end if
|
||||
%if %%getVar("ssoDebug", 'non') == "oui"
|
||||
define("__CAS_DEBUG", true);
|
||||
%else
|
||||
define("__CAS_DEBUG", false);
|
||||
%end if
|
||||
?>
|
7
tmpl/eoleCASConfig.php.tmpl
Normal file
7
tmpl/eoleCASConfig.php.tmpl
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
%if %%mode_conteneur_actif != "non"
|
||||
define("__CAS_IP", "%%adresse_ip_br0");
|
||||
%else
|
||||
define("__CAS_IP", "false");
|
||||
%end if
|
||||
?>
|
56
tmpl/handler-apache2.4.conf
Normal file
56
tmpl/handler-apache2.4.conf
Normal file
@ -0,0 +1,56 @@
|
||||
#========================================================================
|
||||
# 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
|
||||
|
||||
# Load LemonLDAP::NG Handler
|
||||
PerlOptions +GlobalRequest
|
||||
PerlModule Lemonldap::NG::Handler::ApacheMP2
|
||||
|
||||
# Common error page and security parameters
|
||||
ErrorDocument 403 https//%%authWebName/lmerror/403
|
||||
ErrorDocument 404 https//%%authWebName/lmerror/404
|
||||
ErrorDocument 500 https//%%authWebName/lmerror/500
|
||||
ErrorDocument 502 https//%%authWebName/lmerror/502
|
||||
ErrorDocument 503 https//%%authWebName/lmerror/503
|
||||
|
||||
%if %%container_ip_web != '127.0.0.1'
|
||||
<VirtualHost %%container_ip_web:443>
|
||||
%else
|
||||
<VirtualHost %%adresse_ip_eth0:443>
|
||||
%end if
|
||||
ServerName %%reloadWebName
|
||||
|
||||
# Configuration reload mechanism (only 1 per physical server is
|
||||
# needed): choose your URL to avoid restarting Apache when
|
||||
# configuration change
|
||||
<Location /reload>
|
||||
Require ip 127 ::1
|
||||
SetHandler perl-script
|
||||
PerlResponseHandler Lemonldap::NG::Handler::ApacheMP2->reload
|
||||
</Location>
|
||||
|
||||
# Uncomment this to activate status module
|
||||
#<Location /status>
|
||||
# Require ip 127 ::1
|
||||
# SetHandler perl-script
|
||||
# PerlResponseHandler Lemonldap::NG::Handler::ApacheMP2->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 "max-age=15768000"
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -12,10 +12,6 @@
|
||||
# IMPORTANT:
|
||||
# To protect applications, see test-nginx.conf template in example files
|
||||
|
||||
%if %%getVar("revprox_hash_bucket_size", "non") == "non"
|
||||
server_names_hash_bucket_size %%nginxBucketSize;
|
||||
%end if
|
||||
|
||||
# Log format
|
||||
include /etc/lemonldap-ng/nginx-lmlog.conf;
|
||||
#access_log /var/log/nginx/access.log lm_combined;
|
||||
@ -28,7 +24,7 @@ server {
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
ssl on;
|
||||
ssl on;
|
||||
%if %%cert_type == "letsencrypt"
|
||||
ssl_certificate %%le_config_dir/live/%%managerWebName/cert.pem;
|
||||
ssl_certificate_key %%le_config_dir/live/%%managerWebName/privkey.pem;
|
||||
@ -39,22 +35,26 @@ server {
|
||||
ssl_client_certificate /etc/ssl/certs/ca.crt;
|
||||
access_log /var/log/nginx/manager-lemon-ldap.access-ssl.log;
|
||||
server_name %%reloadWebName;
|
||||
root /var/www/html;
|
||||
|
||||
error_page 403 404 502 503 504 /nginx.html;
|
||||
location = /nginx.html{
|
||||
root /usr/share/nginx/www;
|
||||
}
|
||||
root /var/www/html;
|
||||
|
||||
location = /reload {
|
||||
allow 127.0.0.1;
|
||||
%for ipaddr in %%ip_ssh_eth0
|
||||
allow %%toCidr(%%ipaddr, %%ipaddr.netmask_ssh_eth0);
|
||||
%end for
|
||||
deny all;
|
||||
|
||||
# FastCGI configuration
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
fastcgi_param LLTYPE reload;
|
||||
|
||||
# OR TO USE uWSGI
|
||||
#include /etc/nginx/uwsgi_params;
|
||||
#uwsgi_pass 127.0.0.1:5000;
|
||||
#uwsgi_param LLTYPE reload;
|
||||
}
|
||||
|
||||
# Client requests
|
||||
@ -62,15 +62,7 @@ server {
|
||||
deny all;
|
||||
|
||||
# Uncomment this if you use https only
|
||||
#add_header Strict-Transport-Security "15768000";
|
||||
#add_header Strict-Transport-Security "max-age=15768000";
|
||||
}
|
||||
|
||||
# Uncomment this if status is enabled
|
||||
#location = /status {
|
||||
# allow 127.0.0.1;
|
||||
# deny all;
|
||||
# include /etc/nginx/fastcgi_params;
|
||||
# fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
# fastcgi_param LLTYPE status;
|
||||
#}
|
||||
}
|
||||
}
|
||||
|
@ -110,12 +110,22 @@ localStorageOptions={ \
|
||||
; restart your server. This increase performances
|
||||
;useLocalConf = 1
|
||||
|
||||
; staticPrefix: relative (or URL) location of static HTML components
|
||||
staticPrefix = /static
|
||||
; location of HTML templates directory
|
||||
templateDir = /usr/share/lemonldap-ng/portal/templates
|
||||
; languages: available languages for portal interface
|
||||
languages = fr, en
|
||||
; PORTAL CUSTOMIZATION
|
||||
; Name of the skin
|
||||
;portalSkin = pastel
|
||||
portalSkin = %%llSkin
|
||||
; Modules displayed
|
||||
;portalDisplayLogout = 1
|
||||
;portalDisplayResetPassword = 1
|
||||
%if %%llResetPassword == "oui"
|
||||
portalDisplayResetPassword = 1
|
||||
%else
|
||||
portalDisplayResetPassword = 0
|
||||
%end if
|
||||
;portalDisplayChangePassword = 1
|
||||
;portalDisplayAppslist = 1
|
||||
;portalDisplayLoginHistory = 1
|
||||
@ -272,7 +282,7 @@ logLevel = warn
|
||||
staticPrefix = /static
|
||||
;
|
||||
; location of HTML templates directory
|
||||
templateDir = /usr/share/lemonldap-ng/manager/templates
|
||||
templateDir = /usr/share/lemonldap-ng/manager/htdocs/templates
|
||||
|
||||
; languages: available languages for manager interface
|
||||
languages = fr, en
|
||||
|
@ -1,3 +1,4 @@
|
||||
%set %%ssoFilters = %%getSSOFilters
|
||||
{
|
||||
"ldapGroupAttributeNameUser": "dn",
|
||||
"cfgAuthorIP": "172.16.0.1",
|
||||
@ -25,7 +26,7 @@
|
||||
"timeoutActivity": 0,
|
||||
"oidcRPMetaDataExportedVars": {},
|
||||
"issuerDBSAMLActivation": 0,
|
||||
"issuerDBCASPath": "^/cas/",
|
||||
"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",
|
||||
@ -39,7 +40,9 @@
|
||||
"%%managerWebName": {}
|
||||
},
|
||||
"vhostOptions": {
|
||||
"%%managerWebName": {},
|
||||
"%%managerWebName": {
|
||||
"vhostHttps" : "1"
|
||||
},
|
||||
"test1.%%nom_domaine_local": {},
|
||||
"test2.%%nom_domaine_local": {}
|
||||
},
|
||||
@ -63,7 +66,20 @@
|
||||
"cfgLog": "",
|
||||
"samlIDPSSODescriptorSingleLogoutServiceHTTPRedirect": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;#PORTAL#/saml/singleLogout;#PORTAL#/saml/singleLogoutReturn",
|
||||
"exportedVars": {
|
||||
"UA": "HTTP_USER_AGENT"
|
||||
"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": {
|
||||
@ -143,7 +159,7 @@
|
||||
"logo": "help.png",
|
||||
"description": "Documentation supplied with LemonLDAP::NG",
|
||||
"display": "on",
|
||||
"uri": "https://%%managerWebName/doc/",
|
||||
"uri": "http://%%managerWebName/doc/",
|
||||
"name": "Local documentation"
|
||||
},
|
||||
"type": "application"
|
||||
@ -159,11 +175,19 @@
|
||||
"ldapUsePasswordResetAttribute": 1,
|
||||
"ldapPpolicyControl": 0,
|
||||
"casAttributes": {
|
||||
"uid":"uid",
|
||||
%for att in %%casAttribute
|
||||
"%%att": "%%att.casLDAPAttribute",
|
||||
%end for
|
||||
"mail":"mail"
|
||||
%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;",
|
||||
@ -196,7 +220,11 @@
|
||||
"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,
|
||||
@ -213,7 +241,12 @@
|
||||
"slaveAuthnLevel": 2,
|
||||
"samlIDPSSODescriptorSingleLogoutServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleLogout;#PORTAL#/saml/singleLogoutReturn",
|
||||
"Soap": 1,
|
||||
"registerDB": "Demo",
|
||||
%set %%RegisterDB=%%getVar('llRegisterDB', 'Demo')
|
||||
%if %%RegisterDB == "Custom"
|
||||
"registerDB": "Null",
|
||||
%else
|
||||
"registerDB": "%%RegisterDB",
|
||||
%end if
|
||||
"locationRules": {
|
||||
"%%managerWebName": {
|
||||
"default": "$uid eq \"%%lemonAdmin\""
|
||||
@ -343,7 +376,11 @@
|
||||
"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\""
|
||||
@ -355,7 +392,11 @@
|
||||
"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",
|
||||
@ -389,7 +430,11 @@
|
||||
"oidcOPMetaDataOptions": null,
|
||||
"samlSPSSODescriptorWantAssertionsSigned": 1,
|
||||
"samlOrganizationName": "%%samlOrganizationName",
|
||||
%if %%RegisterDB == "Custom"
|
||||
"registerUrl": "%%llRegisterURL",
|
||||
%else
|
||||
"registerUrl": "https://%%authWebName/register.pl",
|
||||
%end if
|
||||
"casAccessControlPolicy": "none",
|
||||
"multiValuesSeparator": ";",
|
||||
"ldapPort": %%ldapServerPort
|
106
tmpl/manager-apache2.4.conf
Normal file
106
tmpl/manager-apache2.4.conf
Normal file
@ -0,0 +1,106 @@
|
||||
#====================================================================
|
||||
# Apache configuration for LemonLDAP::NG Manager
|
||||
#====================================================================
|
||||
|
||||
# To insert LLNG user id in Apache logs, declare this format and use it in
|
||||
# CustomLog directive
|
||||
#LogFormat "%v:%p %h %l %{Lm-Remote-User}o %t \"%r\" %>s %O" llng
|
||||
|
||||
# Manager virtual host (manager.__DNSDOMAIN__)
|
||||
%if %%container_ip_web != '127.0.0.1'
|
||||
<VirtualHost %%container_ip_web:443>
|
||||
%else
|
||||
<VirtualHost %%adresse_ip_eth0:443>
|
||||
%end if
|
||||
ServerName %%managerWebName
|
||||
LogLevel notice
|
||||
# See above to set LLNG user id in Apache logs
|
||||
#CustomLog ${APACHE_LOG_DIR}/manager.log llng
|
||||
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log
|
||||
SSLEngine on
|
||||
SSLCertificateFile %%apache_cert
|
||||
SSLCertificateKeyFile %%server_key
|
||||
SSLProtocol all -SSLv3 -SSLv2
|
||||
|
||||
# Uncomment this if you are running behind a reverse proxy and want
|
||||
# LemonLDAP::NG to see the real IP address of the end user
|
||||
# Adjust the settings to match the IP address of your reverse proxy
|
||||
# and the header containing the original IP address
|
||||
#
|
||||
#RemoteIPHeader X-Forwarded-For
|
||||
#RemoteIPInternalProxy 127.0.0.1
|
||||
|
||||
|
||||
# FASTCGI CONFIGURATION
|
||||
# ---------------------
|
||||
|
||||
# 1) URI management
|
||||
RewriteEngine on
|
||||
|
||||
# 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$"
|
||||
|
||||
# REST URLs
|
||||
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
|
||||
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
|
||||
|
||||
# 2) FastCGI engine
|
||||
|
||||
# You can choose any FastCGI system. Here is an example using mod_fcgid
|
||||
# mod_fcgid configuration
|
||||
FcgidMaxRequestLen 2000000
|
||||
<Files *.fcgi>
|
||||
SetHandler fcgid-script
|
||||
Options +ExecCGI
|
||||
header unset Lm-Remote-User
|
||||
</Files>
|
||||
|
||||
# If you want to use mod_fastcgi, replace lines below by:
|
||||
#FastCgiServer /usr/share/lemonldap-ng/manager/htdocs/manager.fcgi
|
||||
|
||||
# GLOBAL CONFIGURATION
|
||||
# --------------------
|
||||
|
||||
DocumentRoot /usr/share/lemonldap-ng/manager/htdocs
|
||||
|
||||
<Location />
|
||||
Require all granted
|
||||
|
||||
<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/htdocs/static/
|
||||
<Directory /usr/share/lemonldap-ng/manager/htdocs/static>
|
||||
Require all granted
|
||||
Options +FollowSymLinks
|
||||
</Directory>
|
||||
|
||||
# On-line documentation
|
||||
Alias /doc/ /usr/share/lemonldap-ng/htdocs/doc/
|
||||
Alias /lib/ /usr/share/lemonldap-ng/htdocs/doc/pages/documentation/current/lib/
|
||||
<Directory /usr/share/lemonldap-ng/htdocs/doc/>
|
||||
Require all granted
|
||||
ErrorDocument 404 /notfound.html
|
||||
Options +FollowSymLinks
|
||||
DirectoryIndex index.html start.html
|
||||
</Directory>
|
||||
|
||||
# Uncomment this if site if you use SSL only
|
||||
#Header set Strict-Transport-Security "max-age=15768000"
|
||||
</VirtualHost>
|
@ -6,8 +6,8 @@ server {
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
ssl on;
|
||||
%if %%cert_type == "letsencrypt"
|
||||
ssl on;
|
||||
%if %%cert_type == "letsencrypt"
|
||||
ssl_certificate %%le_config_dir/live/%%managerWebName/cert.pem;
|
||||
ssl_certificate_key %%le_config_dir/live/%%managerWebName/privkey.pem;
|
||||
%else
|
||||
@ -20,29 +20,41 @@ server {
|
||||
|
||||
error_page 403 404 502 503 504 /nginx.html;
|
||||
location = /nginx.html{
|
||||
root /usr/share/nginx/www;
|
||||
}
|
||||
root /usr/share/nginx/www;
|
||||
}
|
||||
|
||||
if ($uri !~ ^/(manager\.psgi|static|doc|fr-doc|lib|javascript|favicon)) {
|
||||
root /usr/share/lemonldap-ng/manager/htdocs/;
|
||||
|
||||
if ($uri !~ ^/(.*\.psgi|static|doc|lib|javascript|favicon)) {
|
||||
rewrite ^/(.*)$ /manager.psgi/$1 break;
|
||||
}
|
||||
|
||||
location /manager.psgi {
|
||||
location ~ ^(?<sc>/.*\.psgi)(?:$|/) {
|
||||
|
||||
# FastCGI configuration
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
fastcgi_param LLTYPE manager;
|
||||
fastcgi_param LLTYPE psgi;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
# OR TO USE uWSGI
|
||||
#include /etc/nginx/uwsgi_params;
|
||||
#uwsgi_pass 127.0.0.1:5000;
|
||||
#uwsgi_param LLTYPE psgi;
|
||||
#uwsgi_param SCRIPT_FILENAME $document_root$sc;
|
||||
#uwsgi_param SCRIPT_NAME $sc;
|
||||
|
||||
# Uncomment this if you use https only
|
||||
#add_header Strict-Transport-Security "15768000";
|
||||
#add_header Strict-Transport-Security "max-age=15768000";
|
||||
}
|
||||
|
||||
location / {
|
||||
index manager.psgi;
|
||||
try_files $uri $uri/ =404;
|
||||
allow 127.0.0.0/8;
|
||||
deny all;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location /doc/ {
|
||||
@ -52,12 +64,8 @@ server {
|
||||
location /lib/ {
|
||||
alias /usr/share/doc/lemonldap-ng-doc/pages/documentation/current/lib/;
|
||||
}
|
||||
location /fr-doc/ {
|
||||
alias /usr/share/doc/lemonldap-ng-fr-doc/;
|
||||
index index.html start.html;
|
||||
}
|
||||
location /static/ {
|
||||
alias /usr/share/lemonldap-ng/manager/static/;
|
||||
alias /usr/share/lemonldap-ng/manager/htdocs/static/;
|
||||
}
|
||||
|
||||
# DEBIAN
|
||||
@ -65,4 +73,5 @@ server {
|
||||
#location /javascript/ {
|
||||
# alias /usr/share/javascript/;
|
||||
#}
|
||||
|
||||
}
|
||||
|
35
tmpl/pam_cas_auth.conf
Normal file
35
tmpl/pam_cas_auth.conf
Normal file
@ -0,0 +1,35 @@
|
||||
# sample pam_cas config
|
||||
|
||||
# host from CAS server. mandatory
|
||||
host %%authWebName
|
||||
|
||||
# port from CAS server. Default to 80 or 443, depends from ssl instruction
|
||||
port 443
|
||||
|
||||
# uri to validate ticket. Default to /proxyValidate
|
||||
uriValidate /proxyValidate
|
||||
|
||||
# https or no. values on or off. Default to on.
|
||||
ssl on
|
||||
|
||||
# debug (on) or no (off). debug in syslog, level LOG_DEBUG. Default to off
|
||||
debug off
|
||||
|
||||
# proxy or proxies who deliver Proxy Ticket.
|
||||
# If no proxy, pam_cas doesn't control it
|
||||
# It may be several proxy instructions
|
||||
#proxy https://%%authWebName/proxycas/casimap.php
|
||||
#proxy https://imp.its.yale.edu/cas/casProxy.php
|
||||
#proxy https://uportal1.its.yale.edu/CasProxyServlet
|
||||
#proxy https://uportal2.its.yale.edu/CasProxyServlet
|
||||
|
||||
# trusted_ca. mandatory if ssl on.
|
||||
# It a file in pem format. It can contents several certificates
|
||||
# If the CAS server certificate is auto-signed, the file must content the certificate
|
||||
# If the certificate is trusted by an Certificate Autority, The file must content
|
||||
# certificate from high level CA
|
||||
%if not %%is_empty(%%getVar('ssoCALocation', ''))
|
||||
trusted_ca %%ssoCALocation
|
||||
%else
|
||||
trusted_ca /etc/ssl/certs/ca.crt
|
||||
%end if
|
116
tmpl/portal-apache2.4.conf
Normal file
116
tmpl/portal-apache2.4.conf
Normal file
@ -0,0 +1,116 @@
|
||||
#====================================================================
|
||||
# Apache configuration for LemonLDAP::NG Portal
|
||||
#====================================================================
|
||||
|
||||
# To insert LLNG user id in Apache logs, declare this format and use it in
|
||||
# CustomLog directive
|
||||
#LogFormat "%v:%p %h %l %{Lm-Remote-User}o %t \"%r\" %>s %O" llng
|
||||
|
||||
# Portal Virtual Host (auth.__DNSDOMAIN__)
|
||||
%if %%container_ip_web != '127.0.0.1'
|
||||
<VirtualHost %%container_ip_web:443>
|
||||
%else
|
||||
<VirtualHost %%adresse_ip_eth0:443>
|
||||
%end if
|
||||
ServerName %%authWebName
|
||||
# See above to set LLNG user id in Apache logs
|
||||
#CustomLog ${APACHE_LOG_DIR}/portal.log llng
|
||||
|
||||
# Uncomment this if you are running behind a reverse proxy and want
|
||||
# LemonLDAP::NG to see the real IP address of the end user
|
||||
# Adjust the settings to match the IP address of your reverse proxy
|
||||
# and the header containing the original IP address
|
||||
#
|
||||
#RemoteIPHeader X-Forwarded-For
|
||||
#RemoteIPInternalProxy 127.0.0.1
|
||||
|
||||
# DocumentRoot (FCGI scripts)
|
||||
DocumentRoot /usr/share/lemonldap-ng/portal/htdocs/
|
||||
<Directory /usr/share/lemonldap-ng/portal/htdocs>
|
||||
Require all granted
|
||||
Options +ExecCGI +FollowSymLinks
|
||||
</Directory>
|
||||
RewriteEngine On
|
||||
# For performances, you can put static html files: simply put the HTML
|
||||
# result (example: /oauth2/checksession.html) as static file. Then
|
||||
# uncomment the following line.
|
||||
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
|
||||
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
|
||||
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
|
||||
|
||||
# Note that Content-Security-Policy header is generated by portal itself
|
||||
<Files *.fcgi>
|
||||
SetHandler fcgid-script
|
||||
|
||||
# Authorization header needs to be passed when using Kerberos or OIDC
|
||||
<IfVersion >= 2.4.13>
|
||||
CGIPassAuth On
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4.13>
|
||||
RewriteCond %{HTTP:Authorization} ^(.*)
|
||||
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
|
||||
</IfVersion>
|
||||
|
||||
Options +ExecCGI
|
||||
header unset Lm-Remote-User
|
||||
</Files>
|
||||
|
||||
# Uncomment this if status is enabled
|
||||
#FcgidInitialEnv LLNGSTATUSHOST 127.0.0.1:64321
|
||||
|
||||
# Static files
|
||||
Alias /static/ /usr/share/lemonldap-ng/portal/htdocs/static/
|
||||
<Directory /usr/share/lemonldap-ng/portal/htdocs/static/>
|
||||
Require all granted
|
||||
Options +FollowSymLinks
|
||||
</Directory>
|
||||
<Location /static/>
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 month"
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.fcgi index.html
|
||||
</IfModule>
|
||||
|
||||
# REST/SOAP functions for sessions management (disabled by default)
|
||||
<Location /index.fcgi/adminSessions>
|
||||
Require all denied
|
||||
</Location>
|
||||
|
||||
# REST/SOAP functions for sessions access (disabled by default)
|
||||
<Location /index.fcgi/sessions>
|
||||
Require all denied
|
||||
</Location>
|
||||
|
||||
# REST/SOAP functions for configuration access (disabled by default)
|
||||
<Location /index.fcgi/config>
|
||||
Require all denied
|
||||
</Location>
|
||||
|
||||
# REST/SOAP functions for notification insertion (disabled by default)
|
||||
<Location /index.fcgi/notification>
|
||||
Require all denied
|
||||
</Location>
|
||||
|
||||
# Enabe compression
|
||||
<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>
|
||||
|
||||
# Uncomment this if site if you use SSL only
|
||||
#Header set Strict-Transport-Security "max-age=15768000"
|
||||
</VirtualHost>
|
||||
|
@ -1,3 +1,10 @@
|
||||
## map directive must be in http context
|
||||
# Uncomment this if you use Auth SSL:
|
||||
#map $ssl_client_s_dn $ssl_client_s_dn_cn {
|
||||
# default "";
|
||||
# ~/CN=(?<CN>[^/]+) $CN;
|
||||
#}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name %%authWebName;
|
||||
@ -6,88 +13,67 @@ server {
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
ssl on;
|
||||
ssl on;
|
||||
%if %%cert_type == "letsencrypt"
|
||||
ssl_certificate %%le_config_dir/live/%%authWebName/cert.pem;
|
||||
ssl_certificate_key %%le_config_dir/live/%%authWebName/privkey.pem;
|
||||
%else
|
||||
ssl_certificate %%server_cert;
|
||||
ssl_certificate_key %%server_key;
|
||||
ssl_certificate %%server_cert;
|
||||
ssl_certificate_key %%server_key;
|
||||
%end if
|
||||
ssl_client_certificate /etc/ssl/certs/ca.crt;
|
||||
access_log /var/log/nginx/auth-lemon-ldap.access-ssl.log;
|
||||
ssl_client_certificate /etc/ssl/certs/ca..crt;
|
||||
access_log /var/log/nginx/auth-lemon-ldap.access-ssl.log;
|
||||
server_name %%authWebName;
|
||||
root /var/lib/lemonldap-ng/portal/;
|
||||
root /usr/share/lemonldap-ng/portal/htdocs/;
|
||||
|
||||
location ~ \.pl(?:$|/) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
fastcgi_param LLTYPE cgi;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
set $sn $request_uri;
|
||||
if ($sn ~ "^(.*)\?") {
|
||||
set $sn $1;
|
||||
}
|
||||
if ($sn ~ "^/index.pl") {
|
||||
set $sn "/index.pl";
|
||||
}
|
||||
fastcgi_param SCRIPT_NAME $sn;
|
||||
fastcgi_split_path_info ^(.*\.pl)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
# Uncomment this if you use Auth SSL:
|
||||
#map $ssl_client_s_dn $ssl_client_s_dn_cn {
|
||||
# default "";
|
||||
# ~/CN=(?<CN>[^/]+) $CN;
|
||||
#}
|
||||
#fastcgi_param SSL_CLIENT_S_DN_CN $ssl_client_s_dn_cn
|
||||
if ($uri !~ ^/((static|javascript|favicon).*|.*\.psgi)) {
|
||||
rewrite ^/(.*)$ /index.psgi/$1 break;
|
||||
}
|
||||
|
||||
index index.pl;
|
||||
location ~ ^(?<sc>/.*\.psgi)(?:$|/) {
|
||||
# Note that Content-Security-Policy header is generated by portal itself
|
||||
|
||||
# FastCGI configuration
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
fastcgi_param LLTYPE psgi;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
}
|
||||
|
||||
index index.psgi;
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# Uncomment this if you use https only
|
||||
#add_header Strict-Transport-Security "15768000";
|
||||
#add_header Strict-Transport-Security "max-age=15768000";
|
||||
}
|
||||
|
||||
# SOAP functions for sessions management (disabled by default)
|
||||
location /index.pl/adminSessions {
|
||||
location /static/ {
|
||||
alias /usr/share/lemonldap-ng/portal/htdocs/static/;
|
||||
}
|
||||
|
||||
# REST/SOAP functions for sessions management (disabled by default)
|
||||
location /index.psgi/adminSessions {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# SOAP functions for sessions access (disabled by default)
|
||||
location /index.pl/sessions {
|
||||
# REST/SOAP functions for sessions access (disabled by default)
|
||||
location /index.psgi/sessions {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# SOAP functions for configuration access (disabled by default)
|
||||
location /index.pl/config {
|
||||
# REST/SOAP functions for configuration access (disabled by default)
|
||||
location /index.psgi/config {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# SOAP functions for notification insertion (disabled by default)
|
||||
location /index.pl/notification {
|
||||
# REST/SOAP functions for notification insertion (disabled by default)
|
||||
location /index.psgi/notification {
|
||||
deny all;
|
||||
}
|
||||
# SAML2 Issuer
|
||||
rewrite ^/saml/metadata /metadata.pl last;
|
||||
rewrite ^/saml/.* /index.pl last;
|
||||
|
||||
# CAS Issuer
|
||||
rewrite ^/cas/.* /index.pl;
|
||||
|
||||
# OpenID Issuer
|
||||
rewrite ^/openidserver/.* /index.pl last;
|
||||
|
||||
# OpenID Connect Issuer
|
||||
rewrite ^/oauth2/.* /index.pl last;
|
||||
rewrite ^/.well-known/openid-configuration$ /openid-configuration.pl last;
|
||||
|
||||
# Get Issuer
|
||||
rewrite ^/get/.* /index.pl;
|
||||
|
||||
# Public pages
|
||||
rewrite ^/public.* /public.pl;
|
||||
|
||||
# DEBIAN
|
||||
# If install was made with USEDEBIANLIBS (official releases), uncomment this
|
||||
|
47
tmpl/test-apache2.4.conf
Normal file
47
tmpl/test-apache2.4.conf
Normal file
@ -0,0 +1,47 @@
|
||||
#====================================================================
|
||||
# Apache configuration for LemonLDAP::NG sample applications
|
||||
#====================================================================
|
||||
|
||||
PerlModule Lemonldap::NG::Handler::ApacheMP2::Menu
|
||||
|
||||
# Sample application
|
||||
<VirtualHost __VHOSTLISTEN__>
|
||||
ServerName test1.__DNSDOMAIN__
|
||||
ServerAlias test2.__DNSDOMAIN__
|
||||
|
||||
# Uncomment this if you are running behind a reverse proxy and want
|
||||
# LemonLDAP::NG to see the real IP address of the end user
|
||||
# Adjust the settings to match the IP address of your reverse proxy
|
||||
# and the header containing the original IP address
|
||||
#
|
||||
#RemoteIPHeader X-Forwarded-For
|
||||
#RemoteIPInternalProxy 127.0.0.1
|
||||
|
||||
# SSO protection
|
||||
PerlHeaderParserHandler Lemonldap::NG::Handler::ApacheMP2
|
||||
|
||||
# DocumentRoot
|
||||
DocumentRoot __TESTDIR__
|
||||
<Directory __TESTDIR__>
|
||||
Require all granted
|
||||
Options +ExecCGI
|
||||
</Directory>
|
||||
|
||||
# Perl script (application test is written in Perl)
|
||||
<Files *.pl>
|
||||
SetHandler perl-script
|
||||
PerlResponseHandler ModPerl::Registry
|
||||
|
||||
# Display Menu
|
||||
PerlOutputFilterHandler Lemonldap::NG::Handler::ApacheMP2::Menu->run
|
||||
|
||||
</Files>
|
||||
|
||||
# Directory index
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.pl index.html
|
||||
</IfModule>
|
||||
|
||||
# Uncomment this if site if you use SSL only
|
||||
#Header set Strict-Transport-Security "max-age=15768000"
|
||||
</VirtualHost>
|
@ -6,7 +6,7 @@ server {
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
ssl on;
|
||||
ssl on;
|
||||
ssl_certificate %%server_cert;
|
||||
ssl_certificate_key %%server_key;
|
||||
ssl_client_certificate /etc/ssl/certs/ca.crt;
|
||||
@ -15,24 +15,24 @@ server {
|
||||
server_name test1.%%nom_domaine_local test2.%%nom_domaine_local;
|
||||
root /var/lib/lemonldap-ng/test/;
|
||||
|
||||
|
||||
# Internal authentication request
|
||||
location = /lmauth {
|
||||
internal;
|
||||
|
||||
# FastCGI configuration
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
# To use AuthBasic handler, uncomment this and remove "error_page 401"
|
||||
# fastcgi_param LLTYPE authbasic;
|
||||
|
||||
# Drop post datas
|
||||
fastcgi_pass_request_body off;
|
||||
fastcgi_param CONTENT_LENGTH "";
|
||||
|
||||
# Keep original hostname
|
||||
fastcgi_param HOST $http_host;
|
||||
|
||||
# Keep original request (LLNG server will received /llauth)
|
||||
# Keep original request (LLNG server will receive /lmauth)
|
||||
fastcgi_param X_ORIGINAL_URI $request_uri;
|
||||
# Improve performances
|
||||
#fastcgi_buffer_size 32k;
|
||||
#fastcgi_buffers 32 32k;
|
||||
|
||||
}
|
||||
|
||||
# Client requests
|
||||
@ -51,7 +51,7 @@ server {
|
||||
auth_request /lmauth;
|
||||
auth_request_set $lmremote_user $upstream_http_lm_remote_user;
|
||||
auth_request_set $lmlocation $upstream_http_location;
|
||||
# Uncomment this if CDA is used
|
||||
# If CDA is used, uncomment this
|
||||
#auth_request_set $cookie_value $upstream_http_set_cookie;
|
||||
#add_header Set-Cookie $cookie_value;
|
||||
# Remove this for AuthBasic handler
|
||||
@ -68,30 +68,37 @@ server {
|
||||
# Set manually your headers
|
||||
#auth_request_set $authuser $upstream_http_auth_user;
|
||||
#proxy_set_header Auth-User $authuser;
|
||||
# OR in the correspondinc block
|
||||
# OR in the corresponding block
|
||||
#fastcgi_param HTTP_AUTH_USER $authuser;
|
||||
|
||||
# Then (if LUA not supported), change cookie header to hide LLNG cookie
|
||||
# Then (if LUA is not supported), change cookie header to hide LLNG cookie
|
||||
#auth_request_set $lmcookie $upstream_http_cookie;
|
||||
#proxy_set_header Cookie: $lmcookie;
|
||||
# OR in the corresponding block
|
||||
#fastcgi_param HTTP_COOKIE $lmcookie;
|
||||
|
||||
# Uncomment this if you use https only
|
||||
#add_header Strict-Transport-Security "15768000";
|
||||
#add_header Strict-Transport-Security "max-age=15768000";
|
||||
|
||||
# Set REMOTE_USER (for FastCGI apps only)
|
||||
#fastcgi_param REMOTE_USER $lmremote_user;
|
||||
}
|
||||
|
||||
# Handle test CGI
|
||||
location ~ \.pl$ {
|
||||
location ~ ^(?<sc>/.*\.pl)(?:$|/) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
fastcgi_param LLTYPE cgi;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.*\.pl)(/.+)$;
|
||||
fastcgi_param REMOTE_USER $lmremote_user;
|
||||
|
||||
# Or with uWSGI
|
||||
#include /etc/nginx/uwsgi_params;
|
||||
#uwsgi_pass 127.0.0.1:5000;
|
||||
#uwsgi_param LLTYPE cgi;
|
||||
#uwsgi_param SCRIPT_FILENAME $document_root$sc;
|
||||
#uwsgi_param SCRIPT_NAME $sc;
|
||||
}
|
||||
|
||||
#location = /status {
|
||||
@ -100,5 +107,10 @@ server {
|
||||
# include /etc/nginx/fastcgi_params;
|
||||
# fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||
# fastcgi_param LLTYPE status;
|
||||
|
||||
### Or with uWSGI
|
||||
## include /etc/nginx/uwsgi_params;
|
||||
## uwsgi_pass 127.0.0.1:5000;
|
||||
## uwsgi_param LLTYPE status;
|
||||
#}
|
||||
}
|
||||
|
Reference in New Issue
Block a user