项目作者: hthaller

项目描述 :
Ansible role for the installation and configuration of a 389 directory server on CentOS8/RHEL8 systems
高级语言: Jinja
项目地址: git://github.com/hthaller/389ds.git
创建时间: 2020-10-21T08:11:39Z
项目社区:https://github.com/hthaller/389ds

开源协议:GNU General Public License v3.0

下载


389ds

This role installs the 389 Directory Server (389ds) on RedHat or CentOS servers.

Features

  • Installation of
    • Standalone LDAP servers
    • Supplier nodes (incl. multi master configurations)
    • Consumer nodes
  • Setup of TLS and encryption settings
    • Management of supported ciphers
    • Enforce minimal and maximal TLS version
    • Interface for certificate requests and renewals
  • Support for multiple nsslapd instances per server
  • Support for multiple suffixes per instance
  • Management of any plugin (configure plugin attributes, enable/disable plugin on all or some named hosts)
  • Add custom schema files
  • LDAP settings under in these containers are Ansible managed:
    • cn=config
    • cn=config,cn=ldbm database,cn=plugins,cn=config
    • cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config
  • Creation of LDAP indexes
  • Creation of VLV indexes
  • Management of replication topology

Requirements

  • Ansible 2.9 or newer
  • CentOS 8.3 or RHEL 8.3

Example

