Commit Graph

726 Commits

Author SHA1 Message Date
zhongwencool a27caff5af
Merge pull request #7739 from DDDHuang/better_dashboard_log
fix: better listener log
2022-04-24 14:08:27 +08:00
DDDHuang feaf89d399 fix: better gateway log 2022-04-24 10:01:38 +08:00
Shawn 984a26945c docs: add i18n ids 2022-04-23 03:51:38 +08:00
JimMoen 1fab779db8 fix(i18n): rm double quotes in i18n confs, add missing translation 2022-04-22 19:26:44 +08:00
JianBo He b018e56340 chore: revert the desc/1 changes 2022-04-22 14:03:09 +08:00
JianBo He d2ba2a64f4 test(gw): fix lookup_cmd -> lookup 2022-04-22 09:19:31 +08:00
JianBo He 64ce6ba4c6 docs(gw): add zh docs 2022-04-22 09:19:31 +08:00
JianBo He 0f46d5ac02 docs(gw): refcator schema/swagger desc fields 2022-04-22 09:19:31 +08:00
firest 1a3641e286 test(gateway): temporarily remove flaky case 2022-04-19 15:58:05 +08:00
JimMoen 9e4b9c6689 refactor: mgmt rm `generate_response/1` 2022-04-19 01:20:57 +08:00
firest e5c062582f test(gateway): increase timeout in stomp test case 2022-04-18 17:17:34 +08:00
firest 4368c69a82 test(gateway): increase gen_tcp:recv wait time in stomp test case 2022-04-18 15:28:46 +08:00
DDDHuang 82ce6ae9f9 fix: bad integer, bad qos; TODO: gateway api * 2 2022-04-16 16:37:10 +08:00
DDDHuang e22d01d25f fix: page & limit & pool_size pos_integer; some bad spelling 2022-04-16 16:37:10 +08:00
JianBo He 56191d42e7
Merge pull request #7586 from lafirest/test/gateway_authz
test(gateway): integration gateway test with http authz
2022-04-14 16:52:33 +08:00
JianBo He 587fbf07ba
Merge pull request #7601 from lafirest/fix/coap_disconnected
fix(coap): fix CoAP incorrect disconnected event
2022-04-13 13:43:58 +08:00
firest 62fa500f85 fix(coap): fix CoAP incorrect disconnected event 2022-04-13 11:15:44 +08:00
JianBo He 7954f32858 chore: remove scram authenticator for all gateway 2022-04-12 16:13:55 +08:00
firest 7afc5626ed test(gateway): integration gateway test with http authz 2022-04-12 13:51:14 +08:00
JianBo He 0fb758916f
Merge pull request #7492 from lafirest/test/gateway_authn
test(gateway): integration gateway test with  authn
2022-04-08 16:05:36 +08:00
firest 7f1bec5d78 test(gateway): fix meck unload error and reformat some codes 2022-04-08 13:44:23 +08:00
firest 786be82d07 test(gateway): optimize test codes organization 2022-04-07 16:53:10 +08:00
JianBo He e63f288ea7
Merge pull request #7491 from HJianBo/fix-cm-call
fix(exproto): keep conn_mod attribute in ConnInfo
2022-04-07 09:19:25 +08:00
JianBo He ff2022d9a0 fix(exproto): keep conn_mod attribute in ConnInfo 2022-04-06 10:45:51 +08:00
Zaiming (Stone) Shi 356fbf6ce1
Merge pull request #7519 from zmstone/0405-5.0-sync-ssl-lib-from-4.3
5.0 refactor: delete deprecated emqx_plugin_libs_ssl module
2022-04-05 22:57:56 +01:00
Thales Macedo Garitezi bdc1253d96
refactor(gateway): re-use `emqx_authentication_config:authenticator_id/1` 2022-04-05 13:28:24 -03:00
Zaiming (Stone) Shi 822a4f9f73 feat: parameterise EMQX_ETC_DIR
both at build time and at runtime
2022-04-05 16:36:13 +02:00
Thales Macedo Garitezi 7d807ce6bb
feat(gateway): export basic gateway info for telemetry 2022-04-04 15:20:48 -03:00
firest 0db6b8d47e test(gateway): integration stomp && exproto test with http authn 2022-04-02 14:06:36 +08:00
firest 25ebe2535e test(gateway): integration MQTT-SN test with http authn 2022-04-02 14:00:37 +08:00
firest ec243d8946 test(gateway): integration CoAP && LwM2M test with http authn 2022-04-02 14:00:33 +08:00
JianBo He 3f6d78dda0 style(gateway): format gateway application 2022-03-31 17:41:32 +08:00
JianBo He 8431387408 chore(exproto): set proto_name default to exproto 2022-03-31 10:02:12 +08:00
ieQu1 d8e16b37da docs(schema): Add documentation for the fields and records 2022-03-30 11:53:53 +02:00
ieQu1 c0e5139e9f docs(schema): Add description for clientinfo_override 2022-03-30 11:53:51 +02:00
ieQu1 410b69d616 docs(schema): Document records for gateway 2022-03-29 14:09:32 +02:00
Zaiming (Stone) Shi 036266769c docs: add more schema desc 2022-03-25 10:52:58 +01:00
ieQu1 077ef073e5 docs(schema): Add descriptions to the schema 2022-03-23 19:05:25 +01:00
ieQu1 8967e13eee docs(schema): Move descriptions from emqx.conf.all 2022-03-23 13:52:54 +01:00
firest ab2f5b9bb7 fix(coap): fix system topic case 2022-03-23 17:25:52 +08:00
firest ab51d8ab8e fix(coap): trigger disconnect logic when the client manually disconnected 2022-03-23 14:19:00 +08:00
JianBo He 83e16a5bc5
Merge pull request #7343 from HJianBo/fix-gw-bugs 2022-03-22 17:49:02 +08:00
firest 0c3d02b02d test(coap): add a observe test case 2022-03-22 11:57:49 +08:00
JianBo He 094c4ad262 fix(exproto): don't carry the ssl confs if ssl.enable is false 2022-03-21 18:44:01 +08:00
JianBo He 670749493b fix(coap): reject duplicated connection request 2022-03-21 18:17:24 +08:00
JianBo He 053f9b422c fix(stomp): fix client.disconnect not trigger 2022-03-21 18:17:24 +08:00
JianBo He 5682dcb72e fix(gw): enrich conninfo for coap&lwm2m 2022-03-21 18:17:24 +08:00
JianBo He 3645cb244b fix(gw): throw the exproto start grpc server starting failure error 2022-03-21 18:17:24 +08:00
DDDHuang e517b41a4d fix(api): desc & remove useless api 2022-03-21 15:03:37 +08:00
DDDHuang e1b6c0770d fix: getway bad api spec 2022-03-21 14:12:19 +08:00
DDDHuang b9b5e376a6 fix: dialyzer & bad func spec 2022-03-21 14:12:19 +08:00
DDDHuang 15b8203ac1 fix: generate ggateway api response code 2022-03-21 14:12:19 +08:00
JianBo He 43c01117bb fix(sn): fix typos 2022-03-17 18:40:13 +08:00
JianBo He fbc0240f26 feat(sn): introduce subs_resume option
As the mqtt-sn v1.2 spec metioned, the gateway will be able to sync the
subscriptions topic-name registry to client when the client resume
it's session

