Commit Graph

398 Commits

Author SHA1 Message Date
某文
082214d039 feat: add authz file rule validator 2023-05-22 14:25:05 +08:00
某文
27fca0ef3c fix: check authz's file rule before save to file 2023-05-22 14:22:20 +08:00
Zaiming (Stone) Shi
d5f5f35787 Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master 2023-05-02 18:08:04 +02:00
Zaiming (Stone) Shi
c825102bed fix(authz): ensure acl.conf path template rendered 2023-05-02 09:10:04 +02:00
Zaiming (Stone) Shi
5acf0e281e refactor: delete default authz config from emqx.conf 2023-04-29 22:10:19 +02:00
Zhongwen Deng
fdf9b2a383 chore: apply review suggestions 2023-04-21 12:19:38 +08:00
Ilya Averyanov
8c4b32580e
Merge pull request #10420 from savonarola/0417-authn-authz-fix-path-quoting
Fix path joining and quoting in authn/authz
2023-04-20 18:03:04 +03:00
Zaiming (Stone) Shi
4d67312bab refactor: set authz config at 'high' importance level
and authorization.sources at 'low' level
prior to this commit, the root was set to 'hidden'
which is not ideal because some may still want to configure
the sources from files
2023-04-18 19:17:03 +02:00
Ivan Dyachkov
dc78ecb41c chore: merge upstream/master 2023-04-18 17:33:32 +02:00
Zaiming (Stone) Shi
6dd7befaab refactor: unify authn authz type names 2023-04-18 09:48:28 +02:00
Ilya Averyanov
88ca94b417 fix(auth): fix uri path handling
Fix uri path handling `emqx_connector_http`,
 HTTP authentication and authorization backends.
2023-04-17 23:57:56 +03:00
某文
e9e0ae7f0a chore: When matching authz's and/or rules, check the simple ones first to improve efficiency 2023-04-17 17:23:39 +08:00
Ivan Dyachkov
9fc8a498f8 chore: bump apps versions 2023-04-17 09:09:08 +02:00
Stefan Strigler
4f80690162 fix: byebye jsx 2023-04-14 13:41:34 +02:00
Stefan Strigler
062ce5f819 refactor: rename emqx_map_lib to emqx_utils_maps 2023-04-14 13:41:34 +02:00
Stefan Strigler
9c11bfce80 refactor: rename emqx_misc to emqx_utils 2023-04-14 13:41:27 +02:00
Stefan Strigler
f8e9e54393 refactor: move emqx_json to emqx_utils_json 2023-04-14 13:31:27 +02:00
Andrew Mayorov
e70deae1c3
feat(resource): ask for metrics only when needed 2023-04-11 12:00:19 +03:00
Zaiming (Stone) Shi
e978d86c86 chore: add doc_lift for authorization.sources
doc_lift is to make the doc render application to lift
this field to the root level and force the field's doc
to refernec it instead of expanding the structs in a nested way
2023-04-03 16:49:35 +02:00
Kjell Winblad
baf39fe080
Merge pull request #10098 from kjellwinblad/kjell/fix/mongo_authz_crash
fix: mongodb authz crash
2023-03-13 10:46:49 +01:00
ieQu1
e3595f2e79 chore(mria): Bump version to 0.4.0 2023-03-11 00:37:25 +01:00
Kjell Winblad
aa57ea9ee1 fix: mongodb authz crash
This fixes a crash with an error in the log file (see below) that
happened when the MongoDB authorization module queried the database. The
reason is that the collection name that was sent to the mongodb
connection was an atom. This is fixed by making sure it is not an atom.