Note: You should consider to embed the 389ds role in your own host_ldap role, which contains the company specific configuration (e.g. schema files, certificate scripts and your tested 389ds configuration).

  1. # this variable defines the list of ldap supplier nodes
  2. # it is used in the ds_app variable and not by the role itself
  3. host_ldap_supplier:
  4. - name: 'master1.example.com'
  5. replicaid: 1
  6. initialmaster: true
  7. - name: 'master2.example.com'
  8. replicaid: 2
  9. - name: 'master3.example.com'
  10. replicaid: 3
  11. # this variable holds the whole configuration
  12. ds_app:
  13. # DN for directory manager
  14. dm_dn: 'cn=directory manager'
  15. # Password for directory manager
  16. dm_pasword: 'my_secret'
  17. # Here you can define one or more 389ds instances
  18. instance:
  19. # Instance name
  20. - name: 'example'
  21. # Overwrites the password for this instance
  22. dm_password: 'my_secret_for_this_instance'
  23. # Password for the replication manager account (not necessary for standalone LDAP servers)
  24. initial_replication_manager_password: 'repl_pw'
  25. secure_port: 636
  26. port: 389
  27. tls: 'on'
  28. encryption:
  29. selfsigned_certs: false
  30. ca_files:
  31. - '{{ host_ldap_role_path }}/templates/certs/ca_files/MyCompanyRootCA.cer'
  32. request_certscript: '{{ host_ldap_role_path }}/templates/certs/bin/request_cert.sh'
  33. get_certscript: ''{{ host_ldap_role_path }}/templates/certs/bin/get_cert.sh'
  34. directory_certs: '{{ host_ldap_role_path }}/templates/certs/hosts'
  35. certificate:
  36. alternates:
  37. - "{{ inventory_hostname.split('.', 1)[0] }}"
  38. - "ldap1.example.com"
  39. - "{{ inventory_hostname }}"
  40. subject: 'CN={{ inventory_hostname }},O=My Company,L=Klagenfurt,ST=Kärnten,C=AT'
  41. renew_before_exp_days: "180"
  42. attributes:
  43. nsSSL3Ciphers: '+all,-fortezza_null,-fortezza,-rsa_null_sha,-fortezza_rc4_128_sha,-rsa_null_md5,-TLS_RSA_WITH_AES_128_GCM_SHA256,-TLS_RSA_WITH_AES_128_GCM_SHA256'
  44. sslVersionMin: 'TLS1.0'
  45. nsSSLClientAuth: 'allowed'
  46. nsTLS1: 'on'
  47. # Schema files for this instance
  48. custom_schema_files:
  49. - '{{ host_ldap_role_path }}/templates/schema/94ssh.ldif'
  50. - '{{ host_ldap_role_path }}/templates/schema/98kerberos.ldif'
  51. # settings for cn=config
  52. config:
  53. nsslapd-ssl-check-hostname: 'on'
  54. nsslapd-maxdescriptors: 16384
  55. #nsslapd-sizelimit: -1
  56. #nsslapd-pagedsizelimit: 0
  57. nsslapd-sizelimit: "{{ nsslapd_sizelimit | default(1000) }}"
  58. nsslapd-pagedsizelimit: "{{ nsslapd_pagedsizelimit | default(1001) }}"
  59. nsslapd-timelimit: -1
  60. nsslapd-idletimeout: 3600
  61. nsslapd-ndn-cache-max-size: 209715200
  62. nsslapd-auditlog-logging-enabled: 'on'
  63. nsslapd-errorlog-logging-enabled: 'on'
  64. nsslapd-accesslog-logging-enabled: 'on'
  65. nsslapd-auditlog-maxlogsperdir: 10
  66. nsslapd-auditlog-logexpirationtime: 4
  67. nsslapd-auditlog-logmaxdiskspace: 1000
  68. nsslapd-auditlog-logminfreediskspace: 500
  69. nsslapd-errorlog-level: 16384
  70. nsslapd-errorlog-maxlogsperdir: 10
  71. nsslapd-errorlog-logexpirationtime: 4
  72. nsslapd-errorlog-logmaxdiskspace: 1000
  73. nsslapd-errorlog-logminfreediskspace: 500
  74. nsslapd-accesslog-maxlogsperdir: 10
  75. nsslapd-accesslog-logexpirationtime: 4
  76. nsslapd-accesslog-logmaxdiskspace: 1000
  77. nsslapd-accesslog-logminfreediskspace: 500
  78. nsslapd-pwpolicy-local: 'on'
  79. passwordLockout: 'on'
  80. passwordExp: 'on'
  81. passwordHistory: 'on'
  82. passwordCheckSyntax: 'on'
  83. passwordMaxAge: 31536000
  84. passwordMinLength: 15
  85. passwordWarning: 0
  86. passwordInHistory: 5
  87. passwordMinCategories: 4
  88. passwordLockoutDuration: 1800
  89. passwordMaxFailure: 10
  90. # settings for cn=config,cn=ldbm database,cn=plugins,cn=config
  91. ldbm_database:
  92. config:
  93. nsslapd-lookthroughlimit: -1
  94. nsslapd-idlistscanlimit: 25000
  95. # settings for cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config
  96. bdb:
  97. # see RH ticket #02857953
  98. nsslapd-db-locks: 100000
  99. nsslapd-import-cache-autosize: 20
  100. # Plugin configuration. The name must match the plugin name in 389ds
  101. plugin:
  102. - name: 'Retro Changelog Plugin'
  103. attributes:
  104. nsslapd-changelogmaxage: '7d'
  105. status:
  106. enabled: "{{ host_ldap_supplier | map(attribute='name') | list }}"
  107. disabled: []
  108. - name: 'MemberOf Plugin'
  109. attributes:
  110. memberofgroupattr: uniqueMember
  111. memberofattr: memberOf
  112. memberOfEntryScope: 'dc=example,dc=com'
  113. status:
  114. enabled: "{{ host_ldap_supplier | map(attribute='name') | list }}"
  115. # suffix configuration for the instance
  116. suffix:
  117. - name: 'dc=example,dc=com'
  118. replication:
  119. supplier:
  120. server: "{{ host_ldap_supplier }}"
  121. excluded_attrs:
  122. - memberOf
  123. - accountUnlockTime
  124. - passwordRetryCount
  125. - retryCountResetTime
  126. changelogmaxage: '30d'
  127. consumer:
  128. inventorygroup: ldapreplicas
  129. excluded_attrs:
  130. - accountUnlockTime
  131. - passwordRetryCount
  132. - retryCountResetTime
  133. replicapurgedelay: 604800
  134. db:
  135. # database name for the suffix
  136. # at the moment this role supports only one database for a suffix
  137. - name: userroot
  138. # Here you can specify additional indexes
  139. index:
  140. - name: automountinformation
  141. type:
  142. - eq
  143. - pres
  144. - sub
  145. - name: homedirectory
  146. type:
  147. - eq
  148. - pres
  149. - name: ipserviceport
  150. type:
  151. - eq
  152. - pres
  153. - name: automountmapname
  154. type:
  155. - eq
  156. - pres
  157. - name: sudouser
  158. type:
  159. - eq
  160. - pres
  161. - sub
  162. # also VLV indexes are allowed
  163. # make sure, that the index base exists
  164. vlv_index:
  165. - name: objectclass
  166. filter: '(objectClass=*)'
  167. base: 'dc=example,dc=com'
  168. scope: 1
  169. index:
  170. - name: getobjectclass
  171. sort: 'cn'
  172. - name: hosts
  173. filter: '(objectClass=ipHost)'
  174. base: 'ou=hosts,{{ host_ldap_basedn }}'
  175. scope: 1
  176. index:
  177. - name: gethostent
  178. sort: 'cn uid'
  179. - name: networks
  180. base: 'ou=networks,{{ host_ldap_basedn }}'
  181. scope: 1
  182. filter: '(objectClass=ipNetwork)'
  183. index:
  184. - name: getnetent
  185. sort: 'cn uid'
  186. - name: group
  187. base: 'ou=group,{{ host_ldap_basedn }}'
  188. scope: 1
  189. filter: '(objectClass=posixGroup)'
  190. index:
  191. - name: getgrent
  192. sort: 'cn uid'
  193. - name: passwd
  194. base: 'ou=people,{{ host_ldap_basedn }}'
  195. scope: 1
  196. filter: '(objectClass=posixAccount)'
  197. index:
  198. - name: getpwent.uid
  199. sort: uid
  200. - name: getpwent
  201. sort: 'cn uid'

Dependencies

License

GNU General Public License v3.0

Author Information

Maintainer: Horst Thaller