port from: https://github.com/emqx/emqx/pull/7300
2022-03-17 18:38:54 +08:00
Thales Macedo Garitezi 2748c22b0c
fix(ekka): run cleanups on node down events
When using the RLOG DB Backend with Mria, replicant nodes do not
generate `mnesia down` events.  Therefore, cleanup procedures that
some modules do when a node goes down do not work for replicants.

However, replicant do generate `node down` events, so that may be a
safer way to handle cleanup to take into account that type of node.
2022-03-14 15:55:58 -03:00
JimMoen f5caf66253 refactor(api): unified api name style 2022-03-11 11:07:55 +08:00
JimMoen 990a66e1ad feat(gateway): gateway authn mnesia rows fuzzy searching by `clientid` or `username` 2022-03-10 10:01:40 +08:00
JianBo He 724d51a024 fix(mqttsn): fix flaky test 2022-03-09 17:11:09 +08:00
JianBo He f90b27c291 fix(exproto): filter out ssl options if it disabled 2022-03-09 16:47:45 +08:00
JianBo He e72e49b291 chore: fix elvis warnings 2022-03-09 13:46:58 +08:00
JianBo He 5436a3c496 chore(gw): use emqx_gateway_cm:call/4 instead ConnMod:call/3 2022-03-09 13:46:56 +08:00
JianBo He 9422ac4bc1 fix(mqttsn): fix unused variable 2022-03-09 12:57:51 +08:00
JianBo He 6ab993c3e8 test(mqttsn): uncomment asleep testcases 2022-03-09 12:57:51 +08:00
JianBo He 98b97ad217 feat(mqttsn): support asleep client 2022-03-09 12:57:51 +08:00
JianBo He 01eb3ca93a chore(mqttsn): fix frame formating crash 2022-03-09 12:57:51 +08:00
JianBo He 8ac0152af0 chore(gw): log SEND_data 2022-03-09 12:57:51 +08:00
JimMoen f25da61f39 refactor(mgmt): `Params` => `QString`, `QsScheam` => `QSchema` 2022-03-04 11:14:03 +08:00
JianBo He 63ef00a208 fix(gw): add takeover_session/3 for cm_proto_v1 2022-03-02 16:43:53 +08:00
JianBo He 7ade24b344 feat(mqttsn): support to register unknown topic-name to the client 2022-03-02 14:58:43 +08:00
JianBo He ddf3585b22 refactor(gw): support session takeover 2022-03-02 14:58:43 +08:00
JianBo He 48cc641ec0
Merge pull request #7114 from lafirest/refactor/coap_api
refactor(emqx_coap): refactor CoAP API
2022-02-28 10:14:26 +08:00
Zaiming (Stone) Shi b603d544b2 refactor(emqx_gateway_schema): use remote ref instead of redefine
the ssl_client_opts struct
2022-02-27 14:44:28 +01:00
firest 6b6acaec43 refactor(emqx_coap): refactor CoAP API 2022-02-26 17:30:34 +08:00
Zhongwen Deng db584f79d6 feat: upgrade hocon to 0.25.0 to replace nullable with required. 2022-02-24 22:39:03 +08:00
JimMoen d735fecfba
Merge pull request #7097 from JimMoen/fix-stomp-conninfo
fix(gateway): enrich stomp conninfo before run hooks
2022-02-22 18:26:03 +08:00
JianBo He 20e3b721a8 chore(gw): ignore auto-subscribe msg 2022-02-22 15:43:04 +08:00
JimMoen 05f1593386 fix(gateway): enrich stomp conninfo before run hooks 2022-02-22 15:42:21 +08:00
Zaiming (Stone) Shi 1be3eb1446 chore: rename EMQX Broker to just EMQX 2022-02-19 12:51:34 +01:00
k32 5638bcb92b docs: Fix typos 2022-02-17 23:22:31 +01:00
Zaiming (Stone) Shi 64db085163 chore: EMQ X -> EMQX in source code 2022-02-16 22:08:12 +01:00
Zaiming (Stone) Shi b3d9605722 chore(conf): EMQ X -> EMQX in conf files 2022-02-16 17:50:41 +01:00
Zaiming (Stone) Shi 79d7832a07
Merge pull request #7020 from zmstone/docs-more-renames-in-descriptive-info
docs: More EMQ X -> EMQX rename in descriptive strings
2022-02-16 13:43:19 +01:00
zhongwencool 310a97305a
Merge pull request #6997 from zhongwencool/epoch-rfc3339-convert
feat(schema): schema support epoch_second, epoch_millisecond type.
2022-02-16 16:51:38 +08:00
Zaiming (Stone) Shi 2e94880bb6 docs: More EMQ X -> EMQX rename in descriptive strings 2022-02-15 22:39:11 +01:00
Zaiming (Stone) Shi 667d66eb1e docs(README): EMQ X -> EMQX 2022-02-15 16:19:26 +01:00
zhongwencool 498434826a feat(schema): schema support epoch_second, epoch_millisecond type. 2022-02-14 11:35:32 +08:00
zhongwencool f5415589e9 chore(schema): use emqx_schema:qos() instead of union integer. 2022-02-11 10:09:59 +08:00
JianBo He e2b330e8be fix(stomp): fix unexpected_linefeed error if the packet truncated on headers 2022-02-10 12:26:13 +08:00
Shawn fd87bce8f7
Merge pull request #6950 from terry-xiaoyu/remove_extra_spaces
fix: format the code to remove extra spaces
2022-02-10 09:35:18 +08:00
Thales Macedo Garitezi e861f3963e
Merge pull request #6947 from thalesmg/fix-mgmt-cluster-print
fix(ctl): fix formatting when printing messages without arguments
2022-02-09 11:50:59 -03:00
Shawn 8207090419 fix: format the code to remove extra spaces 2022-02-09 18:46:49 +08:00
Shawn e220810b90 fix(sn): update calling to session APIs 2022-02-09 12:08:06 +08:00
Thales Macedo Garitezi 152bbe6bb3
refactor: rm unused fn 2022-02-08 18:18:18 -03:00
k32 052bd9081d docs(schema): Fix typos in the schema files 2022-01-27 22:39:19 +01:00
Zaiming (Stone) Shi 0cde9e6ecf
Merge pull request #6878 from zmstone/slog-ftw
refactor: delete deprecated logging macros
2022-01-27 16:15:47 +01:00
Kian-Meng Ang fc92e4c8bf docs: fix typos 2022-01-27 12:29:38 +01:00
Zaiming (Stone) Shi 1718360156 refactor: delete deprecated logging macros 2022-01-26 23:25:11 +01:00
lafirest 2522a36b0c
Merge pull request #6862 from lafirest/fix/coap
fix(emqx_coap): handle invalid query string in parse
2022-01-26 14:30:50 +08:00
lafirest d422afdf0d
Merge pull request #6864 from lafirest/fix/ignore_auto_sub
fix(emqx_coap): ignore auto subscribe
2022-01-26 13:38:29 +08:00
firest 97c18bb0f2 fix(emqx_coap): ignore auto subscribe 2022-01-26 11:25:24 +08:00
firest a544f162c9 fix(emqx_coap): handle invalid query string in parse 2022-01-26 11:08:12 +08:00
Zaiming (Stone) Shi 2105d1f22b test: call ct helpers to load config 2022-01-25 11:50:18 +01:00
k32 c4cb9973a6 fix(emqx_gateway): Apply remarks 2022-01-21 10:42:55 +01:00
k32 925654978e refactor(emqx_gateway): Reuse emqx_gateway_cm APIs 2022-01-20 19:16:30 +01:00
k32 706d9a899a fix(emqx_gateway_cm): Fix channel ID in set_chan_stats 2022-01-20 18:12:50 +01:00
k32 ab8ab21383 refactor(emqx_gateway): Decorate RPCs 2022-01-20 18:12:50 +01:00
JimMoen 31edd49f76 fix(topic_metrics): `POST` `PUT` need response 2022-01-20 10:15:06 +08:00
k32 36f10e929d test(lwm2m): Fix flaky test 2022-01-18 17:36:10 +01:00
JianBo He c8088f18d9 chore(gw): fix dialyzer warnings 2022-01-14 10:56:19 +08:00
JianBo He 43284768d0 chore(gw): more code coverage for emqx_gateway_conn module 2022-01-14 10:48:56 +08:00
JianBo He cce0b1ca34 fix(stomp): fix the sticky tcp stream parsing 2022-01-14 10:48:56 +08:00
JianBo He 44ea853059 test(gw): more coverage for emqx_gateway_cm 2022-01-14 10:48:56 +08:00
JianBo He 4ce11fec6e fix(stomp): fix parsing rear frame split byte crash 2022-01-14 10:48:56 +08:00
JianBo He e9e559ccd0 test: more code coverage for emqx_gateway_api_clients 2022-01-14 10:48:56 +08:00
JianBo He 3caf0822c4 test(gw): more testcases for emqx_gateway_metrics 2022-01-14 10:48:56 +08:00
JianBo He a829b0b9d0 test(gw): more testcases for emqx_gateway module 2022-01-14 10:48:56 +08:00
JianBo He 056e284bc2 test(gw): more testcases for emqx_gateway_cm_registry 2022-01-14 10:48:56 +08:00
JianBo He 0e011ec4b8 test(gw): more testcases for emqx_gateway_cli module 2022-01-14 10:48:56 +08:00
JianBo He 79a653e2b4 refactor(gw): more readable CLI print 2022-01-14 10:48:56 +08:00
JimMoen d8f49f8a5f
Merge pull request #6732 from JimMoen/telemetry-api-refactor
refactor(api): telemetry api swagger spec
2022-01-14 09:36:54 +08:00
JimMoen 8c9d98b583 chore: LICENSE Copyright reserved 2022-01-13 16:40:08 +08:00
JimMoen 82e3565344 chore: major mode file variable for Emacs 2022-01-13 15:53:47 +08:00
JianBo He fcc0d4a2e4 chore: client searching support \[]()* chars 2022-01-10 09:07:53 +08:00
Zaiming (Stone) Shi e9fb999236
Merge pull request #6667 from zmstone/chore-fix-copyright-update-script
chore: fix copyright update script to include more files
2022-01-06 13:45:24 +01: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
Zaiming (Stone) Shi 9f7b513a3f chore: fix copyright update script to include more files 2022-01-06 08:44:35 +01: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 67ba3a06ea chore(gateway): update copyright 2022-01-05 20:55:00 +01:00
Zaiming (Stone) Shi 63167cea70 chore: update copyright 2022-01-05 20:55:00 +01:00
JianBo He 47441fb747 fix(gw): fix bad default oom policy 2022-01-05 15:49:44 +08:00
Zaiming (Stone) Shi 211b8e1b06 Merge remote-tracking branch 'origin/release-5.0-beta.3' into merge-5.0-beta.3-to-master 2022-01-04 22:48:25 +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
JianBo He 2411c22b42 fix(gw): fix bad listners field on http response 2021-12-31 14:59:17 +08:00
JianBo He 990514a048 fix(gw): stop xml_object_db process synchronously 2021-12-31 14:32:03 +08:00
JianBo He 2a20f110b9 fix(gw): use emqx_http_lib to parse uri 2021-12-31 14:32:03 +08:00
JianBo He 6280c8c9f0 chore: fix dialyzer warnings 2021-12-29 14:02:45 +08:00
Thales Macedo Garitezi 8f4453fedb
fix(gateway): undo move headers to root `include`
Keeping headers in the src directory makes sense for the interfaces we
don't want to expose outside, but the `include_lib` directive fails to
compile under Mix. Changing `include_lib("emqx_gateway/src/...")` to
`-include("src/...")` pleases both Mix and Rebar.
2021-12-28 17:34:47 -03:00
Thales Macedo Garitezi 0020cf592f
Merge remote-tracking branch 'origin/master' into build-with-mix-mkII 2021-12-28 11:28:40 -03:00
JianBo He 8203b1f328 refactor(gw): simplify massive repeated codes 2021-12-27 16:50:39 +08:00
JianBo He 76b35910b7 chore(gw): fix elvis warnings 2021-12-27 16:03:31 +08:00
JianBo He fca5a3bc21 chore(gw): add cli testcases 2021-12-27 16:03:31 +08:00
Thales Macedo Garitezi e137555052
fix(tests): fix include paths that were moved 2021-12-22 15:15:19 -03:00
JianBo He b846193556
Merge pull request #6518 from HJianBo/gw-review-r2 2021-12-22 22:10:18 +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
JianBo He 1bcdbf3a06 chore(gw): make some fields required 2021-12-22 16:49:34 +08:00
JianBo He 6d4aac1600 chore(gw): improve http error messages 2021-12-22 16:49:33 +08:00
JianBo He 3fd9061418 fix(gw): save coap channel info 2021-12-22 16:49:33 +08:00
zhongwencool 2e10a5700c
Merge pull request #6515 from zhongwencool/fix-bann-utf8
fix(banned): create banned with utf8 failed by 500 response
2021-12-22 16:08:34 +08:00
zhongwencool b11a15fa00 fix(banned): create banned with utf8 failed by 500 2021-12-22 14:29:15 +08: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
JianBo He 5b1ed76a44 chore(gw-frame): export types for dialyzer check 2021-12-20 10:59:16 +08:00
JianBo He 92fd9c1eca chore(gw): fix adding subscription 2021-12-17 15:31:07 +08:00
JianBo He 52c78974d6 chore(gw): fix elvis warnings 2021-12-17 14:16:00 +08:00
JianBo He 561c95c31a feat(lwm2m): support subscribe/unsubscribe operations 2021-12-17 14:16:00 +08:00
JianBo He bfbf377a45 feat(coap): support subscribe/unsubscribe operations 2021-12-17 14:16:00 +08:00
JianBo He 6b8bdfd113 chore(gw): support to get subscriptions from coap 2021-12-17 14:16:00 +08:00
JianBo He 3443aeff18 fix(gw): handle discard/kick event 2021-12-17 14:16:00 +08:00
JianBo He a2823f2ad6 chore(gw): improve some type specs 2021-12-17 14:16:00 +08:00
JianBo He 5224da57dc
Merge pull request #6411 from HJianBo/gw-improve-apis-3
More precise gateway http-api examples
2021-12-10 16:52:49 +08:00
firest 8493b61cb5 refactor(eqmx_limiter): use the new hierarchical token bucket to replace the old ratelimit code 2021-12-10 14:37:23 +08:00
JianBo He fa11c6df9c test(gw): fix bad test cases 2021-12-10 10:41:38 +08:00
JianBo He 159ba63530 chore: upgrade grpc-erl to 0.6.4 2021-12-09 15:06:18 +08:00
JianBo He e662628581 chore(gw): fix bad default value in query-string 2021-12-09 14:50:28 +08:00
lafirest c9cbaeff95 fix(emqx_lwm2m): limit the max size of cmd record 2021-12-09 14:39:11 +08:00
JianBo He 028f1fa71c chore(gw): fix listener examples 2021-12-09 11:33:09 +08:00
JianBo He afb2cf19c2
Merge pull request #6297 from HJianBo/gw-improve-apis-2
Standardize HTTP-APIs return value and Status/Error Code
2021-12-08 18:02:13 +08:00
JianBo He 7c261b5356 chore(gw): improve examples for _gateway_api 2021-12-08 17:18:39 +08:00
JianBo He e48f10d2d6 chore(gw): ignore needless args 2021-12-08 11:33:11 +08:00
JianBo He a937a3d4dc chore(gw): fix bad argument type 2021-12-08 11:13:00 +08:00
JianBo He 0eff5358ca chore(gw): add examples for gw&client api 2021-12-08 10:52:27 +08:00
Zaiming (Stone) Shi 9276a5bc3c
Merge pull request #6394 from zmstone/fix-typo-in-hook-point-name
fix: typo takeovered -> takenover
2021-12-07 21:06:30 +01:00
Zaiming (Stone) Shi 5440b431a1 fix: typo takeovered -> takenover 2021-12-07 16:06:23 +01:00
JianBo He d735e2e755 chore: delete 500 error 2021-12-06 16:34:00 +08:00
JianBo He f1dbeb4bda chore: fix bad result match 2021-12-06 16:34:00 +08:00
JianBo He dab3e14686 fix(gw): fix static checking 2021-12-06 16:34:00 +08:00
JianBo He 7f04837ad2 fix(gw): fix elvis warnings 2021-12-06 16:34:00 +08:00
JianBo He 3f35604d16 refactor(gw): fix gateway http api schema 2021-12-06 16:34:00 +08:00
JianBo He f3f3f12635 refactor: improve the _api_clieints implement 2021-12-06 16:33:59 +08:00
JianBo He 01c50992e9 refactor: improve gw api 2021-12-06 16:33:38 +08:00
JianBo He 169848c027 feat(gw): return the created/updated resource info 2021-12-06 16:32:46 +08:00
JianBo He bc012d6554 chore(gw): change lwm2m&coap api path 2021-12-06 16:30:59 +08:00
Zaiming (Stone) Shi a723e41390 test: fix a flaky test which gets interfered by other test cases 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi 5d3cb6ae1c refactor(authn): align authn config root name
authn configs are checked independently per-auth provider,
this was to make authn providers more plugable.

