EMQ X HTTP Authentication/ACL Plugin
Latest commit 6a15716 Aug 29, 2018
Permalink
Failed to load latest commit information.
etc Fix conflicts Apr 11, 2018
include Move to emqx/emqx-auth-http Jul 16, 2018
priv Merge with EMQ X Oct 7, 2017
src EMQX 3.0 UT Aug 29, 2018
test remote io:format Aug 29, 2018
.gitignore Merge with EMQ X project Oct 10, 2017
LICENSE Initial commit May 16, 2016
Makefile EMQX 3.0 UT Aug 29, 2018
README.md Move to emqx/emqx-auth-http Jul 16, 2018
erlang.mk 2.0.0-alpha1 Aug 23, 2016
rebar.config Upgrade the auth plugin for EMQ X R3.0 Aug 26, 2018

README.md

emqx_auth_http

EMQ X HTTP Auth/ACL Plugin

Build

make && make tests

Configure the Plugin

File: etc/emqx_auth_http.conf

##--------------------------------------------------------------------
## Authentication request.
##
## Variables:
##  - %u: username
##  - %c: clientid
##  - %a: ipaddress
##  - %P: password
##
## Value: URL
auth.http.auth_req = http://127.0.0.1:8080/mqtt/auth
## Value: post | get | put
auth.http.auth_req.method = post
## Value: Params
auth.http.auth_req.params = clientid=%c,username=%u,password=%P

##--------------------------------------------------------------------
## Superuser request.
##
## Variables:
##  - %u: username
##  - %c: clientid
##  - %a: ipaddress
##
## Value: URL
auth.http.super_req = http://127.0.0.1:8080/mqtt/superuser
## Value: post | get | put
auth.http.super_req.method = post
## Value: Params
auth.http.super_req.params = clientid=%c,username=%u

##--------------------------------------------------------------------
## ACL request.
##
## Variables:
##  - %A: 1 | 2, 1 = sub, 2 = pub
##  - %u: username
##  - %c: clientid
##  - %a: ipaddress
##  - %t: topic
##
## Value: URL
auth.http.acl_req = http://127.0.0.1:8080/mqtt/acl
## Value: post | get | put
auth.http.acl_req.method = get
## Value: Params
auth.http.acl_req.params = access=%A,username=%u,clientid=%c,ipaddr=%a,topic=%t

Load the Plugin

./bin/emqx_ctl plugins load emqx_auth_http

HTTP API

200 if ok

4xx if unauthorized

License

Apache License Version 2.0

Author

EMQ X Team.