2022-04-15 05:58:21 -04:00
|
|
|
# LDAP
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
If you are developing HedgeDoc and need to test something with an LDAP server you can use the
|
|
|
|
[`test-openldap`][docker-image] Docker image from [rroemhild][rroemhild].
|
2022-04-15 05:58:21 -04:00
|
|
|
|
|
|
|
Simply run
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
<!-- markdownlint-disable proper-names -->
|
|
|
|
```shell
|
2022-04-15 05:58:21 -04:00
|
|
|
docker run --rm -p 10389:10389 -p 10636:10636 rroemhild/test-openldap
|
|
|
|
```
|
2023-07-02 16:31:04 -04:00
|
|
|
<!-- markdownlint-enable proper-names -->
|
2022-04-15 05:58:21 -04:00
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
and add the following to the `.env` file then start the backend.
|
2022-04-15 05:58:21 -04:00
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
```dotenv
|
2023-07-16 18:40:29 -04:00
|
|
|
HD_AUTH_LDAP_SERVERS="FUTURAMA"
|
2022-04-15 05:58:21 -04:00
|
|
|
HD_AUTH_LDAP_FUTURAMA_PROVIDER_NAME="Futurama LDAP"
|
|
|
|
HD_AUTH_LDAP_FUTURAMA_URL="ldap://localhost:10389"
|
|
|
|
HD_AUTH_LDAP_FUTURAMA_SEARCH_BASE="ou=people,dc=planetexpress,dc=com"
|
|
|
|
HD_AUTH_LDAP_FUTURAMA_SEARCH_FILTER=(&(uid={{username}})(objectClass=inetOrgPerson))
|
2023-05-10 08:50:48 -04:00
|
|
|
HD_AUTH_LDAP_FUTURAMA_DISPLAY_NAME_FIELD="uid"
|
2022-04-15 05:58:21 -04:00
|
|
|
HD_AUTH_LDAP_FUTURAMA_USERID_FIELD="uid"
|
|
|
|
HD_AUTH_LDAP_FUTURAMA_BIND_DN="cn=admin,dc=planetexpress,dc=com"
|
|
|
|
HD_AUTH_LDAP_FUTURAMA_BIND_CREDENTIALS="GoodNewsEveryone"
|
|
|
|
```
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
You should be able to log in with either of these logins (`username` : `password`):
|
2022-04-15 05:58:21 -04:00
|
|
|
|
|
|
|
- `professor` : `professor`
|
|
|
|
- `fry` : `fry`
|
|
|
|
- `zoidberg` : `zoidberg`
|
|
|
|
- `hermes` : `hermes`
|
|
|
|
- `leela` : `leela`
|
|
|
|
- `bender` : `bender`
|
|
|
|
- `amy` : `amy`
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
If you need to know more about which information are held by each of these accounts, have a look at
|
|
|
|
the [documentation](https://github.com/rroemhild/docker-test-openldap#ldap-structure).
|
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
[docker-image]: https://github.com/rroemhild/docker-test-openldap
|
|
|
|
[rroemhild]: https://github.com/rroemhild
|