Import de la config de slapd dans BCfg2
En passant, on passe au mode de rplication 'SyncRepl', qui permet une rplication from scratch sans dump de la base parente. darcs-hash:20080925004118-ffbb2-b6de13342ee17d92c37030f37b7e9c63a93cc628.gz
This commit is contained in:
parent
bfb6c05cfe
commit
df01def771
5 changed files with 547 additions and 2 deletions
326
Cfg/etc/ldap/schema/crans.schema/crans.schema
Normal file
326
Cfg/etc/ldap/schema/crans.schema/crans.schema
Normal file
|
@ -0,0 +1,326 @@
|
|||
#
|
||||
# Définitions des attributs et objets pour le Crans
|
||||
#
|
||||
# Géré par BCfg2 (plugin Cfg)
|
||||
#
|
||||
# L'OID 1.3.6.1.4.1.25368 a été attribuée au Crans par l'IANA
|
||||
# * OID attributs : 1.3.6.1.4.1.25368.2.*
|
||||
# * OID classes : 1.3.6.1.4.1.25368.3.*
|
||||
#
|
||||
|
||||
# Les attributs
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.1 NAME 'aid'
|
||||
DESC 'Adhérent Identifier'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.2 NAME 'nom'
|
||||
DESC 'Nom adhérent'
|
||||
SUP name )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.3 NAME 'prenom'
|
||||
DESC 'Prénom adhérent'
|
||||
SUP name )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.4 NAME 'tel'
|
||||
DESC 'Numéro de téléphone adhérent'
|
||||
EQUALITY telephoneNumberMatch
|
||||
SUBSTR telephoneNumberSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.5 NAME 'paiement'
|
||||
DESC 'Année de paiement adhérent'
|
||||
EQUALITY integerMatch
|
||||
ORDERING integerOrderingMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.6 NAME 'carteEtudiant'
|
||||
DESC 'Année de carte étudiant fournie'
|
||||
EQUALITY integerMatch
|
||||
ORDERING integerOrderingMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.7 NAME 'mailAlias'
|
||||
DESC 'Alias mail'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.8 NAME 'canonicalAlias'
|
||||
DESC 'Alias mail canonique'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.9 NAME 'etudes'
|
||||
DESC 'Études adhérent'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.10 NAME 'chbre'
|
||||
DESC 'Chambre adhérent'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.11 NAME 'historique'
|
||||
DESC 'Historique de modifications'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{2048} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.12 NAME 'droits'
|
||||
DESC 'Droits adhérent'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.13 NAME 'ipsec'
|
||||
DESC 'Clef IPsec machine'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{64} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.14 NAME 'blacklist'
|
||||
DESC 'Services bloqués à un adhérent ou une machine'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{2048} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.15 NAME 'mid'
|
||||
DESC 'Machine Identifier'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.16 NAME 'hostAlias'
|
||||
DESC 'Alias nom de machine'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.17 NAME 'cid'
|
||||
DESC 'Club Identifier'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.18 NAME 'responsable'
|
||||
DESC 'Aid du responsable club'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.19 NAME 'puissance'
|
||||
DESC 'Puissance borne wifi'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.20 NAME 'canal'
|
||||
DESC 'Canal borne wifi'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.21 NAME 'lockid'
|
||||
DESC 'Id du lock : machine-pid'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{512} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.22 NAME 'args'
|
||||
DESC 'Arguments du service à redémarrer'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{2048} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.23 NAME 'portTCPout'
|
||||
DESC 'Ports TCP spécifiques à ouvrir dans le firewall vers extérieur'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.24 NAME 'portTCPin'
|
||||
DESC 'Ports TCP spécifiques à ouvrir dans le firewall vers crans'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.25 NAME 'portUDPout'
|
||||
DESC 'Ports UPD spécifiques à ouvrir dans le firewall vers extérieur'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.26 NAME 'portUDPin'
|
||||
DESC 'Ports UDP spécifiques à ouvrir dans le firewall vers crans'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.27 NAME 'prise'
|
||||
DESC 'Chambre adhérent'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.28 NAME 'solde'
|
||||
DESC 'Solde du compte'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.29 NAME 'exempt'
|
||||
DESC 'Réseau vers lequel le trafic est exempté'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.30 NAME 'start'
|
||||
DESC 'Date de démarrage service'
|
||||
EQUALITY integerMatch
|
||||
ORDERING integerOrderingMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.31 NAME 'controle'
|
||||
DESC 'Controle trésorier'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.32 NAME 'contourneGreylist'
|
||||
DESC 'Contourne le greylisting (OK/absent)'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.33 NAME 'rewriteMailHeaders'
|
||||
DESC 'Réécriture de l\27adresse mail avec l\27alias canonique (TRUE/absent)'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.34 NAME 'hotspot'
|
||||
DESC 'Borne partagée avec l\27ENS (TRUE/FALSE)'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.35 NAME 'positionBorne'
|
||||
DESC 'Coordonnées d\27une borne wifi'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{32} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.37 NAME 'nvram'
|
||||
DESC 'Configuration spéciale d\27une borne'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.38 NAME 'derniereConnexion'
|
||||
DESC 'Date de dernière connexion'
|
||||
EQUALITY integerMatch
|
||||
ORDERING integerOrderingMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.39 NAME 'fid'
|
||||
DESC 'Facture Identifier'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.40 NAME 'modePaiement'
|
||||
DESC 'Mode de paiement de la facture'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.41 NAME 'article'
|
||||
DESC 'Article'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.42 NAME 'recuPaiement'
|
||||
DESC 'Definit si la facture a été payée (valeur absente = facture non payée)'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.43 NAME 'homepageAlias'
|
||||
DESC 'Alias pour la page perso'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.44 NAME 'mailInvalide'
|
||||
DESC 'Adresse mail invalide (TRUE/absent)'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.45 NAME 'charteMA'
|
||||
DESC 'Charte des membres actifs signee (TRUE : signee)'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.46 NAME 'adherentPayant'
|
||||
DESC 'Adhérent payant son adhésion (TRUE : il paye)'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.25368.2.47 NAME 'imprimeurClub'
|
||||
DESC 'Imprimeur pour le club'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
# Les classes
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.1 NAME 'proprio' SUP top ABSTRACT
|
||||
DESC 'Propriétaire (classe abstraite)'
|
||||
MUST ( nom $ chbre $ historique )
|
||||
MAY ( paiement $ info $ blacklist $ controle) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.2 NAME 'adherent' SUP proprio
|
||||
DESC 'Adhérent'
|
||||
MUST ( aid $ prenom $ tel $ mail )
|
||||
MAY ( carteEtudiant $ etudes $ postalAddress $ mailInvalide $ charteMA $
|
||||
adherentPayant ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.3 NAME 'club' SUP proprio
|
||||
DESC 'Club'
|
||||
MUST ( cid $ responsable )
|
||||
MAY ( imprimeurClub ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.10 NAME 'machine' SUP top ABSTRACT
|
||||
DESC 'Machine (classe abstraite)'
|
||||
MUST ( mid $ macAddress $ host $ ipHostNumber $ historique )
|
||||
MAY ( info $ blacklist $ hostAlias $ exempt $
|
||||
portTCPin $ portTCPout $ portUDPin $ portUDPout ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.11 NAME 'machineCrans' SUP machine
|
||||
DESC 'Machine appartenant au Crans'
|
||||
MAY ( prise ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.12 NAME 'borneWifi' SUP machine
|
||||
DESC 'Borne wifi'
|
||||
MUST ( canal $ puissance $ hotspot )
|
||||
MAY ( prise $ positionBorne $ nvram ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.13 NAME 'machineWifi' SUP machine
|
||||
DESC 'Machine wifi'
|
||||
MUST ( ipsec ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.14 NAME 'machineFixe' SUP machine
|
||||
DESC 'Machine adhérent fixe' )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.20 NAME 'cransAccount' SUP top AUXILIARY
|
||||
DESC 'Compte Crans'
|
||||
MAY ( mailAlias $ canonicalAlias $ droits $ solde $
|
||||
contourneGreylist $ rewriteMailHeaders $ derniereConnexion $
|
||||
homepageAlias ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.21 NAME 'lock'
|
||||
DESC 'Système de lock pour édition'
|
||||
MUST ( lockid )
|
||||
MAY ( aid $ chbre $ mail $ mailAlias $ canonicalAlias $ uidNumber $
|
||||
mid $ macAddress $ host $ hostAlias $ ipHostNumber $
|
||||
cid $ fid ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.22 NAME 'service'
|
||||
DESC 'Service à redémarrer'
|
||||
MUST ( cn )
|
||||
MAY ( args $ start ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.25368.3.23 NAME 'facture'
|
||||
DESC 'Facture'
|
||||
MUST ( fid $ modePaiement )
|
||||
MAY ( article $ recuPaiement $ historique ) )
|
4
Cfg/etc/ldap/schema/crans.schema/info.xml
Normal file
4
Cfg/etc/ldap/schema/crans.schema/info.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<FileInfo>
|
||||
<Info owner='root' group='root' perms='0644' encoding='base64'/>
|
||||
</FileInfo>
|
||||
|
|
@ -723,7 +723,7 @@
|
|||
|
||||
<Group name="slapd"
|
||||
comment="serveur de base de données ldap">
|
||||
<!-- TODO: a implementer -->
|
||||
<Bundle name="slapd"/>
|
||||
</Group>
|
||||
|
||||
<Group name="pgsql"
|
||||
|
|
48
Python/etc/default/slapd
Normal file
48
Python/etc/default/slapd
Normal file
|
@ -0,0 +1,48 @@
|
|||
# -*- mode: python -*-
|
||||
|
||||
include("ip")
|
||||
|
||||
header('Fichier de configuration du démon slapd')
|
||||
|
||||
@Default location of the slapd.conf file
|
||||
@SLAPD_CONF=
|
||||
@
|
||||
@# System account to run the slapd server under. If empty the server
|
||||
@# will run as root.
|
||||
@SLAPD_USER=
|
||||
@
|
||||
@# System group to run the slapd server under. If empty the server will
|
||||
@# run in the primary group of its user.
|
||||
@SLAPD_GROUP=
|
||||
@
|
||||
@# Path to the pid file of the slapd server. If not set the init.d script
|
||||
@# will try to figure it out from $SLAPD_CONF (/etc/ldap/slapd.conf)
|
||||
@SLAPD_PIDFILE=
|
||||
@
|
||||
@# Configure if db_recover should be called before starting slapd
|
||||
@TRY_BDB_RECOVERY=yes
|
||||
@
|
||||
@# Configure if the slurpd daemon should be started. Possible values:
|
||||
@# - yes: Always start slurpd
|
||||
@# - no: Never start slurpd
|
||||
@# - auto: Start slurpd if a replica option is found in slapd.conf (default)
|
||||
@SLURPD_START=no
|
||||
@
|
||||
@# slapd normally serves ldap only on all TCP-ports 389. slapd can also
|
||||
@# service requests on TCP-port 636 (ldaps) and requests via unix
|
||||
@# sockets.
|
||||
@# Example usage:
|
||||
@SOCKET_PATH="/var/run/slapd/ldapi"
|
||||
|
||||
slapd_services = ["ldap://127.0.0.1/", "ldapi:///"]
|
||||
slapd_services += ["ldap://%s/" % admip()]
|
||||
|
||||
if has("sable"):
|
||||
slapd_services += ["ldaps://%s/" % pubip()]
|
||||
|
||||
print 'SLAPD_SERVICES="%s"' % ' '.join(slapd_services)
|
||||
@
|
||||
@# Additional options to pass to slapd and slurpd
|
||||
@SLAPD_OPTIONS=""
|
||||
@SLURPD_OPTIONS=""
|
||||
@
|
167
Python/etc/ldap/slapd.conf
Normal file
167
Python/etc/ldap/slapd.conf
Normal file
|
@ -0,0 +1,167 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
|
||||
include("ip")
|
||||
|
||||
header("Serveur LDAP")
|
||||
|
||||
@#######################################################################
|
||||
@# Directives globales:
|
||||
@
|
||||
@# On permet le binding en version 2 pour login_ldap sur ragnarok
|
||||
@allow bind_v2
|
||||
@
|
||||
@# Définition des schémas et objectClasses
|
||||
@include /etc/ldap/schema/core.schema
|
||||
@include /etc/ldap/schema/cosine.schema
|
||||
@include /etc/ldap/schema/nis.schema
|
||||
@include /etc/ldap/schema/inetorgperson.schema
|
||||
@include /etc/ldap/schema/amavis.schema
|
||||
@include /etc/ldap/schema/crans.schema
|
||||
@
|
||||
@# Vérification de conformance au schéma pour les objets
|
||||
@schemacheck on
|
||||
@
|
||||
@# Emplacement du pidfile
|
||||
@pidfile /var/run/slapd/slapd.pid
|
||||
@
|
||||
@# Arguments passés au serveur
|
||||
@argsfile /var/run/slapd/slapd.args
|
||||
@
|
||||
@# Niveau de journalisation
|
||||
@loglevel 0
|
||||
@
|
||||
@# Stockage des modules
|
||||
@modulepath /usr/lib/ldap
|
||||
@moduleload back_bdb
|
||||
@
|
||||
@# Limitation du nombre de réponses
|
||||
@sizelimit 1000000000
|
||||
@
|
||||
@# Méthode pour crypter les mots de passe
|
||||
@password-hash {SSHA}
|
||||
@
|
||||
|
||||
if has("sable"):
|
||||
@# Configuration TLS pour la connexion à partir de ragnarok (login-ldap)
|
||||
@TLSCipherSuite HIGH:MEDIUM:+SSLv3
|
||||
@TLSCertificateFile /etc/ssl/certs/sable_server.pem
|
||||
@TLSCertificateKeyFile /etc/ssl/private/sable_privatekey.pem
|
||||
@TLSCACertificateFile /etc/ssl/certs/root.pem
|
||||
@TLSVerifyClient never
|
||||
|
||||
@#######################################################################
|
||||
@# Directives de configuration pour le backend bdb
|
||||
@backend bdb
|
||||
@
|
||||
@#######################################################################
|
||||
@# Configuration de la base de données principale
|
||||
@database bdb
|
||||
@
|
||||
@# Base de recherche principale
|
||||
@suffix "dc=crans,dc=org"
|
||||
@
|
||||
@# Répertoire de stockage de la base de données
|
||||
@directory "/var/lib/ldap"
|
||||
@
|
||||
@# Options d'indexation pour la base de données
|
||||
@index entryUUID,entryCSN eq
|
||||
@index objectClass,memberUid,uid,uidNumber eq
|
||||
@index cn,sn eq,approx,sub
|
||||
@index mailAlias,mail,canonicalAlias eq
|
||||
@index macAddress eq
|
||||
@index nom,host,hostAlias eq,approx,sub
|
||||
@index chbre eq,subinitial
|
||||
@index paiement,droits eq
|
||||
@
|
||||
@# Sauvegarde des timestamps de modifications des objets
|
||||
@lastmod on
|
||||
@
|
||||
|
||||
if has("db-main"):
|
||||
@# Overlay pour la synchronisation par syncprov
|
||||
@overlay syncprov
|
||||
@syncprov-checkpoint 100 10
|
||||
@syncprov-sessionlog 100
|
||||
|
||||
else:
|
||||
include("secrets")
|
||||
rid = admip()
|
||||
# L'identifiant du réplica est choisi comme étant la dernière partie de l'adresse ip
|
||||
rid = rid[rid.rfind(".")+1:]
|
||||
@# Réplication de la base
|
||||
@# LDAP a besoin de la déclaration du rootdn
|
||||
@rootdn="cn=damin,dc=crans,dc=org"
|
||||
@
|
||||
@# SyncRepl
|
||||
print "syncrepl rid=%s" % rid
|
||||
@ provider ldap://vert.adm.crans.org
|
||||
@ searchbase="dc=crans,dc=org"
|
||||
@ schemachecking=on
|
||||
@ type=refreshAndPersist
|
||||
print ' binddn="%s"' % secrets.ldap_replica_auth_dn
|
||||
@ bindmethod=simple
|
||||
print ' credentials=%s' % secrets.ldap_replica_password
|
||||
@ retry="30 20 300 3"
|
||||
@
|
||||
@# Redirection des requêtes en écriture, ...
|
||||
@updateref ldap://vert.adm.crans.org
|
||||
|
||||
@
|
||||
@# L'attribut userPassword doit pouvoir être écrit uniquement par
|
||||
@# soi-même, l'admin, les replicas. Dovecot peut le lire, et on peut
|
||||
@# s'authentifier avec anonymement
|
||||
@
|
||||
@access to attrs=userPassword
|
||||
@ by dn.regex="cn=admin,dc=crans,dc=org" write
|
||||
@ by dn.regex="cn=replica,dc=crans,dc=org" write
|
||||
@ by dn.regex="cn=dovecot,dc=crans,dc=org" read
|
||||
@ by anonymous auth
|
||||
@ by self write
|
||||
@ by * none
|
||||
@
|
||||
@# Permettre l'accès à la base pour des trucs comme
|
||||
@# "supportedSASLMechanisms", pour éviter des problèmes
|
||||
@# possibles si les méthodes SASL ne sont pas connues.
|
||||
@access to dn.base="" by * read
|
||||
@
|
||||
@# Pour postfix
|
||||
@access to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$"
|
||||
@ attrs=mailAlias,canonicalAlias,uid,mail,entry,objectClass,contourneGreylist,rewriteMailHeaders
|
||||
@ by dn.regex="cn=postfix,dc=crans,dc=org" read
|
||||
@ by * break
|
||||
@
|
||||
@# Pour intranet
|
||||
@access to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$"
|
||||
@ attrs=uid,entry,objectClass
|
||||
@ by dn.regex="cn=intranet,dc=crans,dc=org" read
|
||||
@ by * break
|
||||
@
|
||||
@# Pour dovecot
|
||||
@access to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$"
|
||||
@ attrs=uid,homeDirectory,uidNumber,gidNumber,userPassword,objectClass,entry
|
||||
@ by dn.regex="cn=dovecot,dc=crans,dc=org" read
|
||||
@ by * break
|
||||
@
|
||||
@# Informations accessibles à tous
|
||||
@access to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$"
|
||||
@ attrs=uid,homeDirectory,uidNumber,gidNumber,gecos,objectClass,entry
|
||||
@ by anonymous read
|
||||
@ by * break
|
||||
@
|
||||
@access to dn="ou=data,dc=crans,dc=org"
|
||||
@ by anonymous search
|
||||
@ by * break
|
||||
@
|
||||
@access to dn.subtree="ou=Group,dc=crans,dc=org"
|
||||
@ by anonymous read
|
||||
@ by * break
|
||||
@
|
||||
@# L'admin et la réplication peut tout lire
|
||||
@# can read everything.
|
||||
@access to *
|
||||
@ by dn.regex="cn=admin,dc=crans,dc=org" write
|
||||
@ by dn.regex="cn=replica,dc=crans,dc=org" write
|
||||
@ by sockname.regex="ldapi" read
|
||||
@ by dn.regex="cn=readonly,dc=crans,dc=org" read
|
||||
@ by self read
|
||||
@ by * none
|
Loading…
Add table
Add a link
Reference in a new issue