emqx/apps/emqx_auth_http
Zaiming (Stone) Shi 568bd520a8 ci: ensure docker-ct for emqx_auth_http and emqx_web_hook 2022-11-07 08:51:32 +01:00
..
etc fix(emqx_auth_http): make configure backward compatible 2022-07-06 18:06:06 +08:00
include refactor: support the retry option 2022-10-09 17:27:38 +08:00
priv fix(emqx_auth_http): make configure backward compatible 2022-07-06 18:06:06 +08:00
src Merge remote-tracking branch 'origin/main-v4.3' into release-v43 2022-10-28 14:12:44 +02:00
test chore: update copyright 2022-04-14 11:23:25 +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: ensure docker-ct for emqx_auth_http and emqx_web_hook 2022-11-07 08:51:32 +01:00
rebar.config chore(ehttpc): update tag of ehttpc 2021-04-15 21:47:20 +08:00

README.md

emqx_auth_http

EMQX 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
##  - %r: protocol
##  - %P: password
##  - %C: common name of client TLS cert
##  - %d: subject of client TLS cert
##
## 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
##  - %r: protocol
##  - %P: password
##  - %C: common name of client TLS cert
##  - %d: subject of client TLS cert
##
## 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
##  - %r: protocol
##  - %m: mountpoint
##  - %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

EMQX Team.