Compare commits
6 Commits
pkg/dev/eo
...
fix-nginx
Author | SHA1 | Date | |
---|---|---|---|
8f33de7f55 | |||
a4a385a439 | |||
982c5f44ee | |||
1eb5faaa82 | |||
4f16447856 | |||
93ee02b73d |
63
README.md
63
README.md
@ -1,16 +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 https://lemonldap-ng.org/deb stable main
|
||||||
* deb-src https://lemonldap-ng.org/deb stable main
|
* deb-src https://lemonldap-ng.org/deb stable main
|
||||||
* Key URL : https://lemonldap-ng.org/_media/rpm-gpg-key-ow2
|
* 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
|
||||||
|
@ -14,3 +14,15 @@ def toCidr(ip,mask=False):
|
|||||||
return str(IP(data))
|
return str(IP(data))
|
||||||
except:
|
except:
|
||||||
return data
|
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"
|
@ -2,12 +2,12 @@
|
|||||||
<creole>
|
<creole>
|
||||||
<files>
|
<files>
|
||||||
<!-- Je suis un commentaire -->
|
<!-- Je suis un commentaire -->
|
||||||
<file filelist='lemon' name='/etc/nginx/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/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='/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'/>
|
||||||
|
<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>
|
||||||
@ -79,6 +79,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>
|
<variable name='nginxBucketSize'>server_names_hash_bucket_size Taille du hash des noms de serveur pour NGINX</variable>
|
||||||
</help>
|
</help>
|
||||||
</creole>
|
</creole>
|
||||||
|
@ -1 +1 @@
|
|||||||
creolefuncs_DATADIR := $(DESTDIR)/usr/share/creole/funcs
|
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
||||||
|
@ -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;
|
||||||
@ -45,7 +49,7 @@ server {
|
|||||||
location = /reload {
|
location = /reload {
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
%for ipaddr in %%ip_ssh_eth0
|
%for ipaddr in %%ip_ssh_eth0
|
||||||
allow %%toCidr(%%ipaddr, %%ipaddr.netmask_ssh_eth0)
|
allow %%toCidr(%%ipaddr, %%ipaddr.netmask_ssh_eth0);
|
||||||
%end for
|
%end for
|
||||||
deny all;
|
deny all;
|
||||||
include /etc/nginx/fastcgi_params;
|
include /etc/nginx/fastcgi_params;
|
||||||
|
@ -229,7 +229,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": {},
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
user www-data;
|
|
||||||
worker_processes auto;
|
|
||||||
pid /run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 768;
|
|
||||||
# multi_accept on;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
|
|
||||||
##
|
|
||||||
# Basic Settings
|
|
||||||
##
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
# server_tokens off;
|
|
||||||
|
|
||||||
server_names_hash_bucket_size %%nginxBucketSize;
|
|
||||||
# server_name_in_redirect off;
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
##
|
|
||||||
# SSL Settings
|
|
||||||
##
|
|
||||||
|
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
|
||||||
ssl_prefer_server_ciphers on;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Logging Settings
|
|
||||||
##
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Gzip Settings
|
|
||||||
##
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_disable "msie6";
|
|
||||||
|
|
||||||
# gzip_vary on;
|
|
||||||
# gzip_proxied any;
|
|
||||||
# gzip_comp_level 6;
|
|
||||||
# gzip_buffers 16 8k;
|
|
||||||
# gzip_http_version 1.1;
|
|
||||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Virtual Host Configs
|
|
||||||
##
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
include /etc/nginx/sites-enabled/*;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#mail {
|
|
||||||
# # See sample authentication script at:
|
|
||||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
|
||||||
#
|
|
||||||
# # auth_http localhost/auth.php;
|
|
||||||
# # pop3_capabilities "TOP" "USER";
|
|
||||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen localhost:110;
|
|
||||||
# protocol pop3;
|
|
||||||
# proxy on;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen localhost:143;
|
|
||||||
# protocol imap;
|
|
||||||
# proxy on;
|
|
||||||
# }
|
|
||||||
#}
|
|
Reference in New Issue
Block a user