Compare commits
44 Commits
fix-templa
...
pkg/dev/eo
Author | SHA1 | Date | |
---|---|---|---|
baa4dca9de | |||
710ea85f96 | |||
849c3f0a88 | |||
d3897f1e4a | |||
6f1cb45eac | |||
4916317d30 | |||
19fc15c324 | |||
b7556a03b8 | |||
8f33de7f55 | |||
f1defd2626 | |||
a4a385a439 | |||
982c5f44ee | |||
1eb5faaa82 | |||
7269e252de | |||
4f16447856 | |||
9e64f5ca8d | |||
93ee02b73d | |||
84f41d0196 | |||
eb40396a26 | |||
d33fa9c421 | |||
b90eb474f5 | |||
0ff7961616 | |||
d69f20c896 | |||
41a941615d | |||
658013c177 | |||
c35086567c | |||
35edad1538 | |||
76f19ced94 | |||
32d336e37b | |||
8a944db515 | |||
4b26fc5c38 | |||
c7dcd020a4 | |||
904abd02a4 | |||
5e2d7457fd | |||
e2f656f9f8 | |||
6e6a6449a4 | |||
e5ada4d3eb | |||
92de21a49b | |||
dab8085a83 | |||
e52faa122b | |||
32c214343d | |||
1fabc756b1 | |||
ad490d3810 | |||
0fc774cd05 |
70
README.md
70
README.md
@ -1,15 +1,73 @@
|
|||||||
# eole-lemonldap
|
# eole-lemonldap
|
||||||
|
|
||||||
Intégration LemonLDAP::NG pour EOLE
|
LemonLDAP::NG EOLE integration
|
||||||
|
|
||||||
## Howto
|
## Howto
|
||||||
|
|
||||||
|
### Repository configuration
|
||||||
|
|
||||||
* Add the lemonldap-ng deb respository we need the last version of LemonLDAP.
|
* Add the lemonldap-ng deb respository we need the last version of LemonLDAP.
|
||||||
|
|
||||||
Gen_config -> Mode Expert -> Dépôts tiers -> Libellé du dépôt
|
GenConfig -> Mode Expert -> Dépôts tiers -> Libellé du dépôt
|
||||||
|
|
||||||
*# LemonLDAP::NG repository
|
#### LemonLDAP::NG repository
|
||||||
deb https://lemonldap-ng.org/deb stable main
|
|
||||||
deb-src https://lemonldap-ng.org/deb stable main
|
* deb https://lemonldap-ng.org/deb stable main
|
||||||
Key URL : https://lemonldap-ng.org/_media/rpm-gpg-key-ow2
|
* deb-src https://lemonldap-ng.org/deb stable main
|
||||||
|
* Key URL : https://lemonldap-ng.org/_media/rpm-gpg-key-ow2
|
||||||
|
|
||||||
|
#### Cadoles Repository
|
||||||
|
* deb [ arch=all ] https://vulcain.cadoles.com 2.6.2-dev main
|
||||||
|
* Key URL : https://vulcain.cadoles.com/cadoles.gpg
|
||||||
|
|
||||||
|
### Install packages
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install eole-lemonldap
|
||||||
|
|
||||||
|
### Configure LemonLDAP in GenConfig
|
||||||
|
|
||||||
|
* Enable lemonldap in "Services" tab
|
||||||
|
|
||||||
|
Gen_Config -> Services -> Activer LemonLDAP::NG -> "Oui"
|
||||||
|
|
||||||
|
* Fill LemonLDAP configuration
|
||||||
|
|
||||||
|
#### Nginx Web case
|
||||||
|
|
||||||
|
By default NGINX is configured to serve "web" application, in this case the lemonLDAP::NG application will
|
||||||
|
not be served properly, so we need to disable this function
|
||||||
|
|
||||||
|
GenConfig -> Services -> Activer la publication d’applications web par Nginx -> "Non'
|
||||||
|
|
||||||
|
#### Configuration DNS
|
||||||
|
* GenConfig -> Lemonldap -> Nom DNS du manager LemonLDAP-NG
|
||||||
|
* GenConfig -> Lemonldap -> Nom DNS du service d'authentification LemonLDAP-NG
|
||||||
|
|
||||||
|
#### Configuration LDAP
|
||||||
|
* GenConfig -> Lemonldap -> Protocole LDAP à utiliser
|
||||||
|
* GenConfig -> Lemonldap -> Adresse du Serveur LDAP utilisé par LemonLDAP::NG
|
||||||
|
* GenConfig -> Lemonldap -> Port d'écoute du LDAP utilisé par LemonLDAP::NG
|
||||||
|
* GenConfig -> Lemonldap -> Base DN des utilisateurs dans l'annuaire
|
||||||
|
* GenConfig -> Lemonldap -> Utilisateur de connection à l'annuaire (DN ex: cn=reader,o=gouv,c=fr)
|
||||||
|
* GenConfig -> Lemonldap -> Mot de passe de l'utilisateur de connection à l'annuaire (file like /root/.reader or the clear password)
|
||||||
|
|
||||||
|
#### Configuration CAS
|
||||||
|
|
||||||
|
Add your CAS attributes mapping ( uid = uid and mail = mail are created by default)
|
||||||
|
|
||||||
|
* GenConfig -> Lemonldap -> Nom de l'attribut CAS
|
||||||
|
* GenConfig -> Lemonldap -> Attribut LDAP équivalent
|
||||||
|
|
||||||
|
### SSL issues
|
||||||
|
|
||||||
|
If you use "autosign" certificates you need to add the "manager" and "auth" service names to the alternative names.
|
||||||
|
You also need to include "reload" service name (available in GenConfig -> Mode Expert -> Lemonldap -> Nom DNS du service Reload de LemonLDAP-NG)
|
||||||
|
|
||||||
|
* GenConfig -> Mode Expert -> Certificats ssl -> Nom Alternatif de la machine (SubjectAltName)
|
||||||
|
|
||||||
|
If you use "manual" certificates make sure this names are covered by your SSL Certificate
|
||||||
|
|
||||||
|
If you use "letsencrypt" mode you also need to add this names to the let'sencrypt request:
|
||||||
|
|
||||||
|
* GenConfig -> Mode Expert -> Certificat ssl -> Nom de domaines supplémentaires
|
||||||
|
66
creolefuncs/lemonldap.py
Normal file
66
creolefuncs/lemonldap.py
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
def toCidr(ip,mask=False):
|
||||||
|
""" Convert to CIDR notation
|
||||||
|
ip can be like this : 192.168.5.100/255.255.255.0
|
||||||
|
or you can provide the ip and the mask
|
||||||
|
"""
|
||||||
|
from IPy import IP
|
||||||
|
try:
|
||||||
|
if mask:
|
||||||
|
data="{0}/{1}".format(ip,mask)
|
||||||
|
else:
|
||||||
|
data=ip
|
||||||
|
return str(IP(data))
|
||||||
|
except:
|
||||||
|
return data
|
||||||
|
|
||||||
|
def readPass(encoder,reader):
|
||||||
|
try:
|
||||||
|
mypwdreader=open(reader, "r").readline().rstrip()
|
||||||
|
if encoder == "":
|
||||||
|
return mypwdreader
|
||||||
|
elif encoder == "base64":
|
||||||
|
import base64
|
||||||
|
return base64.b64encode(mypwdreader)
|
||||||
|
|
||||||
|
except:
|
||||||
|
return "mot de passe inconnu"
|
||||||
|
|
||||||
|
def getSSOFilters():
|
||||||
|
""" Convert former eole-sso filters to LemonLDAP filters
|
||||||
|
"""
|
||||||
|
import glob
|
||||||
|
from ConfigParser import ConfigParser
|
||||||
|
import json
|
||||||
|
try:
|
||||||
|
filters = {}
|
||||||
|
filterDirectory = "/usr/share/sso/app_filters/"
|
||||||
|
filterExtention = ".ini"
|
||||||
|
filterSection = "utilisateur"
|
||||||
|
filterFiles = glob.glob("{0}/*{1}".format(filterDirectory, filterExtention))
|
||||||
|
toClean = ["uid","mail","cn","__name__"]
|
||||||
|
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:
|
||||||
|
del(filters[key])
|
||||||
|
|
||||||
|
res = ""
|
||||||
|
index=0
|
||||||
|
size=len(filters)
|
||||||
|
for k,v in filters.items():
|
||||||
|
res += " \"{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
|
20
debian/control
vendored
Normal file
20
debian/control
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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-fr-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
|
||||||
|
Conflicts: eole-sso
|
||||||
|
Provides: eole-sso
|
||||||
|
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.
|
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'.
|
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)
|
@ -5,7 +5,12 @@
|
|||||||
<file filelist='lemon' name='/etc/nginx/sites-available/manager-nginx.conf' mkdir='True' rm='True'/>
|
<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/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/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'/>
|
<file filelist='lemon' name='/var/lib/lemonldap-ng/conf/lmConf-1.js' 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_access service='nginx'>
|
<service_access service='nginx'>
|
||||||
<port service_accesslist="saLemon">80</port>
|
<port service_accesslist="saLemon">80</port>
|
||||||
<port service_accesslist="saLemon">443</port>
|
<port service_accesslist="saLemon">443</port>
|
||||||
@ -28,10 +33,29 @@
|
|||||||
<variable name='ldapBindUserDN' type='string' description="Utilisateur de connection à l'annuaire" mandatory="True"/>
|
<variable name='ldapBindUserDN' type='string' description="Utilisateur de connection à l'annuaire" mandatory="True"/>
|
||||||
<variable name='ldapBindUserPassword' type='string' description="Mot de passe de l'utilisateur de connection à l'annuaire" mandatory="True"/>
|
<variable name='ldapBindUserPassword' type='string' description="Mot de passe de l'utilisateur de connection à l'annuaire" mandatory="True"/>
|
||||||
<variable name="samlOrganizationName" type='string' description="Nom de l'organisation SAML" mode='expert'/>
|
<variable name="samlOrganizationName" type='string' description="Nom de l'organisation SAML" mode='expert'/>
|
||||||
|
<variable name="lemonAdmin" type='string' description="LemonLDAP Administrator username" mode='expert'>
|
||||||
|
<value>admin</value>
|
||||||
|
</variable>
|
||||||
|
<variable name="nginxBucketSize" type='number' description="Taille du hash des noms de serveur pour NGINX" mode='expert'>
|
||||||
|
<value>64</value>
|
||||||
|
</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>
|
||||||
</family>
|
</family>
|
||||||
<separators>
|
<separators>
|
||||||
<separator name="managerWebName">Configuration DNS</separator>
|
<separator name="managerWebName">Configuration DNS</separator>
|
||||||
<separator name="ldapScheme">Configuration LDAP</separator>
|
<separator name="ldapScheme">Configuration LDAP</separator>
|
||||||
|
<separator name="casAttribute">Configuration CAS</separator>
|
||||||
</separators>
|
</separators>
|
||||||
</variables>
|
</variables>
|
||||||
<constraints>
|
<constraints>
|
||||||
@ -54,9 +78,13 @@
|
|||||||
<check name="valid_enum" target="ldapScheme">
|
<check name="valid_enum" target="ldapScheme">
|
||||||
<param>['ldaps','ldap']</param>
|
<param>['ldaps','ldap']</param>
|
||||||
</check>
|
</check>
|
||||||
|
<group master="casAttribute">
|
||||||
|
<slave>casLDAPAttribute</slave>
|
||||||
|
</group>
|
||||||
<condition name='disabled_if_in' source='activerLemon'>
|
<condition name='disabled_if_in' source='activerLemon'>
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
<target type='filelist'>lemon</target>
|
<target type='filelist'>lemon</target>
|
||||||
|
<target type='filelist'>lemonCAS</target>
|
||||||
<target type='family'>LemonLDAP</target>
|
<target type='family'>LemonLDAP</target>
|
||||||
<target type='service_accesslist'>saLemon</target>
|
<target type='service_accesslist'>saLemon</target>
|
||||||
</condition>
|
</condition>
|
||||||
@ -65,5 +93,7 @@
|
|||||||
<variable name='activerLemon'>Activer l'hébergement d'une place de marché HTTP pour OpenNebula</variable>
|
<variable name='activerLemon'>Activer l'hébergement d'une place de marché HTTP pour OpenNebula</variable>
|
||||||
<variable name='managerWebName'>Nom DNS de l'application de gestion de LemonLDAP::NG ex:manager.cadoles.com</variable>
|
<variable name='managerWebName'>Nom DNS de l'application de gestion de LemonLDAP::NG ex:manager.cadoles.com</variable>
|
||||||
<variable name='authWebName'>Nom DNS de service d'authentification de LemonLDAP::NG ex:auth.cadoles.com</variable>
|
<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>
|
||||||
</help>
|
</help>
|
||||||
</creole>
|
</creole>
|
||||||
|
1
eole-lemonldap.mk
Normal file
1
eole-lemonldap.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
@ -1,9 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
ENABLE=$(CreoleGet activerLemon 'non')
|
ENABLE=$(CreoleGet activerLemon 'non')
|
||||||
CONF_FILES='manager-nginx.conf'
|
CONF_FILES="manager-nginx.conf"
|
||||||
CONF_FILES='${CONF_FILE} handler-nginx.conf'
|
CONF_FILES="${CONF_FILES} handler-nginx.conf"
|
||||||
CONF_FILES='${CONF_FILE} portal-nginx.conf'
|
CONF_FILES="${CONF_FILES} portal-nginx.conf"
|
||||||
|
CONF_FILES="${CONF_FILES} test-nginx.conf"
|
||||||
|
|
||||||
for CONF_FILE in ${CONF_FILES}
|
for CONF_FILE in ${CONF_FILES}
|
||||||
do
|
do
|
||||||
|
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
|
||||||
|
?>
|
@ -12,6 +12,10 @@
|
|||||||
# IMPORTANT:
|
# IMPORTANT:
|
||||||
# To protect applications, see test-nginx.conf template in example files
|
# 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
|
# Log format
|
||||||
include /etc/lemonldap-ng/nginx-lmlog.conf;
|
include /etc/lemonldap-ng/nginx-lmlog.conf;
|
||||||
#access_log /var/log/nginx/access.log lm_combined;
|
#access_log /var/log/nginx/access.log lm_combined;
|
||||||
@ -44,6 +48,9 @@ server {
|
|||||||
|
|
||||||
location = /reload {
|
location = /reload {
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
|
%for ipaddr in %%ip_ssh_eth0
|
||||||
|
allow %%toCidr(%%ipaddr, %%ipaddr.netmask_ssh_eth0);
|
||||||
|
%end for
|
||||||
deny all;
|
deny all;
|
||||||
include /etc/nginx/fastcgi_params;
|
include /etc/nginx/fastcgi_params;
|
||||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"timeoutActivity": 0,
|
"timeoutActivity": 0,
|
||||||
"oidcRPMetaDataExportedVars": {},
|
"oidcRPMetaDataExportedVars": {},
|
||||||
"issuerDBSAMLActivation": 0,
|
"issuerDBSAMLActivation": 0,
|
||||||
"issuerDBCASPath": "^/cas/",
|
"issuerDBCASPath": "^/%%casFolder/",
|
||||||
"randomPasswordRegexp": "[A-Z]{3}[a-z]{5}.\\d{2}",
|
"randomPasswordRegexp": "[A-Z]{3}[a-z]{5}.\\d{2}",
|
||||||
"samlIDPSSODescriptorSingleSignOnServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/singleSignOnSOAP;",
|
"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",
|
"samlSPSSODescriptorSingleLogoutServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn",
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"name": "Application Test 2",
|
"name": "Application Test 2",
|
||||||
"logo": "thumbnail.png",
|
"logo": "thumbnail.png",
|
||||||
"uri": "http://test2.%%nom_domaine_local/",
|
"uri": "https://test2.%%nom_domaine_local/",
|
||||||
"display": "auto",
|
"display": "auto",
|
||||||
"description": "The same simple application displaying authenticated user"
|
"description": "The same simple application displaying authenticated user"
|
||||||
},
|
},
|
||||||
@ -84,7 +84,7 @@
|
|||||||
"type": "application",
|
"type": "application",
|
||||||
"options": {
|
"options": {
|
||||||
"description": "A simple application displaying authenticated user",
|
"description": "A simple application displaying authenticated user",
|
||||||
"uri": "http://test1.%%nom_domaine_local/",
|
"uri": "https://test1.%%nom_domaine_local/",
|
||||||
"logo": "demo.png",
|
"logo": "demo.png",
|
||||||
"display": "auto",
|
"display": "auto",
|
||||||
"name": "Application Test 1"
|
"name": "Application Test 1"
|
||||||
@ -143,7 +143,7 @@
|
|||||||
"logo": "help.png",
|
"logo": "help.png",
|
||||||
"description": "Documentation supplied with LemonLDAP::NG",
|
"description": "Documentation supplied with LemonLDAP::NG",
|
||||||
"display": "on",
|
"display": "on",
|
||||||
"uri": "http://%%managerWebName/doc/",
|
"uri": "https://%%managerWebName/doc/",
|
||||||
"name": "Local documentation"
|
"name": "Local documentation"
|
||||||
},
|
},
|
||||||
"type": "application"
|
"type": "application"
|
||||||
@ -158,13 +158,20 @@
|
|||||||
"samlAuthnContextMapPasswordProtectedTransport": 3,
|
"samlAuthnContextMapPasswordProtectedTransport": 3,
|
||||||
"ldapUsePasswordResetAttribute": 1,
|
"ldapUsePasswordResetAttribute": 1,
|
||||||
"ldapPpolicyControl": 0,
|
"ldapPpolicyControl": 0,
|
||||||
"casAttributes": {},
|
"casAttributes": {
|
||||||
|
"uid":"uid",
|
||||||
|
%%getSSOFilters
|
||||||
|
%for att in %%casAttribute
|
||||||
|
"%%att": "%%att.casLDAPAttribute",
|
||||||
|
%end for
|
||||||
|
"mail":"mail"
|
||||||
|
},
|
||||||
"issuerDBSAMLPath": "^/saml/",
|
"issuerDBSAMLPath": "^/saml/",
|
||||||
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
|
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
|
||||||
"portalDisplayAppslist": 1,
|
"portalDisplayAppslist": 1,
|
||||||
"confirmFormMethod": "post",
|
"confirmFormMethod": "post",
|
||||||
"domain": "%%nom_domaine_local",
|
"domain": "%%nom_domaine_local",
|
||||||
"cfgNum": "9",
|
"cfgNum": "1",
|
||||||
"authentication": "LDAP",
|
"authentication": "LDAP",
|
||||||
"samlNameIDFormatMapWindows": "uid",
|
"samlNameIDFormatMapWindows": "uid",
|
||||||
"authChoiceModules": {},
|
"authChoiceModules": {},
|
||||||
@ -200,7 +207,7 @@
|
|||||||
"grantSessionRules": {},
|
"grantSessionRules": {},
|
||||||
"remoteGlobalStorage": "Lemonldap::NG::Common::Apache::Session::SOAP",
|
"remoteGlobalStorage": "Lemonldap::NG::Common::Apache::Session::SOAP",
|
||||||
"reloadUrls": {
|
"reloadUrls": {
|
||||||
"%%reloadWebName": "http://%%reloadWebName/reload"
|
"%%reloadWebName": "https://%%reloadWebName/reload"
|
||||||
},
|
},
|
||||||
"registerTimeout": 0,
|
"registerTimeout": 0,
|
||||||
"samlIDPSSODescriptorSingleSignOnServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleSignOn;",
|
"samlIDPSSODescriptorSingleSignOnServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleSignOn;",
|
||||||
@ -210,7 +217,7 @@
|
|||||||
"registerDB": "Demo",
|
"registerDB": "Demo",
|
||||||
"locationRules": {
|
"locationRules": {
|
||||||
"%%managerWebName": {
|
"%%managerWebName": {
|
||||||
"default": "$uid eq \"dwho\""
|
"default": "$uid eq \"%%lemonAdmin\""
|
||||||
},
|
},
|
||||||
"test1.%%nom_domaine_local": {
|
"test1.%%nom_domaine_local": {
|
||||||
"default": "accept",
|
"default": "accept",
|
||||||
@ -223,7 +230,11 @@
|
|||||||
},
|
},
|
||||||
"portalDisplayChangePassword": "$_auth =~ /^(LDAP|DBI|Demo)$/",
|
"portalDisplayChangePassword": "$_auth =~ /^(LDAP|DBI|Demo)$/",
|
||||||
"hideOldPassword": 0,
|
"hideOldPassword": 0,
|
||||||
|
%if %%is_file(%%ldapBindUserPassword)
|
||||||
|
"managerPassword": "%%readPass("", %%ldapBindUserPassword)",
|
||||||
|
%else
|
||||||
"managerPassword": "%%ldapBindUserPassword",
|
"managerPassword": "%%ldapBindUserPassword",
|
||||||
|
%end if
|
||||||
"authChoiceParam": "lmAuth",
|
"authChoiceParam": "lmAuth",
|
||||||
"lwpSslOpts": {},
|
"lwpSslOpts": {},
|
||||||
"portalSkinRules": {},
|
"portalSkinRules": {},
|
||||||
@ -247,8 +258,8 @@
|
|||||||
"mailOnPasswordChange": 0,
|
"mailOnPasswordChange": 0,
|
||||||
"captchaStorage": "Apache::Session::File",
|
"captchaStorage": "Apache::Session::File",
|
||||||
"remoteGlobalStorageOptions": {
|
"remoteGlobalStorageOptions": {
|
||||||
"proxy": "http://%%authWebName/index.pl/sessions",
|
"proxy": "https://%%authWebName/index.pl/sessions",
|
||||||
"ns": "http://%%authWebName/Lemonldap/NG/Common/CGI/SOAPService"
|
"ns": "https://%%authWebName/Lemonldap/NG/Common/CGI/SOAPService"
|
||||||
},
|
},
|
||||||
"passwordDB": "LDAP",
|
"passwordDB": "LDAP",
|
||||||
"captcha_size": 6,
|
"captcha_size": 6,
|
||||||
@ -319,7 +330,7 @@
|
|||||||
"oidcOPMetaDataJSON": null,
|
"oidcOPMetaDataJSON": null,
|
||||||
"samlIdPResolveCookie": "lemonldapidp",
|
"samlIdPResolveCookie": "lemonldapidp",
|
||||||
"samlRelayStateTimeout": 600,
|
"samlRelayStateTimeout": 600,
|
||||||
"samlOrganizationURL": "http://www.%%nom_domaine_local",
|
"samlOrganizationURL": "https://auth.%%nom_domaine_local",
|
||||||
"globalStorageOptions": {
|
"globalStorageOptions": {
|
||||||
"Directory": "/var/lib/lemonldap-ng/sessions",
|
"Directory": "/var/lib/lemonldap-ng/sessions",
|
||||||
"LockDirectory": "/var/lib/lemonldap-ng/sessions/lock"
|
"LockDirectory": "/var/lib/lemonldap-ng/sessions/lock"
|
||||||
@ -345,10 +356,10 @@
|
|||||||
"oidcOPMetaDataJWKS": null,
|
"oidcOPMetaDataJWKS": null,
|
||||||
"webIDAuthnLevel": 1,
|
"webIDAuthnLevel": 1,
|
||||||
"issuerDBOpenIDActivation": "1",
|
"issuerDBOpenIDActivation": "1",
|
||||||
"mailUrl": "http://%%authWebName/mail.pl",
|
"mailUrl": "https://%%authWebName/mail.pl",
|
||||||
"maintenance": 0,
|
"maintenance": 0,
|
||||||
"jsRedirect": 0,
|
"jsRedirect": 0,
|
||||||
"cfgAuthor": "dwho",
|
"cfgAuthor": "Cadoles",
|
||||||
"persistentStorageOptions": {
|
"persistentStorageOptions": {
|
||||||
"LockDirectory": "/var/lib/lemonldap-ng/psessions/lock",
|
"LockDirectory": "/var/lib/lemonldap-ng/psessions/lock",
|
||||||
"Directory": "/var/lib/lemonldap-ng/psessions"
|
"Directory": "/var/lib/lemonldap-ng/psessions"
|
||||||
@ -360,7 +371,7 @@
|
|||||||
"ldapChangePasswordAsUser": 0,
|
"ldapChangePasswordAsUser": 0,
|
||||||
"CAS_proxiedServices": {},
|
"CAS_proxiedServices": {},
|
||||||
"key": "e\"bTCt3*eU9^\\V%b",
|
"key": "e\"bTCt3*eU9^\\V%b",
|
||||||
"portal": "http://%%authWebName/",
|
"portal": "https://%%authWebName/",
|
||||||
"singleSessionUserByIP": 0,
|
"singleSessionUserByIP": 0,
|
||||||
"portalOpenLinkInNewWindow": 0,
|
"portalOpenLinkInNewWindow": 0,
|
||||||
"post": {
|
"post": {
|
||||||
@ -379,7 +390,7 @@
|
|||||||
"oidcOPMetaDataOptions": null,
|
"oidcOPMetaDataOptions": null,
|
||||||
"samlSPSSODescriptorWantAssertionsSigned": 1,
|
"samlSPSSODescriptorWantAssertionsSigned": 1,
|
||||||
"samlOrganizationName": "%%samlOrganizationName",
|
"samlOrganizationName": "%%samlOrganizationName",
|
||||||
"registerUrl": "http://%%authWebName/register.pl",
|
"registerUrl": "https://%%authWebName/register.pl",
|
||||||
"casAccessControlPolicy": "none",
|
"casAccessControlPolicy": "none",
|
||||||
"multiValuesSeparator": ";",
|
"multiValuesSeparator": ";",
|
||||||
"ldapPort": %%ldapServerPort
|
"ldapPort": %%ldapServerPort
|
||||||
|
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://%%eolesso_adresse/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 %%eolessoCALocation
|
||||||
|
%else
|
||||||
|
trusted_ca /etc/ssl/certs/ca.crt
|
||||||
|
%end if
|
Reference in New Issue
Block a user