Commit Graph

329 Commits

Author SHA1 Message Date
Zhongwen Deng
9f9bf059b9 fix(schema): remove unuse to_bin function; simplify body schema. 2022-02-21 23:02:49 +08:00
JimMoen
4d5ee355bb fix(authz): authz http pool_type use default value random 2022-02-21 18:09:04 +08:00
Ilya Averyanov
2aeb1bc0e8
Merge pull request #7059 from savonarola/elixir-stylecheck
chore(codestyle): add formatting check for Elixir code
2022-02-21 11:43:14 +03:00
JimMoen
eaa659f2a1 refactor: authz_api_settings refactor with hoconsc 2022-02-21 16:40:47 +08:00
JimMoen
ff68e2a20f fix(http): connector and authn/authz http keep-alive default 30s , max 1000 2022-02-21 16:35:15 +08:00
JimMoen
000020617c refactor: authz_api_sources spec 2022-02-21 16:33:08 +08:00
Ilya Averyanov
634d861b90 chore(codestyle): add formatting check for Elixir code 2022-02-18 19:43:48 +03:00
k32
5638bcb92b docs: Fix typos 2022-02-17 23:22:31 +01:00
Zaiming (Stone) Shi
2a6d11c7f1
Merge pull request #7038 from zmstone/chore-rename-emqx-no-space-source-code
chore: EMQ X -> EMQX in source code
2022-02-17 21:13:43 +01:00
zhongwencool
c88504f918
Merge pull request #7023 from zhongwencool/license-alarm-support
License alarm support
2022-02-17 22:09:51 +08:00
Zaiming (Stone) Shi
64db085163 chore: EMQ X -> EMQX in source code 2022-02-16 22:08:12 +01: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
zhongwencool
34fe5082c4 fix(schema): schema global validations not working 2022-02-16 14:20:15 +08:00
JimMoen
2a1fba97da test(auth): resource use connector provided default port 2022-02-15 10:41:26 +08:00
JimMoen
ab7c2b72e3 refactor(connector): db connector provide default port 2022-02-15 00:51:48 +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
Shawn
8207090419 fix: format the code to remove extra spaces 2022-02-09 18:46:49 +08:00
k32
052bd9081d docs(schema): Fix typos in the schema files 2022-01-27 22:39:19 +01:00
Zaiming (Stone) Shi
d6f7ffec3c
Merge pull request #6881 from zmstone/refactor-upgrade-hocon-0.23.0
refactor: upgrade to hocon 0.23.0
2022-01-27 15:48:23 +01:00
Kian-Meng Ang
fc92e4c8bf docs: fix typos 2022-01-27 12:29:38 +01:00
Zaiming (Stone) Shi
252d7e85d9 refactor: call new hocon apis 2022-01-27 00:23:08 +01:00
Ilya Averyanov
5ed27f92b7
Merge pull request #6855 from savonarola/ph-interpolation
refactor(authn,authz): unify variable interpolation
2022-01-26 21:01:11 +03:00
Ilya Averyanov
6441978b08 refactor(authn,authz): unify variable interpolation 2022-01-25 20:54:12 +03:00
Zaiming (Stone) Shi
21183f3b16 docs: fix authz config doc 2022-01-24 13:30:42 +01:00
zhongwencool
03a135c592
Merge pull request #6708 from zhongwencool/improve-error-log
Improve authn/authz error log when query failed.
2022-01-14 16:31:59 +08:00
zhongwencool
5a31001906
Merge pull request #6749 from zhongwencool/fix-authz-headers
fix(authz): Remove unnecessary headers
2022-01-14 15:15:12 +08:00
zhongwencool
1cfab9fed5 chore(log): add more detail log for authz/authn query error 2022-01-14 15:00:02 +08:00
zhongwencool
c9603bd21e fix(authz): Remove unnecessary headers 2022-01-14 14:11:49 +08:00
Shawn
6572785907
Merge pull request #6712 from tigercl/fix/pgsql
fix: fix errors caused by concurrent parsing of sql
2022-01-14 13:37:47 +08: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
JimMoen
82e3565344 chore: major mode file variable for Emacs 2022-01-13 15:53:47 +08:00
zhouzb
2791052135 fix: fix errors caused by concurrent parsing of sql 2022-01-11 09:39:56 +08:00
zhouzb
821b50a961 test(mongo): add test case for w_mode option 2022-01-07 09:52:15 +08:00
Thales Macedo Garitezi
9059f2005a
fix(elixir): put Patch in version and add missing deps
Elixir requires that we use version of the form `Major.Minor.Patch`.
Also, Mix requires dependecies to be declared in `rebar.config` so it
can include the header files correctly.
2022-01-06 10:54:45 -03: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
zhongwencool
f4f5281b16 fix: authz headers default value 2022-01-05 22:06:50 +08:00
zhongwencool
7e48a4e6f5 fix: authz default should be a map 2022-01-05 19:04:51 +08:00
zhongwencool
303707d69d fix: make sure authz headers is binary. 2022-01-05 15:11:16 +08: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
JimMoen
ab37c48860 fix(authz): authz http resource url query string 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
384493369b
Merge pull request #6587 from savonarola/improve-authz-coverage-more
chore(authz): increase coverage
2021-12-31 18:58:21 +03: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
JimMoen
8cb9482542 fix(authz): servers field use string 2021-12-30 15:37:53 +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
Thales Macedo Garitezi
0020cf592f
Merge remote-tracking branch 'origin/master' into build-with-mix-mkII 2021-12-28 11:28:40 -03: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
zhouzb
72a27e9d8f fix: fix undefined function call 2021-12-24 13:44:28 +08:00
zhouzb
80c1128b7a fix(authz): fix deadlock issues 2021-12-23 11:45:58 +08:00
Thales Macedo Garitezi
34d6dbca61
chore(mix): simplify build by using rebar3 for umbrella apps
By treating the apps in the umbrella as dependencies to be managed and
built by rebar3, we can simplify the maintenance of the release, at
the cost of increased build times: using Mix as before, it could track
changed files better than using rebar.  But the complexity and
possibility of discrepancies make it using rebar much more compelling.
2021-12-22 09:40:01 -03:00
Thales Macedo Garitezi
917575de5a
chore(mix): minimal elixir mix release build
This commit enables a minimal working build of EMQX release using
Mix.  However, to properly start the release, several configuration
steps are still missing.  A `mix_release.sh` script does a few hacks
to get the release built with Mix to start properly, by first assuming
that `make emqx` has been run prior to the release, ran once to
generate the `app.*.config` files, and then it copies that and some
other files to the expected places.

