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 = [
|
||||
# {
|
||||
# type: file
|
||||
# path: {{ platform_etc_dir }}/authorization_rules.conf
|
||||
# },
|
||||
# {
|
||||
# type: http
|
||||
# config: {
|
||||
|
@ -68,6 +64,10 @@ authorization_rules {
|
|||
# }
|
||||
# collection: mqtt_authz
|
||||
# find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] }
|
||||
# },
|
||||
# {
|
||||
# type: file
|
||||
# path: {{ platform_etc_dir }}/authorization_rules.conf
|
||||
# }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
, fields/1
|
||||
]).
|
||||
|
||||
structs() -> ["authorization_rules"].
|
||||
structs() -> ["authorization"].
|
||||
|
||||
fields("authorization_rules") ->
|
||||
fields("authorization") ->
|
||||
[ {rules, rules()}
|
||||
];
|
||||
fields(file) ->
|
||||
|
|
|
@ -197,6 +197,10 @@ fields("log_burst_limit") ->
|
|||
, {"window_time", t(emqx_schema:duration(), undefined, "1s")}
|
||||
];
|
||||
|
||||
fields("authorization") ->
|
||||
emqx_schema:fields("authorization") ++
|
||||
emqx_authz_schema:fields("authorization");
|
||||
|
||||
fields(Name) ->
|
||||
find_field(Name, ?MERGED_CONFIGS).
|
||||
|
||||
|
|
Loading…
Reference in New Issue