#
# Copyright (C) 2000 - 2024 Silverpeas
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# As a special exception to the terms and conditions of version 3.0 of
# the GPL, you may redistribute this Program in connection with Free/Libre
# Open Source Software ("FLOSS") applications as described in Silverpeas's
# FLOSS exception.  You should have received a copy of the text describing
# the FLOSS exception, and it is also available here:
# "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# LDAP domain driver

# Settings OpenDJ Services
# ----------------------------------
database.encryptedCredentials=false
database.LDAPHost=localhost
database.LDAPImpl=openldap
database.LDAPPort=1389
database.LDAPProtocolVer=3
database.LDAPAccessLoginDN=cn=Directory Manager,cn=Root DNs,cn=config
database.LDAPAccessPasswd=password
database.LDAPUserBaseDN=ou=silverpeas,dc=example,dc=com
database.LDAPSecured=false
database.LDAPPortSecured=636
# !!! Client Time in MS !!!
database.LDAPMaxMsClientTimeLimit=0
# !!! Server Time in Seconds !!!
database.LDAPMaxSecServerTimeLimit=0
database.LDAPMaxNbEntryReturned=5000
database.LDAPMaxNbReferrals=0
database.LDAPBatchSize=5000
database.LDAPSearchRecurs=true
#To be able to use operational attributes
database.LDAPOpAttributesUsed=true

# Domain settings
#-----------------
# A coma separated list of look names that are available to the users of this domain
#domain.looks=

# Synchro parameters
# ------------------
#Mettre a true pour une synchronisation periodique
synchro.Threaded=false

# Users' settings
# ---------------
users.ClassName=person
# Note : the filter MUST be put between parentheses.
#        there MUSTN'T have dummy parentheses levels ex : (&((Condition1))(Condition2)) will NOT works, (&(Condition1)(Condition2)) will works
# (&(mail=*)(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=TSTEXCHANGE))
users.Filter=
# Note : To make domains easiest to change, the Id must be set to the login field
#        It's not an obligation but it's very strongly advised
# Note : The EmailField is by default considered as a potential sensitive data of a user.
users.IdField=entryUUID
#users.LoginField=uid
users.LoginField=cn
users.FirstNameField=givenName
users.LastNameField=sn
#pas obligatoire
users.EmailField=mail

# Groups' settings
# ----------------
#Depend de l'impl\u00e9mentation
groups.ClassName=groupOfNames
# Note : the filter MUST be put between parentheses.
#        there MUSTN'T have dummy parentheses levels ex : (&((Condition1))(Condition2)) will NOT works, (&(Condition1)(Condition2)) will works
# (&(objectCategory=CN=group,CN=Schema,CN=Configuration,DC=TSTEXCHANGE)(member=*))
groups.Filter=(member=*)
# Set the id Field to the 'cn' insteed of the DN to allow groups to move in the LDAP database
# Set to objectGUID to have a unique ID
groups.IdField=entryUUID


# Use org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupSubTree to access groups that are just node with users and sub-groups as sons
# Use org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupUniqueDescriptor to access groups that contains an attribute containing DN of all there sons
# Use org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupAllRoot to access groups that contains an attribute containing DN of all there sons AND to have ALL those groups at the root with all sub-users at the first level
#Mettre org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupAllRoot par defaut
groups.Type=org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupAllRoot

# For LDAPGroupUniqueDescriptor, LDAPGroupCTI and LDAPGroupAllRoot only :
# ---------------------------------------------------------
# The field that contains the child's DNs
groups.MemberField=uniqueMember
# If groups.SpecificGroupsBaseDN is not set, database.LDAPUserBaseDN is used as root for searchs
groups.SpecificGroupsBaseDN=ou=silverpeas,dc=example,dc=com

# For LDAPGroupAllRoot and LDAPGroupCTI only :
# ---------------------------
# ONLY PUT THIS VALUE TO TRUE FOR THE FIRST TIME THE SYNCHRO IS DONE WITH THE 'ALL ROOT' MODEL
# This inherit the profiles from parent groups to child groups
groups.InheritProfiles=false

# For LDAPGroupCTI only :
# ---------------------------
# Give the deph for group naming : 0 = no naming depth (use the groups.NameField value), 1 = only use the first element of the DN, x = use the firt x elements of the DN
groups.NamingDepth=2

# For LDAPGroupSubTree only :
# ---------------------------
groups.IncludeEmptyGroups=true

groups.NameField=cn
groups.DescriptionField=description

# USERS Specific Properties
# -------------------------

# Property number : from 1 to Number
# Available Types : STRING, USERID
# MapParameter : Name of the LDAP corresponding field
# Sensitive : is the property potentially a sensitive one? By default, false. Otherwise, the
# property could be considered as a sensitive data for some users; for them the sensitive data will
# be hidden to others users.

property.Number = 3
property.ResourceFile = org.silverpeas.domains.multilang.domainOpenDJBundle

property_1.Name = email
property_1.Type = STRING
property_1.MapParameter = mail
property_1.Sensitive = false

property_2.Name = city
property_2.Type = STRING
property_2.MapParameter = l
property_2.Sensitive = false

property_3.Name = postal_code
property_3.Type = STRING
property_3.MapParameter = postalCode
property_3.Sensitive = false