Compare commits
42 Commits
fix-nginx
...
pkg/dev/eo
Author | SHA1 | Date | |
---|---|---|---|
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
|
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, libmouse-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)
|
@ -7,6 +7,10 @@
|
||||
<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='/etc/lemonldap-ng/lemonldap-ng.ini' 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'>
|
||||
<port service_accesslist="saLemon">80</port>
|
||||
@ -38,11 +42,36 @@
|
||||
</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='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>
|
||||
@ -64,6 +93,9 @@
|
||||
</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>
|
||||
@ -71,9 +103,22 @@
|
||||
<condition name='disabled_if_in' source='activerLemon'>
|
||||
<param>non</param>
|
||||
<target type='filelist'>lemon</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>
|
||||
<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 +126,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>
|
||||
|
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
|
||||
?>
|
@ -112,10 +112,14 @@ localStorageOptions={ \
|
||||
|
||||
; 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
|
||||
|
@ -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": {
|
||||
@ -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\""
|
||||
@ -389,7 +426,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
|
||||
|
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
|
Reference in New Issue
Block a user