2023-03-08T17:16:34.215523+01:00 [error] msg: query_mongo_error, mfa:
emqx_authz_mongodb:authorize/4, line: 95, peername: 127.0.0.1:53212,
clientid: client123, collection: mqtt_acl, filter: #{username =>
<<"emqx_u">>}, reason: {resource_error,#{msg => #{error =>
{error,{error_cannot_parse_response,{op_msg_response,#{<<"code">> =>
73,<<"codeName">> => <<"InvalidNamespace">>,<<"errmsg">> => <<"Failed to
parse namespace element">>,<<"ok">> => 0.0}}}},id =>
<<"emqx_authz_mongodb:3">>,name => call_query,request =>
{find,mqtt_acl,#{username => <<"emqx_u">>},#{}},stacktrace =>
[{mc_connection_man,reply,1,[{file,"mc_connection_man.erl"},{line,123}],
...]}, reason => exception}}, resource_id: <<"emqx_authz_mongodb:3">>

Fixes: https://github.com/emqx/emqx/issues/9783
2023-03-09 16:01:23 +01:00
Zaiming (Stone) Shi
fe27604010 Merge remote-tracking branch 'origin/release-50' into 0308-merge-release-50-back-to-master 2023-03-08 16:46:45 +01:00
Stefan Strigler
b54f444263 fix(emqx_authz): return 404 for requests on non existent source 2023-03-07 13:51:06 +01:00
Stefan Strigler
d0ea7f4647 fix(emqx_authz): check if type param matches type in body 2023-03-06 11:10:31 +01:00
Zaiming (Stone) Shi
9316690c29 fix(schema): binary string for default values
A lot of the string value fields had default value defined in
schema as list-string rather than binary-string.
This caused the generated schema dump (in JSON format)
to have raw_default field as an integer array.
2023-02-21 09:09:51 +01:00
firest
9f4c36ecbc chore: bump version && update changes 2023-01-31 23:30:22 +08:00
firest
c034cbf6de feat(authz): allow the placeholder to be anywhere in the topic for authz rules 2023-01-31 23:30:12 +08:00
Zaiming (Stone) Shi
fff6bf921f refactor(authz): call emqx_resource:simple_sync_query
there is no need to route the request through the buffer workers
2023-01-17 20:01:45 +01:00
Stefan Strigler
1690a6dcfc
Merge branch 'master' into dev/api-refactor 2023-01-13 15:34:13 +01:00
Zhongwen Deng
f15b29b1ef chore: upgrade app version 2023-01-13 18:22:29 +08:00
Ivan Dyachkov
f90c41f769 fix: set default value in schema 2023-01-12 13:49:52 +01:00
Thales Macedo Garitezi
48e1ba4832 feat(docs): add tags to schemas
This'll allow us to split the generated `schema.json` file into
subsections for better documentation navigation.
2023-01-11 09:10:03 -03:00
Stefan Strigler
f27f573109 refactor: move to /authorization/sources/built_in_database/rules 2023-01-10 11:00:22 +01:00
Zaiming (Stone) Shi
67f2159a27
Merge pull request #9653 from zmstone/0101-authz-schema-union-member-selection
0101 authz schema union member selection
2023-01-09 22:17:51 +01:00
Zaiming (Stone) Shi
e52f9d5920 refactor: use union member type selector for authz sources 2023-01-09 14:26:16 +01:00
Thales Macedo Garitezi
c6b8e614df fix(authz_http): handle ignore results (request failures)
Related issue: https://github.com/emqx/emqx/issues/9683

When the HTTP request for authz fails (e.g.: resource is down or
server is down), then the HTTP authorizer returns `ignore`, which was
not handled correctly by the authorization callback.
2023-01-05 11:34:23 -03:00
Zaiming (Stone) Shi
dbc10c2eed chore: update copyright year 2023 2023-01-02 09:22:27 +01:00
Zaiming (Stone) Shi
d3efb0c0ba chore: bump app versions 2022-12-23 15:10:16 +01:00
Zaiming (Stone) Shi
350023e757 fix(config): option only_fill_defaults renamed to make_serializable 2022-12-23 14:27:04 +01:00
Zaiming (Stone) Shi
b398617614 chore: bump app versions 2022-11-28 21:12:43 +01:00
Zaiming (Stone) Shi
7ee53e5319 Merge tag 'v5.0.11' into dev/ee5.0 2022-11-28 21:02:21 +01:00
Zaiming (Stone) Shi
6ee475d9b1 fix(emqx_authz_api_mnesia): return the right matchers 2022-11-24 20:32:00 +01:00
JianBo He
9786a6c267 refactor(mgmt): convert fuzzy filter func to named func 2022-11-24 20:14:33 +01:00
JianBo He
9c7bf9d601 chore: update app.src 2022-11-24 20:14:33 +01:00
JianBo He
1fe9c105aa refactor(mgmt): smplify the node_query/cluster_query implementation 2022-11-24 20:14:33 +01:00
JianBo He
08121e7df6 fix(mgmt): optimize the speed of query tail pages
In the previous, when you query the tail pages, all the front of rows
will be queried out and formatted. It greatly hurts the speed of query.

Currently, we only format the final result rows. i.e, the query for the
last page of data will be 10x faster.
2022-11-24 20:14:33 +01:00
Zaiming (Stone) Shi
c940b901f5 chore: fix app versions 2022-11-16 16:26:43 +01:00
Zaiming (Stone) Shi
09455edae8 Merge tag 'v5.0.10' into dev/ee5.0 2022-11-16 16:20:30 +01:00
Zaiming (Stone) Shi
467010e3d3 chore: bump emqx_authz app vsn 2022-11-08 17:40:34 +01:00