#
# 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 MS Active directory 2000
# ---------------------------------
database.LDAPHost=192.168.0.111
database.LDAPPort=389
#LDAP over TLS
database.LDAPSecured=false
database.LDAPPortSecured=636

database.encryptedCredentials=false
database.LDAPProtocolVer=3
database.LDAPAccessLoginDN=CN=bob,CN=Users,DC=TOTO,DC=BOB
database.LDAPAccessPasswd=bob
database.LDAPUserBaseDN=OU=Utilisateurs,OU=testSynchro,DC=toto,DC=bob
# !!! 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

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

# Synchro parameters
# ------------------

# modifyTimeStamp or uSNChanged or whenChanged (20041104131450.0Z)

synchro.Threaded=false

# Users' settings
# ---------------
users.ClassName=user
# 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=SILVERDEV))
# users.Filter=(mail=*)
users.Filter=(sn=*)
# 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=sAMAccountName
users.IdField=objectGUID
users.LoginField=sAMAccountName
users.FirstNameField=givenName
users.LastNameField=sn
users.EmailField=mail

# Account deactivation : the value of this attribute handles several account parameters by range of flag (bits, so 0 or 1)
# So, users.accountControl.disabledFlags must define the flag that permits to verify that an account is deactivated.
# By default, the value of the second bit is verified as explained from http://www.selfadsi.org/ads-attributes/user-userAccountControl.htm
users.accountControl=userAccountControl
users.accountControl.disabledFlags=2

# Groups' settings
# ----------------
groups.ClassName=group
# 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=SILVERDEV)(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=objectGUID

# 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
groups.Type=org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupAllRoot

# For LDAPGroupUniqueDescriptor and LDAPGroupAllRoot only :
# ---------------------------------------------------------
# The field that contains the child's DNs
groups.MemberField=member
# If groups.SpecificGroupsBaseDN is not set, database.LDAPUserBaseDN is used as root for searchs
groups.SpecificGroupsBaseDN=OU=Groupes,OU=testSynchro,DC=toto,DC=bob

# For LDAPGroupAllRoot 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 LDAPGroupSubTree only :
# ---------------------------
groups.IncludeEmptyGroups=true

groups.NameField=name
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 = 9
property.ResourceFile = org.silverpeas.domains.multilang.domainLDAPBundle

property_1.Name = title
property_1.Type = STRING
property_1.MapParameter = title
property_1.UsedToImport = true
property_1.Sensitive = false

property_2.Name = office
property_2.Type = STRING
property_2.MapParameter = physicalDeliveryOfficeName
property_2.UsedToImport = true
property_2.Sensitive = false

property_3.Name = position
property_3.Type = STRING
property_3.MapParameter = department
property_3.Sensitive = false

property_4.Name = boss
property_4.Type = USERID
property_4.MapParameter = manager
property_4.Sensitive = false

property_5.Name = phone
property_5.Type = STRING
property_5.MapParameter = telephoneNumber
property_5.Sensitive = false

property_6.Name = homePhone
property_6.Type = STRING
property_6.MapParameter = homePhone
property_6.Sensitive = false

property_7.Name = fax
property_7.Type = STRING
property_7.MapParameter = facsimileTelephoneNumber
property_7.Sensitive = false

property_8.Name = cellularPhone
property_8.Type = STRING
property_8.MapParameter = mobile
property_8.Sensitive = false

property_9.Name = address
property_9.Type = STRING
property_9.MapParameter = streetAddress
property_9.Sensitive = false