mirror of
https://github.com/lldap/lldap.git
synced 2026-03-31 15:07:48 +01:00
example_configs: Add thelounge configuration example
This commit is contained in:
@@ -2,15 +2,42 @@
|
|||||||
|
|
||||||
[Main documentation here.](https://thelounge.chat/docs/configuration#ldap-support)
|
[Main documentation here.](https://thelounge.chat/docs/configuration#ldap-support)
|
||||||
|
|
||||||
For simple user auth with LLDAP on localhost adapt this in the main config.js:
|
## Simple Config:
|
||||||
|
|
||||||
|
In this config, The Lounge will use the credentials provided in web ui to authenticate with lldap. It'll allow access if authentication was successful.
|
||||||
|
|
||||||
```
|
```
|
||||||
ldap: {
|
ldap: {
|
||||||
enable: true,
|
enable: true,
|
||||||
url: "ldap://127.0.0.1:3890",
|
url: "ldap://localhost:389",
|
||||||
tlsOptions: {},
|
tlsOptions: {},
|
||||||
primaryKey: "uid",
|
primaryKey: "uid",
|
||||||
baseDN : "ou=people,dc=example,dc=com",
|
baseDN: "ou=people,dc=example,dc=com",
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Advanced Config:
|
||||||
|
|
||||||
|
`rootDN` is similar to bind DN in other applications. It is used in combination with `rootPassword` to query lldap. `ldap-viewer` user in `lldap` is a member of the group `lldap_strict_readonly` group. This gives `ldap-viewer` user permission to query `lldap`.
|
||||||
|
|
||||||
|
|
||||||
|
With the `filter`, You can limit The Lounge access to users who are a member of the group `thelounge`.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
ldap: {
|
||||||
|
enable: true,
|
||||||
|
url: "ldap://localhost:389",
|
||||||
|
tlsOptions: {},
|
||||||
|
primaryKey: "uid",
|
||||||
|
searchDN: {
|
||||||
|
rootDN: "uid=ldap-viewer,ou=people,dc=example,dc=com",
|
||||||
|
rootPassword: ""
|
||||||
|
filter: "(memberOf=cn=thelounge,ou=groups,dc=example,dc=com)",
|
||||||
|
base: "dc=example,dc=com",
|
||||||
|
scope: "sub",
|
||||||
|
},
|
||||||
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
And comment out with ```//``` the entire ```searchDN``` block.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user