Compare commits

..

34 Commits

Author SHA1 Message Date
08ed6a21dc Merge branch 'master' into dist/eole/2.6.2/master 2018-03-26 11:31:14 +02:00
5f5c5359f7 Fixing Custom URL option 2018-03-26 11:21:28 +02:00
51519eae55 Adding Custom Register URL option to template 2018-03-26 11:05:26 +02:00
2afe4dceb4 GenConfig clean up 2018-03-26 09:56:38 +02:00
0f25183778 ajout du template lemonldap-ng.ini et utilisation de la variable llSkin 2018-03-23 16:56:54 +01:00
a4a3d52746 ajout variable llSkin 2018-03-23 16:22:02 +01:00
a5ce48110d Adding SSO auth page customisation 2018-03-23 16:13:40 +01:00
faf2a361db Merge branch 'master' into dist/eole/2.6.2/master 2018-03-21 15:31:05 +01:00
61b982607e Fixing filter generation when no filter file is present in the server 2018-03-21 15:03:50 +01:00
7ae579b670 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-21 14:22:00 +01:00
a91abb36f3 Remove all references to eole-sso variable 2018-03-21 14:21:46 +01:00
baa4dca9de Merge branch 'master' into dist/eole/2.6.2/master 2018-03-21 14:18:42 +01:00
710ea85f96 443 port is mandatory for lemonLDAP 2018-03-21 14:18:12 +01:00
849c3f0a88 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-21 14:15:00 +01:00
d3897f1e4a Begin of Eole-SSO replacement work
We need to provide what EoleSSO provides.

For me this 3 new template have to be placed in a dedicated package
like eole-sso-client, this templates are not necessary for the server
only usefull for the clients.
2018-03-21 14:13:15 +01:00
6f1cb45eac Merge branch 'master' into dist/eole/2.6.2/master 2018-03-21 12:29:44 +01:00
4916317d30 Setting up an conflict with eole-sso, this replace eole-sso so
we had also a Provides eole-sso
2018-03-21 12:29:09 +01:00
b7556a03b8 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-19 16:12:38 +01:00
f1defd2626 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-16 10:49:06 +01:00
7269e252de Merge branch 'master' into dist/eole/2.6.2/master 2018-03-13 10:49:05 +01:00
9e64f5ca8d Merge branch 'master' into dist/eole/2.6.2/master 2018-03-13 10:24:36 +01:00
84f41d0196 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-09 16:10:23 +01:00
b90eb474f5 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-09 15:08:45 +01:00
d69f20c896 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-09 14:30:05 +01:00
658013c177 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-09 12:01:42 +01:00
35edad1538 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 16:58:04 +01:00
32d336e37b Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 16:51:00 +01:00
4b26fc5c38 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 16:38:06 +01:00
904abd02a4 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 16:11:59 +01:00
e2f656f9f8 Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 16:04:28 +01:00
e5ada4d3eb Merge branch 'master' into dist/eole/2.6.2/master 2018-03-08 15:47:47 +01:00
dab8085a83 Adding missing Depends for eole-lemonldap 2018-03-06 16:12:59 +01:00
ad490d3810 Fix typo 2018-03-05 16:55:22 +01:00
0fc774cd05 Adding Debian packaging 2018-03-05 16:48:11 +01:00
14 changed files with 234 additions and 26 deletions

View File

@ -32,35 +32,31 @@ def getSSOFilters():
"""
import glob
from ConfigParser import ConfigParser
import json
try:
filters = {}
filters = { 'uid': "uid", "mail": "mail" }
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])
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)
for k,v in filters.items():
res += " \"{0}\": \"{1}\",".format(k,v)
res += " \"{0}\": \"{1}\"".format(k,v)
index += 1
if index != size:
res += "\n"
res += ",\n"
return(res)
except:
return "Error Generating Filters"

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

20
debian/control vendored Normal file
View 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
View 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
View File

@ -0,0 +1,3 @@
# Set per distribution debian tag
[DEFAULT]
debian-tag = debian/eole/%(version)s

8
debian/rules vendored Executable file
View 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

Binary file not shown.

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -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
View 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
?>

View File

@ -0,0 +1,7 @@
<?php
%if %%mode_conteneur_actif != "non"
define("__CAS_IP", "%%adresse_ip_br0");
%else
define("__CAS_IP", "false");
%end if
?>

View File

@ -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

View File

@ -25,7 +25,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 +39,9 @@
"%%managerWebName": {}
},
"vhostOptions": {
"%%managerWebName": {},
"%%managerWebName": {
"vhostHttps" : "1"
},
"test1.%%nom_domaine_local": {},
"test2.%%nom_domaine_local": {}
},
@ -159,12 +161,10 @@
"ldapUsePasswordResetAttribute": 1,
"ldapPpolicyControl": 0,
"casAttributes": {
"uid":"uid",
%%getSSOFilters
%for att in %%casAttribute
"%%att": "%%att.casLDAPAttribute",
%end for
"mail":"mail"
%%getSSOFilters
},
"issuerDBSAMLPath": "^/saml/",
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
@ -197,7 +197,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,
@ -214,7 +218,11 @@
"slaveAuthnLevel": 2,
"samlIDPSSODescriptorSingleLogoutServiceHTTPPost": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/singleLogout;#PORTAL#/saml/singleLogoutReturn",
"Soap": 1,
"registerDB": "Demo",
%if %%llRegisterDB == "Custom"
"registerDB": "Null",
%else
"registerDB": "%%llRegisterDB",
%end if
"locationRules": {
"%%managerWebName": {
"default": "$uid eq \"%%lemonAdmin\""
@ -344,7 +352,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\""
@ -390,7 +402,11 @@
"oidcOPMetaDataOptions": null,
"samlSPSSODescriptorWantAssertionsSigned": 1,
"samlOrganizationName": "%%samlOrganizationName",
%if %%llRegisterDB == "Custom"
"registerUrl": "%%llRegisterURL",
%else
"registerUrl": "https://%%authWebName/register.pl",
%end if
"casAccessControlPolicy": "none",
"multiValuesSeparator": ";",
"ldapPort": %%ldapServerPort

35
tmpl/pam_cas_auth.conf Normal file
View 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