chore(authorization): merge authorization in emqx and emqx_authz
This commit is contained in:
parent
856d394860
commit
4594d2d42b
|
@ -1,9 +1,5 @@
|
||||||
authorization_rules {
|
authorization {
|
||||||
rules = [
|
rules = [
|
||||||
# {
|
|
||||||
# type: file
|
|
||||||
# path: {{ platform_etc_dir }}/authorization_rules.conf
|
|
||||||
# },
|
|
||||||
# {
|
# {
|
||||||
# type: http
|
# type: http
|
||||||
# config: {
|
# config: {
|
||||||
|
@ -68,6 +64,10 @@ authorization_rules {
|
||||||
# }
|
# }
|
||||||
# collection: mqtt_authz
|
# collection: mqtt_authz
|
||||||
# find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] }
|
# find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] }
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# type: file
|
||||||
|
# path: {{ platform_etc_dir }}/authorization_rules.conf
|
||||||
# }
|
# }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
, fields/1
|
, fields/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
structs() -> ["authorization_rules"].
|
structs() -> ["authorization"].
|
||||||
|
|
||||||
fields("authorization_rules") ->
|
fields("authorization") ->
|
||||||
[ {rules, rules()}
|
[ {rules, rules()}
|
||||||
];
|
];
|
||||||
fields(file) ->
|
fields(file) ->
|
||||||
|
|
|
@ -197,6 +197,10 @@ fields("log_burst_limit") ->
|
||||||
, {"window_time", t(emqx_schema:duration(), undefined, "1s")}
|
, {"window_time", t(emqx_schema:duration(), undefined, "1s")}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
fields("authorization") ->
|
||||||
|
emqx_schema:fields("authorization") ++
|
||||||
|
emqx_authz_schema:fields("authorization");
|
||||||
|
|
||||||
fields(Name) ->
|
fields(Name) ->
|
||||||
find_field(Name, ?MERGED_CONFIGS).
|
find_field(Name, ?MERGED_CONFIGS).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue