From 6f8c87001f4a0f00e7ea30f1bce9db3b0a101d7d Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Wed, 25 Aug 2021 17:21:04 +0800 Subject: [PATCH] chore(authz): add default config Signed-off-by: zhanghongtong --- apps/emqx_authz/etc/emqx_authz.conf | 8 ++++---- apps/emqx_authz/src/emqx_authz_schema.erl | 2 +- rebar.config | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/emqx_authz/etc/emqx_authz.conf b/apps/emqx_authz/etc/emqx_authz.conf index be05437c0..358831d28 100644 --- a/apps/emqx_authz/etc/emqx_authz.conf +++ b/apps/emqx_authz/etc/emqx_authz.conf @@ -65,9 +65,9 @@ authorization { # collection: mqtt_authz # find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] } # }, - # { - # type: file - # path: {{ platform_etc_dir }}/authorization_rules.conf - # } + { + type: file + path: "{{ platform_etc_dir }}/authorization_rules.conf" + } ] } diff --git a/apps/emqx_authz/src/emqx_authz_schema.erl b/apps/emqx_authz/src/emqx_authz_schema.erl index 9de963972..ce437ab2b 100644 --- a/apps/emqx_authz/src/emqx_authz_schema.erl +++ b/apps/emqx_authz/src/emqx_authz_schema.erl @@ -23,7 +23,7 @@ fields("authorization") -> [ {rules, rules()} ]; fields(file) -> - [ {type, #{type => http}} + [ {type, #{type => file}} , {enable, #{type => boolean(), default => true}} , {path, #{type => string(), diff --git a/rebar.config b/rebar.config index 75d78b64e..4a6b51cfa 100644 --- a/rebar.config +++ b/rebar.config @@ -60,7 +60,7 @@ , {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x , {getopt, "1.0.2"} , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.14.1"}}} - , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.12.1"}}} + , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.13.0"}}} , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.4.0"}}} , {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.2.0"}}} ]}.