|
3 | 3 | services.openldap = { |
4 | 4 | enable = true; |
5 | 5 |
|
6 | | - defaultSchemas = null; |
7 | | - dataDir = null; |
8 | | - database = null; |
9 | 6 | settings.attrs.olcLogLevel = "0"; |
10 | 7 |
|
11 | 8 | settings.children = { |
|
16 | 13 | "${pkgs.openldap}/etc/schema/nis.ldif" |
17 | 14 | ]; |
18 | 15 |
|
19 | | - "olcDatabase={1}mdb" = { |
20 | | - attrs = {objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ]; |
21 | | - olcDatabase = "{1}mdb"; |
22 | | - olcDbDirectory = "/var/db/openldap"; |
23 | | - olcRootPW.path = config.sops.secrets.openldap-rootpw.path; |
24 | | - olcRootDN = "cn=admin,dc=eve"; |
25 | | - olcSuffix = "dc=eve"; |
26 | | - olcAccess = [ |
27 | | - ''{0}to attrs=userPassword |
28 | | - by self write by anonymous auth |
29 | | - by dn.base="cn=dovecot,dc=mail,dc=eve" read |
30 | | - by dn.base="cn=gitlab,ou=system,ou=users,dc=eve" read |
31 | | - by dn.base="cn=ldapsync,ou=system,ou=users,dc=eve" |
32 | | - read by * none'' |
33 | | - ''{1}to attrs=loginShell by self write by * read'' |
34 | | - ''{2}to dn.subtree="ou=system,ou=users,dc=eve" |
35 | | - by dn.base="cn=dovecot,dc=mail,dc=eve" read |
36 | | - by dn.subtree="ou=system,ou=users,dc=eve" read |
37 | | - by * none'' |
38 | | - ''{3}to dn.subtree="ou=jabber,ou=users,dc=eve" by dn.base="cn=prosody,ou=system,ou=users,dc=eve" write by * read'' |
39 | | - ''{4}to * by * read'' |
40 | | - ]; |
41 | | - }; |
| 16 | + "olcDatabase={1}mdb".attrs = { |
| 17 | + objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ]; |
| 18 | + olcDatabase = "{1}mdb"; |
| 19 | + olcDbDirectory = "/var/db/openldap"; |
| 20 | + olcRootPW.path = config.sops.secrets.openldap-rootpw.path; |
| 21 | + olcRootDN = "cn=admin,dc=eve"; |
| 22 | + olcSuffix = "dc=eve"; |
| 23 | + olcAccess = [ |
| 24 | + ''{0}to attrs=userPassword |
| 25 | + by self write by anonymous auth |
| 26 | + by dn.base="cn=dovecot,dc=mail,dc=eve" read |
| 27 | + by dn.base="cn=gitlab,ou=system,ou=users,dc=eve" read |
| 28 | + by dn.base="cn=ldapsync,ou=system,ou=users,dc=eve" |
| 29 | + read by * none'' |
| 30 | + ''{1}to attrs=loginShell by self write by * read'' |
| 31 | + ''{2}to dn.subtree="ou=system,ou=users,dc=eve" |
| 32 | + by dn.base="cn=dovecot,dc=mail,dc=eve" read |
| 33 | + by dn.subtree="ou=system,ou=users,dc=eve" read |
| 34 | + by * none'' |
| 35 | + ''{3}to dn.subtree="ou=jabber,ou=users,dc=eve" by dn.base="cn=prosody,ou=system,ou=users,dc=eve" write by * read'' |
| 36 | + ''{4}to * by * read'' |
| 37 | + ]; |
42 | 38 | }; |
43 | 39 | "olcOverlay=syncprov,olcDatabase={1}mdb".attrs = { |
44 | 40 | objectClass = [ "olcOverlayConfig" "olcSyncProvConfig" ]; |
|
0 commit comments