emqx/apps/emqx_auth_ldap
Zaiming (Stone) Shi 8ff8a8b55d ci: split fast (regular) and docker-compose (docker) ct 2022-11-06 19:39:06 +01:00
..
etc Add server_name_indication and verify option (#4349) 2021-03-23 19:48:04 +08:00
include refactor(auth): auth apps use counter in emqx_metrics 2022-05-22 22:06:02 +08:00
priv fix: config schema sni disable 2022-04-10 12:57:50 +08:00
src chore: bump version && update appup 2022-10-27 17:03:12 +08:00
test fix(test): flaky test cases of auth_ldap 2022-05-20 14:18:39 +08:00
.gitignore refactor(proj): Add apps 2020-12-04 22:11:53 +01:00
README.md docs(README): EMQ X -> EMQX 2022-02-15 16:15:25 +01:00
docker-ct ci: split fast (regular) and docker-compose (docker) ct 2022-11-06 19:39:06 +01:00
emqx.io.ldif refactor(proj): Add apps 2020-12-04 22:11:53 +01:00
emqx.schema refactor(proj): Add apps 2020-12-04 22:11:53 +01:00
rebar.config Merge branch 'umbrella-for-430-auto-sync' into umbrella-for-430 2020-12-08 22:09:59 +01:00

README.md

emqx_auth_ldap

EMQX LDAP Authentication Plugin

Build

make

Load the Plugin

# ./bin/emqx_ctl plugins load emqx_auth_ldap

Generate Password

slappasswd -h '{ssha}' -s public

Configuration Open LDAP

vim /etc/openldap/slapd.conf

include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/ppolicy.schema
include         /etc/openldap/schema/emqx.schema

database bdb
suffix "dc=emqx,dc=io"
rootdn "cn=root,dc=emqx,dc=io"
rootpw {SSHA}eoF7NhNrejVYYyGHqnt+MdKNBh4r1w3W

directory       /etc/openldap/data

If the ldap launched with error below:

Unrecognized database type (bdb)
5c4a72b9 slapd.conf: line 7: <database> failed init (bdb)
slapadd: bad configuration file!

Insert lines to the slapd.conf

modulepath /usr/lib/ldap
moduleload back_bdb.la

Import EMQX User Data

Use ldapadd

# ldapadd -x -D "cn=root,dc=emqx,dc=io" -w public -f emqx.com.ldif

Use slapadd

# sudo slapadd -l schema/emqx.io.ldif -f slapd.conf

Launch slapd

# sudo slapd -d 3

Test

After configure slapd correctly and launch slapd successfully. You could execute

# make tests

License

Apache License Version 2.0

Author

EMQX Team.