Skip to content

Commit c29dc78

Browse files
author
tchapi
committed
Remove quotes in env vars, add doc on LDAP
1 parent 133c74f commit c29dc78

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ f. The paths for the WebDAV installation
139139
> I recommend that you use absolute directories so you know exactly where your files reside.
140140
141141
```shell
142-
WEBDAV_TMP_DIR='/tmp'
143-
WEBDAV_PUBLIC_DIR='/webdav/public'
142+
WEBDAV_TMP_DIR=/tmp
143+
WEBDAV_PUBLIC_DIR=/webdav/public
144144
WEBDAV_HOMES_DIR=
145145
```
146146

@@ -161,7 +161,7 @@ h. The timezone you want for the app
161161
This must comply with the [official list](https://www.php.net/manual/en/timezones.php)
162162

163163
```shell
164-
APP_TIMEZONE="Australia/Lord_Howe"
164+
APP_TIMEZONE=Australia/Lord_Howe
165165
```
166166

167167
> Set a void value like so:
@@ -201,23 +201,23 @@ In case you use the `IMAP` auth type, you must specify the auth url (_the "mailb
201201
You should also explicitely define whether you want new authenticated to be created upon login:
202202
203203
```shell
204-
IMAP_AUTH_URL="{imap.gmail.com:993/imap/ssl/novalidate-cert}"
204+
IMAP_AUTH_URL={imap.gmail.com:993/imap/ssl/novalidate-cert}
205205
IMAP_AUTH_USER_AUTOCREATE=true # false by default
206206
```
207207
208208
Same goes for LDAP, where you must specify the LDAP server url, the DN pattern, the Mail attribute, as well as whether you want new authenticated to be created upon login (_like for IMAP_):
209209
210210
```shell
211-
LDAP_AUTH_URL="ldap://127.0.0.1"
212-
LDAP_DN_PATTERN="mail=%u"
213-
LDAP_MAIL_ATTRIBUTE="mail"
211+
LDAP_AUTH_URL=ldap://127.0.0.1:3890 # default LDAP port
212+
LDAP_DN_PATTERN=uid=%u,ou=users,dc=domain,dc=com
213+
LDAP_MAIL_ATTRIBUTE=mail
214214
LDAP_AUTH_USER_AUTOCREATE=true # false by default
215-
LDAP_CERTIFICATE_CHECKING_STRATEGY="try" # try by default.
215+
LDAP_CERTIFICATE_CHECKING_STRATEGY=try # try by default. Other values are: never, hard, demand or allow
216216
```
217217
218218
> Ex: for [Zimbra LDAP](https://zimbra.github.io/adminguide/latest/#zimbra_ldap_service), you might want to use the `zimbraMailDeliveryAddress` attribute to retrieve the principal user email:
219219
> ```shell
220-
> LDAP_MAIL_ATTRIBUTE="zimbraMailDeliveryAddress"
220+
> LDAP_MAIL_ATTRIBUTE=zimbraMailDeliveryAddress
221221
> ```
222222
223223
## Migrating from Baïkal?
@@ -551,6 +551,31 @@ In a shell, if you run Davis locally:
551551
552552
bin/console doctrine:migrations:migrate
553553
554+
### The LDAP connection is not working
555+
556+
> [!NOTE]
557+
>
558+
> Make sure all environment parameters are in plain text (no quotes).
559+
560+
Check if your instance can reach your LDAP server:
561+
562+
- For Docker instances: make sure it is on the same network
563+
- Check connection via `ldapsearch`:
564+
565+
```shell
566+
# For docker: connect into container's shell
567+
docker exec -it davis sh
568+
569+
# install ldap utils (for alpine linux)
570+
apk add openldap-clients
571+
572+
# User checking their own entry
573+
ldapsearch -H ldap://lldap-server:3890 -D "uid=someuser,ou=users,dc=domain,dc=com" -W -b "dc=domain,dc=com" "(uid=someuser)"
574+
```
575+
576+
- Check that the `LDAP_DN_PATTERN` filter is compliant with your LDAP service
577+
- Example: `uid=%u,ou=people,dc=domain,dc=com`: [LLDAP](https://github.com/lldap/lldap) uses `people` instead of `users`.
578+
554579
# 📚 Libraries used
555580
556581
- Symfony 7 (Licence : MIT)

0 commit comments

Comments
 (0)