Also, `emqx_telemetry` hangs the start procedure because it thinks
it's in an official release and tries to make a request.  We disable
it temporarily via config just to get a working build for now.
2021-12-21 13:51:22 -03:00
zhouzb
25b7719db5 feat(authz): support sync configuration in the cluster 2021-12-21 17:00:49 +08:00
Ilya Averyanov
e24cdb067c chore(authz): fix Mysql variable substitution 2021-12-17 14:20:53 +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
JimMoen
477b62200d fix(authz): placeholder regular expression escape 2021-12-16 23:33:26 +08: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
Ilya Averyanov
b7d227d2ef chore(authz): move file backend to a separate module 2021-12-08 21:38:10 +03:00
Ilya Averyanov
056558e445 chore(authz): encapsulate authz backend logic 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
JimMoen
effa3b8b90 style: make elvis happy 2021-12-02 10:12:10 +08:00
JimMoen
d7ec368884 fix(authz): fix mongo resources create 2021-12-02 10:12:10 +08:00
JimMoen
68af284570 fix(authz): http source create and update 2021-12-02 10:12:10 +08:00
JimMoen
1d3558ebe0 style: make elvis happy 2021-11-26 17:46:38 +08:00
JimMoen
b41c41570a fix(authz): placehodler regular escape 2021-11-26 15:39:42 +08:00
JimMoen
d7c7292321 fix(authz): placeholder regular replace 2021-11-24 11:10:30 +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
Shawn
9c93ea0338 feat(connector): add API for /connectors_test 2021-11-22 17:35:33 +08:00
tigercl
a074cf24d0
Merge pull request #6219 from tigercl/fix/authz-certs
fix(authz): fix badmatch when reading certs
2021-11-19 11:25:29 +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
zhouzb
47851c2430 fix(authz): fix badmatch when reading certs 2021-11-18 14:36:59 +08:00
JimMoen
53b51e31f0 fix(api_schema): add authn mongo missing fields 2021-11-18 12:41:40 +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
b3f9220d02 style: make elvis happy 2021-11-15 16:30:44 +08:00
JimMoen
106aa559e0 fix(api): DELETE success wrongly returned code 200 2021-11-15 16:30:44 +08:00