Commit Graph

250 Commits

Author SHA1 Message Date
Ilya Averyanov c11afc357e fix(auth): use empty strings for absent placeholder values 2022-09-20 15:20:55 +03:00
Thales Macedo Garitezi c20ad3733a fix: check for authorization on topic before publishing last will testament
fixes #8978

Without checking for authorization, a client can, on abnormal
termination, publish a message to any topic, including `$SYS` ones.
2022-09-16 17:31:22 -03:00
Thales Macedo Garitezi dca522d7d3 test: add tests for publishing lwt when deny_action is disconnect 2022-09-16 15:11:54 -03:00
firest 14b5977996 feat(authz): Support `cert_common_name` and `cert_subject` in Authz 2022-09-15 18:02:54 +08:00
JianBo He a461375b30 chore: support strip double quote in authn/authz
more compatibility for https://github.com/emqx/emqx/pull/8827
2022-09-14 15:25:31 +08:00
Shawn 1ff53ee8a9 fix(authz): don't stop emqx_resource app in test cases 2022-08-23 08:57:12 +08:00
Shawn 45352206a3 fix(auth): remove emqx_connector from testcases of authz/authn 2022-08-22 20:20:45 +08:00
Shawn 35fe70b887 feat: support aysnc callback to connector modules 2022-08-10 00:34:35 +08:00
Zaiming (Stone) Shi e49686a276 fix(authz): should apply no rule on superuser 2022-07-08 22:35:15 +02:00
JianBo He 4c17b38102 chore: treat 200/204 as acl nomatch 2022-07-01 20:42:22 +08:00
JianBo He 52b77b570f refactor: authz-http return body to reject pub/sub 2022-07-01 17:46:55 +08:00
firest 86a3ac0bef fix(authz): prohibit overriding of existing client/user 2022-06-07 16:34:01 +08:00
Zhongwen Deng 91000eb342 fix: authz ct failed 2022-06-06 10:57:26 +08:00
Ilya Averyanov 91da451803 feat(authz): add default authn-based authz source 2022-05-13 12:51:10 +03:00
Ilya Averyanov e0fa07b679 fix(jwt auth): improve JWT handling 2022-05-12 12:10:47 +03:00
EMQ-YangM 30b3060327 fix: improve authn, authz metrics 2022-05-05 18:53:31 +08:00
JianBo He d36d27c533
Merge pull request #7781 from HJianBo/rename-acl-metrics
feat(metrics): refactor authz metrics name
2022-04-29 16:52:43 +08:00
JianBo He 344a754674
Merge pull request #7817 from JimMoen/fix-auth-http 2022-04-29 16:36:10 +08:00
JianBo He 4989ce7a0d test(authz-jwt): fix flaky test t_check_expire 2022-04-29 15:20:05 +08:00
JimMoen c1dfd0aa36 test(auth): authn & authz http placeholder in HTTP path 2022-04-29 12:48:17 +08:00
Yang Miao 7061d94cf9
Merge pull request #7823 from EMQ-YangM/authz_add_metrics
feat: new authz metrics
2022-04-29 11:27:59 +08:00
EMQ-YangM a6920ac11b feat: new authz metrics 2022-04-28 22:01:40 +08:00
zhouzb fa9bd74595 chore: rename selector to filter and fix spellcheck 2022-04-27 11:29:18 +08:00
JianBo He 9f35dd7f80
Merge pull request #7730 from savonarola/jwt-authz
feat(emqx_auth_jwt): use JWT for ACL checks
2022-04-26 14:18:50 +08:00
Zaiming (Stone) Shi a4feb3e6e9 style: reformat emqx_auto_subscribe and emqx_conf 2022-04-25 18:05:10 +02:00
Ilya Averyanov fc2ea9e484 feat(emqx_auth_jwt): use JWT for ACL checks 2022-04-25 11:59:04 +03:00
EMQ-YangM 2d553d711f fix: 'ComFun' missing parameter 2022-04-25 11:38:48 +08:00
EMQ-YangM 625223c2b5 test: fix redis_type 2022-04-22 11:07:50 +08:00
EMQ-YangM 5d9df74be7 test: fix required fields 2022-04-21 18:47:02 +08:00
Zaiming (Stone) Shi dccb1df3eb test: fix cert file match 2022-04-19 09:47:18 +02:00
JimMoen c89c00aed0 test: clean cache api for all clients or specific client 2022-04-18 16:47:52 +08:00
Thales Macedo Garitezi c0d2243e72
refactor(telemetry): move authn/authz info fns to their own apps 2022-04-01 09:27:52 -03:00
JimMoen 82559b9b08 style: erlfmt apps/emqx_authz 2022-04-01 02:19:46 +08:00
JianBo He 989f0a7c2c
Merge pull request #7449 from JimMoen/rm-authz-dry-run
fix(authz): rm authz source update dry_run
2022-03-31 18:15:08 +08:00
JimMoen 4746204f6f fix(authz): rm authz source update dry_run 2022-03-31 10:34:33 +08:00
Ilya Averyanov 0728b1e3f4 chore(emqx_modules): add emqx_topic_metrics_api tests 2022-03-30 21:18:27 +03:00
JimMoen d20388cf01 test(authz): acl file rules update 2022-03-23 21:14:43 +08:00
JimMoen fc687bed27 test(authz): authz mnesia suite json body 2022-03-23 21:14:43 +08:00
JimMoen c2e1c38fdf refactor(authz): prepend and append only allow one source 2022-03-23 21:14:43 +08:00
JimMoen 1ed8e783f4 fix(authz_api): rm authz sources full update 2022-03-21 16:43:08 +08:00
EMQ-YangM d1857ba454 feat: add authn, authz status api 2022-03-18 14:36:33 +08:00
EMQ-YangM 37c4d68f40 fix: ignore authn, authz status and metrics 2022-03-16 11:14:21 +08:00
JimMoen 02ed2148d7 refactor: move api `top` -> `front`, `bottom` -> `rear` 2022-03-15 10:28:46 +08:00
JimMoen f6ee45b2e6 test(authz_api): authz sources move api style 2022-03-15 10:28:46 +08:00
EMQ-YangM b33b3f6eee fix: reduce status_and_metrics 2022-03-14 10:21:51 +08:00
EMQ-YangM afc92798a5 fix(emqx_authz_api_sources): fix resource status 2022-03-13 16:01:33 +08:00
EMQ-YangM f287547251 feat(emqx_authz): add metrics and status to authz 2022-03-13 12:41:03 +08:00
JimMoen b41e396ed2 test(authz): make sure `emqx_resource` and `emqx_connector` stoped 2022-03-11 19:11:07 +08:00
JimMoen f5caf66253 refactor(api): unified api name style 2022-03-11 11:07:55 +08:00
JimMoen bde7e51d8e test(authz): add `DELETE` method test, change request method for all 2022-03-11 11:07:55 +08:00
JimMoen 93c74bd645
Merge pull request #7225 from JimMoen/authn-authz-mnesia-fuzzy-searching
authn and authz mnesia searching by `clientid` or `username`
2022-03-10 17:00:36 +08:00
JimMoen 7274d775cb test(authz): api username fuzzy searching 2022-03-10 13:38:45 +08:00
Shawn 1d023b541f refactor(connnector): rename waiting_connect_complete -> wait_for_resource_ready
Rename the option to wait_for_resource_ready and defaults to 5s.
2022-03-10 10:46:57 +08:00
EMQ-YangM b7674fd19f fix(emqx_authz_file_SUITE): fix config_update_crashed error 2022-03-09 16:35:30 +08:00
EMQ-YangM 583624fb8d fix(emqx_authn): fix test suite 2022-03-09 13:53:05 +08:00
Yang Miao 78cad0a528
Merge pull request #6989 from EMQ-YangM/up_master
refactor(emqx_resource): Improve grouping strategy for emqx_resource_instance
2022-02-16 16:26:28 +08:00
JimMoen 2a1fba97da test(auth): resource use connector provided default port 2022-02-15 10:41:26 +08:00
EMQ-YangM 75b2963efc test(authn,authz): fix create function 2022-02-14 14:10:10 +08:00
Zaiming (Stone) Shi b9343891e4
Merge pull request #6946 from zmstone/refactor-license-simplify-parser-error
refactor: treat throw exception as `{error, Reason}` return
2022-02-11 19:09:40 +01:00
Zaiming (Stone) Shi e2a67760b1 fix(emqx_authz_file): throw exception for catch 2022-02-11 17:16:00 +01:00
EMQ-YangM fae91d72f2 fix(emqx_authz): fix function 'create_resource' 2022-02-11 18:36:55 +08:00
Chris 14630568d6 feat: create tests for connector pgsql module and refactoring 2022-02-10 10:40:46 +01:00
Ilya Averyanov 6441978b08 refactor(authn,authz): unify variable interpolation 2022-01-25 20:54:12 +03:00
zhouzb c59d9798a4 test: fix test case 2022-01-14 09:26:15 +08:00
zhouzb 5e2bc7853f test: fix test cases for pgsql authz 2022-01-13 16:53:47 +08:00
zhouzb 821b50a961 test(mongo): add test case for w_mode option 2022-01-07 09:52:15 +08:00
zhongwencool 3bdfa183f3
Merge pull request #6666 from JimMoen/merge-5.0-beta.3-to-master
Merge 5.0 beta.3 to master
2022-01-06 18:20:30 +08:00
JimMoen 552165db26 test(authz): fix test suite based on release-5.0-beta.3 2022-01-06 15:05:52 +08:00
JimMoen 9a115b99a4 Merge remote-tracking branch 'emqx/release-5.0-beta.3' into merge-5.0-beta.3-to-master 2022-01-06 14:08:45 +08:00
Zaiming (Stone) Shi 63167cea70 chore: update copyright 2022-01-05 20:55:00 +01:00
Zaiming (Stone) Shi 503bf54c77 test(authz): fix meck calls
f
2022-01-04 13:54:25 +01:00
JimMoen fa25991c5c test(authz): authnz acl query string use placehodler 2022-01-04 18:13:27 +08:00
Zaiming (Stone) Shi e3c8f67aaf test: resource creation now checks health
adjust test case to work with new code behavior
2022-01-04 00:54:09 +01:00
Zaiming (Stone) Shi 7b478817bd test: test authz against 'single' mogodb 2022-01-04 00:54:09 +01:00
Zaiming (Stone) Shi 2898fa76e1 Merge remote-tracking branch 'origin/release-5.0-beta.3' into merge-5.0-beta.3-to-master 2022-01-03 11:39:06 +01:00
Ilya Averyanov 2ffcaad41e chore(authz): increase coverage 2021-12-31 01:24:18 +03:00
JimMoen da68dfc8f4 test(authz): `servers` field use string 2021-12-30 15:38:04 +08:00
tigercl d769401869
Merge pull request #6555 from tigercl/chore/new-epgsql
chore: support prepared query in postgresql connector
2021-12-29 13:37:29 +08:00
Ilya Averyanov 9363b6110e chore(authz): make test http server more robust 2021-12-28 11:06:52 +03:00
zhouzb 487b84f166 test: fix test case 2021-12-28 11:37:51 +08:00
zhouzb d26042703e chore: provide prepared_query and equery 2021-12-28 09:52:31 +08:00
Ilya Averyanov 2bada0bab8 chore(authz): test Mria authz 2021-12-24 16:18:46 +03:00
Ilya Averyanov d75e0104cc chore(authz): test file authz with real files 2021-12-24 16:18:41 +03:00
Ilya Averyanov e0f860d7d9 chore(authz): fix HTTP authz, cover with tests 2021-12-24 16:18:36 +03:00
Ilya Averyanov 462ec39cb1 chore(authz): test Postgresql backend with real Postgresql 2021-12-17 14:20:50 +03:00
Ilya Averyanov 0a1a68245d chore(authz): test Mysql backend with real Mysql 2021-12-17 14:18:54 +03:00
Ilya Averyanov a21f67a67e chore(authz): test Mongo backend with real Mongo 2021-12-17 14:18:54 +03:00
Ilya Averyanov 28c319b6c4 chore(authz): test Mongo backend with real Mongo 2021-12-17 14:18:54 +03:00
Ilya Averyanov 6ad71a483e chore(authz): test Redis backend with real Redis 2021-12-17 14:18:54 +03:00
Ilya Averyanov abdb98ffa2 refactor(authz): hide mnesia authz implementation details
* Eliminate type and record sharing through `emqx_authz.hrl`.
* Hide all mria/mnesia interactions inside mnesia authz backend.
2021-12-13 21:23:58 +03:00
Ilya Averyanov 1c9d867c5e chore(authz): add test for authz backend creation dry run 2021-12-08 21:38:10 +03:00
Zaiming (Stone) Shi 867cc3c4ad test: ensure emqx_connector is loaded 2021-12-04 09:33:14 +01:00
JimMoen a58493f7a4 test(authz): fix test suite for schema check and app start 2021-12-02 10:12:10 +08:00
DDDHuang 21bd9bba55
fix: generate palce holder (#6250)
* fix: generate place holder

* style: whitespace cleanup

* refactor(authz): placeholder for athuz

* test: authz test suite for placeholder

* fix: lw place holder suite

* fix: auth n redis suite

Co-authored-by: JimMoen <LnJimMoen@outlook.com>
2021-11-23 10:56:43 +08:00
JianBo He 905e58c93a
Merge pull request #5997 from HJianBo/gw-fixes-part3
Gateway improvement part.3
2021-11-19 09:29:51 +08:00
JianBo He ad2dbb5a49 chore(gw-sn): append messge headers 2021-11-17 14:51:27 +08:00
zhongwencool 04c204374a
chore: All placeholders are placed in the same header file (#6190)
* chore: All placeholders are placed in the same header file

* feat: Separate placeholders from the rules engine
2021-11-17 14:40:48 +08:00
JianBo He d0bdf27e0c chore: fix elvis warnings 2021-11-17 11:04:09 +08:00
JianBo He 814e01c0cb test(authz): deps on emqx_conf instead of meck emqx_schema 2021-11-17 10:46:38 +08:00
JimMoen a65597e302
Authz api mnesia refactor (#6082)
* refactor(authz): macro move to hrl and rename, add meta example

* refactor(authz_api_mnesia): use config schemas for request validations

* chore(authz_api_mnesia): suite module typerefl fit

* chore(style): authz_api_mnesia style format
2021-11-11 16:29:36 +08:00