emqx/apps/emqx_auth_http
Zaiming Shi f000b6583c fix(tls): Ensure tls config integrity
For default tsl version and ciphers, we try to use otp release number
to determin if we want to use tlsv1.3

For default configs, we try to porivde both tlsv1.3 and
ciphers in config (even for commented out configs)
2021-02-09 22:56:28 +01:00
..
etc fix(auth http): using ehttpc (#4021) 2021-01-16 23:10:53 +08:00
include fix(auth http): using ehttpc (#4021) 2021-01-16 23:10:53 +08:00
priv fix(auth http): using ehttpc (#4021) 2021-01-16 23:10:53 +08:00
src fix(tls): Ensure tls config integrity 2021-02-09 22:56:28 +01:00
test fix(scheme): update test case 2021-01-27 19:11:41 +01:00
.gitignore refactor(proj): Add apps 2020-12-04 22:11:53 +01:00
README.md refactor(proj): Add apps 2020-12-04 22:11:53 +01:00
rebar.config fix(http): upgrade ehttpc to 0.1.2 (#4093) 2021-01-29 09:35:08 +08:00

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
##  - %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

EMQ X Team.