Commit Graph

229 Commits

Author SHA1 Message Date
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
JimMoen f44bda806a chore(authz): fix test suite page params 2021-10-26 14:02:19 +08:00
Zaiming (Stone) Shi 666b319729
Merge pull request #5989 from zmstone/refactor-ssl-certs-lib
refactor(tls): move ssl files handling to emqx_tls_lib
2021-10-25 12:42:29 +02:00
zhanghongtong 3c2292e74f chore(authz): add more test case 2021-10-25 13:43:28 +08:00
zhanghongtong 198ae4c782 fix(authz): fix configuration could be updated with incorrect values
when updating the configuration, first check with emqx_resouce:create_dry_run/2

Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-10-25 13:43:28 +08:00
Zaiming Shi 71d2e6bebd refactor(authz): call emqx_tls_lib to save & read SSL files 2021-10-24 10:44:47 +02:00
zhongwencool d784e63b9f
emqx_conf (#5939)
* feat(emqx_conf): move conf manager for emqx_machine to emqx_conf

* chore(emqx_conf): change emqx:get_config/2 to emqx_conf:get/2

* fix: common test failed

* fix: badmatch by typo wrong key

* fix(emqx_conf): get the wrong core nodes

* fix(emqx_conf): get core node's tnx_id not latest tnx_id

* fix: add ro_transation when copy conf file

* fix: delete debug info

* fix: change ekka_rlog to mria_rlog

* fix: remove cluster_rpc from emqx_machine.

* fix: don't call ekka:start/0 explicitly

* fix: ekka should be start in emqx_machine
2021-10-21 18:08:51 +08:00
k32 8e58699ff5
Merge pull request #5937 from k32/mria
feat(mria): Replace ekka_mnesia with mria
2021-10-20 13:15:23 +02:00
Zaiming Shi 9c414096c7 test(authz): test HTTP apis for built-in-database 2021-10-20 09:17:21 +08:00
Zaiming Shi ae854db02d test: fix match pattern of returned rules 2021-10-20 09:17:21 +08:00
Zaiming Shi 891a185eda test: enable emqx_authz_api_mnesia_SUITE tests 2021-10-20 09:17:21 +08:00
k32 b3a8753219 fix(mria): Replace mnesia calls with mria 2021-10-19 12:24:35 +02:00
k32 b515a45a4f chore(mria): Rename module: ekka_mnesia -> mria 2021-10-18 22:04:05 +02:00
zhongwencool c73205a589
Ct helpers migrate (#5943)
* chore: common test

* chore: delete emqx_ct_helpers deps
2021-10-18 13:45:52 +08:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
zhanghongtong c5494d5c90 chore(authz mnesia api): ensure built-in-database type source is disabled before purge. 2021-09-26 16:38:08 +08:00
Zaiming Shi 8b6eeef7fc refactor(authz): use macro for cmd names 2021-09-26 16:19:47 +08:00
zhanghongtong 673b12a46d chore(authz mnesia): in the mnesia table, replace atom with int 2021-09-26 16:19:47 +08:00
zhanghongtong 9b3917e0d3 chore(authz mnesia api): get method supports paging
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-09-26 16:19:47 +08:00
zhanghongtong 1a02e0cfd1 feat(authz mnesia api): post accept array data 2021-09-26 16:19:47 +08:00
zhanghongtong 2dc3b51675 chore(authz): use ekka_mnesia instead of mnesia 2021-09-26 16:19:47 +08:00
zhanghongtong b583509976 feat(authz): add authorize for mnesia 2021-09-26 16:19:47 +08:00