in order to make environment variable overrides work for authn,
we need to have a unified view of the config layout,
no matter from root level, or partially checking per-provider
config independently, i.e. we try to use the same config envelop.
2021-12-04 09:33:14 +01:00
zhongwencool c1a7d7bede fix(conf): emqx_conf return nest error 2021-12-01 16:08:49 +08:00
lafirest cfe2954a88 fix(emqx_gateway): fix the function_clause error when client disconnect after connection created 2021-11-30 12:25:06 +08:00
Ilya Averyanov ea0fa24ce5 chore(ct): remove verbose output during tests 2021-11-25 18:30:50 +03:00
JianBo He 27270ca679 test(gw): fix elvis warnings 2021-11-23 16:36:11 +08:00
JianBo He 5204a1c6d4 test(gw): reduce useless log print 2021-11-23 16:01:40 +08:00
DDDHuang 6a60c17970
fix: add lw gateway endpoint placeholder support (#6267) 2021-11-23 12:08:45 +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 50542ec441
Merge pull request #6248 from HJianBo/gw-improve-apis-1
Add authentication data management APIs for gateway
2021-11-23 09:12:04 +08:00
JianBo He 1e2eac0fce test(gw): add tests for authm data-mgmt 2021-11-22 17:38:59 +08:00
JianBo He 4eb27ce25b fix(gw): fix bad paging params 2021-11-22 17:38:59 +08:00
JianBo He 7d9930b64e feat(gw): support data-management apis gw's authn 2021-11-22 17:38:59 +08:00
JianBo He 4f752fb5ab chore(gw): fix elvis warnings 2021-11-22 17:38:59 +08:00
JianBo He f033fad7b3 refactor(gw): deps on emqx_dasboard_swagger 2021-11-22 17:38:59 +08:00
Shawn 9c93ea0338 feat(connector): add API for /connectors_test 2021-11-22 17:35:33 +08:00
JianBo He ad2dbb5a49 chore(gw-sn): append messge headers 2021-11-17 14:51:27 +08:00
JianBo He d0bdf27e0c chore: fix elvis warnings 2021-11-17 11:04:09 +08:00
JianBo He f23d2f2c92 chore: refine case side-effect 2021-11-17 10:46:46 +08:00
JianBo He 814e01c0cb test(authz): deps on emqx_conf instead of meck emqx_schema 2021-11-17 10:46:38 +08:00
JianBo He 883c1b2e59 chore(gw): remove needless lines 2021-11-16 10:00:54 +08:00
JianBo He cf1d98adc6 chore(gw): save cert files 2021-11-16 10:00:54 +08:00
JianBo He 5a08fa6a03 docs(gw): add gateway comment 2021-11-16 10:00:54 +08:00
JianBo He 1f067d6f3b docs(gw): add docs for gateway schema 2021-11-16 10:00:54 +08:00
JianBo He bc3f3b4c55 test(gw): more robust testing 2021-11-16 10:00:53 +08:00
JianBo He 287859fe36 chore(gw): integrate emqx-conf 2021-11-16 09:58:37 +08:00
JianBo He cf17a55079 chore(gw): rename cm-registry shard name 2021-11-16 09:58:37 +08:00
zhongwencool 01f29ab052
chore(swagger): lwm2m2 http api to hocon (#6153) 2021-11-15 15:08:50 +08:00
Zaiming Shi b96a106463 style: make elvis happy 2021-11-10 22:54:58 +01:00
Zaiming Shi 9c1972020c test: fix flaky test emqx_stomp_SUITE:t_rest_clienit_inf 2021-11-10 22:51:18 +01:00
lafirest e8f6035c34
feat(emqx_lwm2m): add some lwm2m api (#6047) 2021-11-10 14:20:33 +08:00
JianBo He b36865e970 fix(api): escape the searching string 2021-10-26 10:34:03 +08:00
Ilya Averyanov e37ecc10a6 style(behaviour attrs): unify behaviour declarations 2021-10-21 15:10:59 +03: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
JianBo He 9d4268e5e6 test(gw): ensure subscription established 2021-10-20 10:40:35 +08:00
JianBo He 7c04dbc585 test(gw): eliminate side effect between tests 2021-10-20 10:40:35 +08:00
JianBo He 69df027ee9 chore(gw): use SLOG to replace LOG 2021-10-20 10:40:35 +08:00
JianBo He 2416fa4e13 chore(gw): return 204 if no authn config 2021-10-20 10:40:35 +08:00
JianBo He 46e0609544 test(gw): add clients HTTP-API tests 2021-10-20 10:40:35 +08:00
JianBo He 6f0d0ab473 test(gw): eliminate side effect between tests 2021-10-20 10:40:35 +08:00
JianBo He 1cf833e1c0 test(gw): ensure emqx_authn starting state 2021-10-20 10:40:35 +08:00
JianBo He 7b211d35b8 test(gw): add basic tests for http-api 2021-10-20 10:40:35 +08:00
JianBo He e56cbd8a30 chore(gw): refine test case 2021-10-20 10:40:35 +08:00
JianBo He 49adf2f7d2 chore(gw-lwm2m): set qmode to duration_s type 2021-10-20 10:40:35 +08:00
JianBo He e4adc07add chore(gw-exproto): refactor ssl options 2021-10-20 10:40:35 +08:00
JianBo He ac42a91fc2 chore(gw-exproto): retry the closed grpc stream 2021-10-20 10:40:35 +08:00
JianBo He fc2e358f01 chore(gw): add ssl feilds for exproto 2021-10-20 10:40:35 +08:00
JianBo He b637764095 chore(gw): return unloaded status instead of 404 2021-10-20 10:40:35 +08:00
JianBo He ec4198c91c feat(gw-lw): return the special fields for lwm2m 2021-10-20 10:40:35 +08:00
JianBo He 92a5c333af chore(gw-lwm2m): store lifetime in clientinfo 2021-10-20 10:40:35 +08:00
JianBo He cfc905aa1a fix(gw): insert channel info into ets table 2021-10-20 10:40:35 +08:00
JimMoen a8bb2a60b0 fix(gateway_api): client ip and port as two fields when clients query 2021-10-19 15:36:02 +08:00
k32 d14b8e7da9 chore(mria): ekka_rlog -> mria_rlog 2021-10-18 22:04:05 +02:00
k32 326923850c chore(mria): Get rid of copy_mnesia callback 2021-10-18 22:04:05 +02:00
k32 e14a62d4d6 chore(mria): ekka_mnesia:start/stop -> mria:start/stop 2021-10-18 22:04:05 +02:00
k32 9965d6e028 chore(mria): ekka_mnesia:create_table -> mria:create_table 2021-10-18 22:04:05 +02:00
k32 ae2056da1b chore(mria): Fix clear_table and ro_transaction calls 2021-10-18 22:04:05 +02:00
k32 ff48322e0c chore(mria): ekka_mnesia:running_nodes -> mria:running_nodes 2021-10-18 22:04:05 +02:00
k32 b515a45a4f chore(mria): Rename module: ekka_mnesia -> mria 2021-10-18 22:04:05 +02:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
JimMoen 40ab0064ae fix(api): invalid params HTTP Code 400 2021-10-14 18:57:33 +08:00
zhongwencool d80f20aca3
feat(swagger): define mgmt config_api by hocon schema (#5814)
* feat(swagger): define mgmt config_api by hocon schema

* fix: enum can't defined by integer, use union.

* fix: hocon schema union to enum
2021-10-13 14:04:43 +08:00
lafirest 3524942766 fix: change all ~s in io format to ~ts
we should use unicode to replace latin1
2021-10-12 15:09:24 +08:00
JimMoen 19456d84a5 style: code format fix 2021-10-12 10:37:45 +08:00
Zaiming (Stone) Shi 40963221f8
Merge pull request #5898 from zmstone/refactor-slog
Refactor slog
2021-10-11 16:15:44 +02:00
Zaiming Shi 7e9d7c4858 test(proper): move emqx_ct_proper_types to local repo
previously provided by emqx-ct-helpers
2021-10-11 15:28:12 +02:00
JimMoen 3960204ce3 refactor(mgmt_api): `select_table_with_count`. 2021-10-11 21:11:34 +08:00
JimMoen ea7aa5bc41 refactor(mgmt_api): use `select_table` congruously. 2021-10-11 21:11:34 +08:00
JimMoen b65c9908a1 refactor(mgmt_api): Clearer variable name. 2021-10-11 21:11:34 +08:00
JianBo He 45ca168216 test(gw): fix bad test cases 2021-09-30 15:51:02 +08:00
JianBo He ac3af8260d fix(gw): fix print client record error 2021-09-30 15:51:02 +08:00
JianBo He adaf3db719 refactor(gw): put conf operations into emqx_gateway_conf mod 2021-09-30 15:51:02 +08:00
JianBo He 642b588ad0 fix(gw): fix removing listener error 2021-09-30 15:51:02 +08:00
JianBo He 8e4256c06f chore(conf): refine config format 2021-09-30 15:51:02 +08:00
Zaiming Shi e7e8b8c77b fix(schema): check tlsv1.3 availability 2021-09-27 13:53:54 +02:00
lafirest acb5c693ba
Merge pull request #5767 from lafirest/fix/time_unit
fix(schema): fix some time unit in schema
2021-09-26 15:35:27 +08:00
JianBo He 8e78d29325 chore(gw): improve emqx_gateway_schema 2021-09-26 15:19:55 +08:00
JianBo He 791408cd99 refactor(gw): simplify code structure
1. Add the management API for listener's authn
2. Clarify responsed error messages
2021-09-26 15:19:55 +08:00
JianBo He 5ad1a8c232 chore(gw): fix test case errors 2021-09-26 15:19:55 +08:00
JianBo He f0ac62c513 refactor(gw): use emqx_gateway_conf to update conf 2021-09-26 15:19:55 +08:00
JianBo He b55a1f62c3 test(gw): more cases for emqx_gateway_conf 2021-09-26 15:19:55 +08:00
JianBo He d163e99d58 chore(gw): add cases for emqx_gateway_conf 2021-09-26 15:19:55 +08:00
JianBo He f68dfff0d6 refactor(gw): refactor config hot-upgrade mechnism 2021-09-26 15:19:55 +08:00
JianBo He a9e32ac106 chore(gw): fix gatway enable/1 not working 2021-09-26 15:19:55 +08:00
JianBo He d8176f4378 chore(gw): pass listener id into listener params 2021-09-26 15:19:55 +08:00
JianBo He 3e033b419c refactor(gw): integrate with authn 2021-09-26 15:19:55 +08:00
JianBo He eda94f5754 chore(gw): more comment for coap options 2021-09-26 15:19:55 +08:00
JianBo He aa03023811 chore(gw): http-api for loading gateway 2021-09-26 15:19:55 +08:00
lafirest e31e175e47 fix(schema): fix some time unit in schema 2021-09-26 14:38:53 +08:00
Zaiming Shi 97e1cf65b7 refactor(schema): make a client ssl options schema
client and server ssl options share some common fields
this commit make an abstraction for the common fields
then export server_ssl_options_schema/2 and client_ssl_options_schema/1
for other schema modules to call
2021-09-23 16:56:02 +02:00
Zaiming Shi fbd5701989 fix(emqx_schema): make ssl config schema right 2021-09-23 16:56:02 +02:00
JianBo He 2fe96a3ad0 chore(gw-lwm2m): format emqx_lwm2m_tlv_SUITE 2021-09-17 18:13:57 +08:00
JianBo He 6da1196244 chore(gw-lwm2m): refine emqx_tlv_SUITE cases 2021-09-17 18:13:57 +08:00
lafirest 24eb0ac7bb
Merge pull request #5721 from lafirest/test/coap_case
test(emqx_coap): add some test case
2021-09-17 09:46:50 +08:00
lafirest a83882a3b8
Merge pull request #5726 from lafirest/test/emqx_lwm2m
test(emqx_lwm2m): remove the lwm2m_coap dependency
2021-09-17 09:41:48 +08:00
JimMoen deac54c847 chore(for editor): Add comments for Emacs major mode. 2021-09-16 15:43:30 +08:00
lafirest acbbbbcd24 test(emqx_lwm2m): remove the lwm2m_coap dependency 2021-09-14 11:20:53 +08:00
lafirest 99566f12bb test(emqx_coap): add some test case 2021-09-14 11:11:30 +08:00
zhongwencool 86eb6605f1
Merge pull request #5623 from zhongwencool/cluster-call-api
feat(cluster-call): support confirm success after all mfa apply ok
2021-09-13 16:03:47 +08:00
JianBo He 94c51f9253 chore(gw): fix dialyzer warnings 2021-09-10 18:41:23 +08:00
JianBo He 18ed1c9794 chore(gw): add listeners apis 2021-09-10 18:41:23 +08:00
lafirest 9fd9e09721
Merge pull request #5708 from lafirest/test/emqx_lwm2m
test(emqx_lwm2m): add some time intervals between test operations
2021-09-10 18:02:42 +08:00
lafirest b8d4c12008 test(emqx_lwm2m): add some time intervals between test operations 2021-09-10 14:42:29 +08:00
Zaiming Shi cca3a4414f fix(bin/emqx): do not try to find vm.args file for cold_eval 2021-09-10 07:28:12 +02:00
Zaiming Shi 3a60f00643 refactor(emqx_gateway_schema): use hoconsc:map 2021-09-10 07:27:01 +02:00
zhongwencool 5a4428c53d Merge branch 'cluster-call-api' of https://github.com/zhongwencool/emqx into zhongwencool-cluster-call-api 2021-09-10 13:11:13 +08:00
Shawn 1dae970cd3 refactor(rule): move emqx_rule_utils.erl -> emqx_plugin_libs_rule.erl 2021-09-10 11:43:03 +08:00
lafirest 5693981b54
Merge pull request #5699 from lafirest/feat/lwm2m_api
refactor(emqx_lwm2m): refactor lwm2m api use new rest framework
2021-09-10 10:34:18 +08:00
JianBo He 5da085bacc chore(gw): improve the listener started banner 2021-09-09 17:33:04 +08:00
JianBo He 020e04e5cf chore(gw): improve the default confs 2021-09-09 17:33:04 +08:00
JianBo He 0453702ce5 refactor(gw): improve http-api return structure 2021-09-09 17:33:04 +08:00
JianBo He e94e09075c refactor(gw): keep listeners conf tree compliance with core 2021-09-09 17:33:04 +08:00
lafirest 60914697b2 refactor(emqx_lwm2m): refactor lwm2m api use new rest framework 2021-09-09 16:37:14 +08:00
lafirest 9ad9f619c1
Merge pull request #5676 from lafirest/feat/coap_api
feat(emqx_coap): add emqx_coap_api
2021-09-08 22:23:22 +08:00
Jim Moen 4e5d781d21 fix: Words spelling fix. 2021-09-08 11:39:56 +08:00
lafirest 89f48f89eb feat(emqx_coap): add emqx_coap_api
1. add a request api for emqx_coap
2. fix some emqx_coap logic error
2021-09-07 19:20:52 +08:00
lafirest 35cc0d972d
Merge pull request #5660 from lafirest/fix/emqx_lwm2m
fix(emqx_lwm2m): fix some error and incomplete function
2021-09-07 16:15:17 +08:00
tigercl bd7a8179b4
Merge pull request #5664 from tigercl/refactor/authn
refactor(authn): refactor to support global and listener authentication
2021-09-07 11:38:46 +08:00
zhouzb 627de1d58c fix(test): fix test case 2021-09-07 10:29:45 +08:00
lafirest caee51f92a fix(emqx_lwm2m): fix some error and incomplete function 2021-09-07 09:59:07 +08:00
JianBo He ba9ad47cc1 fix(gw-exproto): fix grpc remote call 2021-09-07 09:49:33 +08:00
zhouzb e998770f2e refactor(authn): refactor to support global and listener authentication 2021-09-06 18:46:08 +08:00
JianBo He c42c1e698a chore(gw): add From param for _channel:handle_call/3 2021-09-06 09:16:03 +08:00
Zaiming Shi ec13463f4a refactor(schema): prepare for hocon schema doc generation 2021-09-03 11:02:31 +02:00
lafirest d7b198b292
Merge pull request #5638 from HJianBo/gw-fix-udp-outgoing
fix(gw): not packing udp packages
2021-09-03 10:11:05 +08:00
JianBo He 956308f0ca feat(gw-mqttsn): support subscribe/unsubscribe operation 2021-09-03 09:50:07 +08:00
JianBo He dc05cdc586 chore(gw): fix dialyzer warnings 2021-09-03 09:50:07 +08:00
JianBo He fd12a7ac9c chore(gw): improve the gateway api swagger codes 2021-09-03 09:50:07 +08:00
JianBo He 40d34ccd85 fix(gw): fix the subscription apis bugs 2021-09-03 09:50:07 +08:00
JianBo He 1748de5ee3 feat(gw): support the sub/unsub operation 2021-09-03 09:50:07 +08:00
JianBo He 14b39224d4 chore(gw): clients http implement skeleton 2021-09-03 09:50:07 +08:00
JianBo He 52b6d620ee feat(gw): implement clients list http-api 2021-09-03 09:50:07 +08:00
JianBo He 3f0ef7efa8 feat(gw): add api_clients swagger defination 2021-09-03 09:50:07 +08:00
JianBo He cfe64d9c6f fix(gw): not packing udp packages 2021-09-03 09:44:10 +08:00
zhongwencool 662f7438fa chore: dos2unix format
find . -type f -print0 | xargs -0 dos2unix
2021-09-01 15:07:20 +08:00
lafirest 7075f3260e refactor(emqx_lwm2m): port lwm2m into emqx_gateway framework 2021-08-31 20:01:47 +08:00
Zaiming Shi 5165fd6b30 refactor(schema): implement new hocon_schema callbacks 2021-08-30 09:56:03 +08:00
JianBo He fdb41fe137 chore(gw): adapt the lates minirest and emqx-config 2021-08-27 18:23:12 +08:00
JianBo He dacc53facf refactor(gw): suppport the hot upgrade gateway instance 2021-08-27 18:23:12 +08:00
JianBo He 8886d60720 refactor(gw): change the on_gateway_update/3 callback params 2021-08-27 18:23:12 +08:00
JianBo He bce130d9f9 chore(gw): integrate config-handler 2021-08-27 18:23:12 +08:00
JianBo He 86e28d5abb chore(gw): rename rawconf to config 2021-08-27 18:23:12 +08:00
JianBo He 9c855ba8c2 chore(gw): cleanup the massive schema defination 2021-08-27 18:23:12 +08:00
JianBo He ef372e415d chore(gw): fix the time format 2021-08-27 18:23:12 +08:00
JianBo He e239fb07cd chore(gw): add http-api for gateway summary lists 2021-08-27 18:23:12 +08:00
JianBo He 836ca38c2b chore(gw): append the protoname into listener name 2021-08-27 18:23:12 +08:00
JianBo He 914c375d9e chore(gw): adjust the configuration format 2021-08-27 18:23:12 +08:00
JianBo He f333a0b888 chore(gw): rename functions 2021-08-27 18:23:12 +08:00
JianBo He eb8ec65162 refactor(gw): refactor authentication to authenticator 2021-08-27 18:23:12 +08:00
JianBo He 6de250741e chore(gw): add started_at/created_at field 2021-08-27 18:23:12 +08:00
JianBo He 75dc4ea9a2 feat(gw): add the http api skeleton 2021-08-27 18:23:12 +08:00
Shawn cc56c74964 refactor(emqx): update the tests for the new zone,listener config 2021-08-26 09:11:30 +08:00
Rory Z 1886aa8bff chore: fix dialyzer error 2021-08-25 10:15:00 +08:00
k32 9c74fa42a5 chore(rlog): Use the new method of creating shards 2021-08-21 17:47:53 +02:00
k32 ca0fb214a7 feat(emqx-sn): Add tables to the SN shard 2021-08-21 17:47:34 +02:00
Shawn f3efc89192
refactor(config): replace all ':' with '=' in the *.conf (#5531) 2021-08-19 19:57:42 +08:00
zhouzb 87051c0e53 test(authn): fix test case 2021-08-19 16:01:55 +08:00
Shawn e8e95d39ef
refactor(config): move emqx_config:get/get_raw to emqx:get_config/get_raw_config (#5517) 2021-08-18 14:52:57 +08:00
JianBo He 9190f1f6f9 chore(gw): reformat config options 2021-08-18 09:26:48 +08:00
JianBo He b8cb31c0ff fix(gw): fix the bad return value for initiating chain 2021-08-18 09:26:48 +08:00
JianBo He 430f20adc1 fix(gw): fix conn_state 2021-08-18 09:26:48 +08:00
JianBo He c5a4e05418 refactor(gw): rename gateway type to name 2021-08-18 09:26:48 +08:00
JianBo He 9072a60652 chore(gw): refine the cli command 2021-08-18 09:26:48 +08:00
JianBo He 630e0fb8cb test(gw): fix bad test cases 2021-08-18 09:26:48 +08:00
JianBo He cac0ea4b19 chore(gw): fix dialyzer warnigns 2021-08-18 09:26:48 +08:00
JianBo He be4d2495f0 refactor(gw): single instance support only 2021-08-18 09:26:48 +08:00
tigercl e73df538a7
Merge pull request #5476 from k32/fix-auth-init-order
fix(rlog): Ensure the correct order of table initalization
2021-08-13 13:49:06 +08:00
k32 dfa6761e49 fix(rlog): Ensure the correct order of table initalization 2021-08-12 19:58:52 +02:00