Commit Graph

1813 Commits

Author SHA1 Message Date
JianBo He 59c41c7c6e feat(sys): add sys_topics http api 2022-04-18 15:32:34 +08:00
firest c6b5bcd973 fix(frame): remove empty topic check, because it checked in emqx_channel 2022-04-18 15:03:45 +08:00
DDDHuang a1ef677e33 fix: remove duplicate references 2022-04-16 16:37:10 +08:00
zhongwencool ce915f0bbd
Merge pull request #7590 from zhongwencool/doc-i18n
feat: desc/label support i18n
2022-04-15 17:43:16 +08:00
Zhongwen Deng 630cc8ee34 feat: support i18n with desc struct. 2022-04-15 08:42:13 +08:00
Zhongwen Deng da7bda3540 fix: can't shutdown emqx_config_handler process. 2022-04-14 17:02:07 +08:00
DDDHuang b8e2c76382 fix: remove routes 2022-04-13 16:16:12 +08:00
Thales Macedo Garitezi 3602e7552d
feat: use gen_rpc ordered cast for `emqx_rpc:cast/5`
From: https://github.com/emqx/emqx/pull/6554
2022-04-12 17:22:03 -03:00
firest 907e643e20 fix(frame): fix empty topic check error 2022-04-12 12:14:48 +08:00
zhongwencool 72e16eb7d1
Merge pull request #7557 from zhongwencool/api-cluster
feat: add api_cluster api.
2022-04-11 16:47:57 +08:00
Zhongwen Deng 5acf19a947 chore: add invite_node/2 bpapi 2022-04-11 15:32:49 +08:00
EMQ-YangM fa0c4d17ee feat: impl rule_engine reset_metrics api 2022-04-11 10:25:48 +08:00
Zaiming (Stone) Shi 2d374a3b0d chore: no need for erlang:demonitor optimisation 2022-04-08 15:53:58 +02:00
Zhongwen Deng a8386adea3 fix: list listeners cli not working 2022-04-08 09:47:06 +08:00
Zhongwen Deng 1664438b4f fix: dialyzer warning. 2022-04-08 09:47:06 +08:00
Zhongwen Deng 63d6682a7d feat: refactor api_listeners api 2022-04-08 09:47:06 +08:00
William Yang 4fac090f7f fix: text logger
Fix following "FORMAT ERROR"

 logger:warning(["line1\n", "line2\n","line3\n"]).

2022-04-06T18:44:07.412131+02:00 [warning] FORMAT ERROR: "~ts " - ["line1\n","line2\n","line3\n"]
ok
2022-04-06 18:44:20 +02: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
Zaiming (Stone) Shi 32694e601a refactor: rename RUNNER_ETC_DIR to EMQX_ETC_DIR 2022-04-05 23:08:45 +02:00
Zaiming (Stone) Shi 1ac19b42e4 refactor(emqx_tls_lib): allow undefined for string fields 2022-04-05 22:38:08 +02:00
Zaiming (Stone) Shi ba51f03cb7 refactor: remove the deprecated save_files_return_opts 2022-04-05 17:38:33 +02: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
ieQu1 8df76da9ac chore(formatting): Fix formatting of modules, authz and authn 2022-04-05 11:01:53 +02:00
ieQu1 251192f84c docs(schema): Fix typo 2022-04-05 09:54:06 +02:00
ieQu1 99b3f2f83e docs(schema): Document missing records and fields 2022-04-04 23:58:43 +02:00
Zaiming (Stone) Shi 067e553c84
Merge pull request #7513 from zmstone/0404-5.0-bump-app-emqtt-version-to-1.5.0-and-app-lc-to-0.2.1
chore: update dependency app versions
2022-04-04 22:35:27 +01:00
Zaiming (Stone) Shi 6fd902ebc8 chore: update dependency app versions
lc: 0.2.1
emqtt: 1.5.0
2022-04-04 21:07:02 +02:00
Thales Macedo Garitezi 1df850710e
Merge pull request #7457 from thalesmg/telemetry-revamp-part3
feat(telemetry): add authn and authz info to telemetry data
2022-04-04 09:12:37 -03:00
Zaiming (Stone) Shi 850a95a43e style: avoid using function-like macros in catch clauses 2022-04-01 16:58:51 +02:00
Zaiming (Stone) Shi 67608f623f perf: improve demonitor performance
demonitor(Ref, [flush]) often will not be be able to get optimised
by the compiler hence fallback to a full mailbox scan to drain
the DOWN message.

This commit tries to avoid the 'flush' when it's for sure
that there is no 'DOWN' message sent.
2022-04-01 16:58:51 +02:00
Thales Macedo Garitezi 1fa68a277e
docs: fix some typos 2022-04-01 09:23:41 -03:00
JianBo He 2dce43ac8e chore: ignore 'if' expression checking 2022-03-31 17:41:43 +08:00
JianBo He 244b123742 style(emqx): reformat emqx application 2022-03-31 17:41:43 +08:00
JianBo He 6a4d823b24 fix(sys): compatible with binary type protocol 2022-03-31 09:54:56 +08:00
ieQu1 d23a88d0a9 docs(schema): Minor improvements to spelling and formatting. 2022-03-30 13:05:56 +02:00
ieQu1 edb91e2e4a docs(schema): Add descriptions for authZ and connector 2022-03-30 13:01:01 +02: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 abb4d42406 docs(schema): Document conn_congestion fields 2022-03-30 11:53:38 +02:00
Dmitrii dd61f86c2f
Merge pull request #7436 from ieQu1/doc-schema-5
docs(schema): Add descriptions for the records
2022-03-30 11:35:19 +02:00
Dmitrii fcc99b484f
docs(schema): Apply suggestions from code review
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-03-30 10:12:04 +02:00
lafirest 694d3b1782
Merge pull request #7439 from lafirest/fix/empty_topic_5
fix(frame): forbidden empty topic in strict mode
2022-03-30 09:54:33 +08:00
ieQu1 465e0e418c docs(schema): Document rate_limit fields 2022-03-29 14:09:32 +02:00
ieQu1 fff6bffa0c docs(schema): Add descriptions of the records 2022-03-29 14:09:32 +02:00
ieQu1 aecfa77985 chore(hocon): Bump version 2022-03-29 14:09:32 +02:00
firest ed7ce7078a test(frame): add test case for empty topic check 2022-03-29 17:14:36 +08:00
EMQ-YangM 4c8deeb544 fix(emqx_access_control): reformat code 2022-03-29 14:11:45 +08:00
firest 978350b643 fix(frame): make elvis && erlfmt happy 2022-03-29 11:58:59 +08:00
EMQ-YangM 4791c64b73 feat: add rule event 'client.check_authz_complete' 2022-03-29 11:24:36 +08:00
firest 5febf480a2 fix(frame): forbidden empty topic in strict mode 2022-03-29 10:34:50 +08:00
ieQu1 32584650de docs(schema): Fix definition 2022-03-25 16:12:32 +01:00
Zaiming (Stone) Shi 39d477e77c
Merge pull request #7413 from zmstone/docs-add-more-schema-desc
docs: add more schema desc
2022-03-25 16:10:00 +01:00
zhouzb 3b387cfd9e chore: revert ee vsn bump 2022-03-25 19:49:13 +08:00
zhouzb 098ba91351 chore: bump release vsn 2022-03-25 19:43:22 +08:00
JimMoen 81243b43e8 fix(os_mon): fix wrongly high mem alarm 2022-03-25 19:21:03 +08:00
Zhongwen Deng 86f455fd3a fix: cluster conf must be readonly; add dashboard listener update hook 2022-03-25 18:43:15 +08:00
Zaiming (Stone) Shi 036266769c docs: add more schema desc 2022-03-25 10:52:58 +01:00
Zhongwen Deng 8d46332b30 chore: upgrade hocon to 0.26.4 to limit HOCON_MAP's key format 2022-03-25 15:00:51 +08:00
Zhongwen Deng 55f805bac0 fix: dashboard_monitor crash 2022-03-25 14:18:56 +08:00
Thales Macedo Garitezi 2e05e45245
Merge pull request #7385 from thalesmg/bump-ekka-0-12-3
chore: bump ekka -> 0.12.3, mria -> 0.2.2
2022-03-24 11:47:28 -03:00
Dmitrii f4125fbe0d
Merge pull request #7386 from ieQu1/doc-schema-3
docs(schema): Add descriptions to the schema
2022-03-24 14:05:38 +01:00
DDDHuang 9037b807ae fix: add api auth failed code def & fix bad spelling 2022-03-24 12:12:19 +08:00
ieQu1 077ef073e5 docs(schema): Add descriptions to the schema 2022-03-23 19:05:25 +01:00
Thales Macedo Garitezi 29ca83184a
chore: bump ekka -> 0.12.3, mria -> 0.2.2 2022-03-23 14:41:10 -03:00
ieQu1 8967e13eee docs(schema): Move descriptions from emqx.conf.all 2022-03-23 13:52:54 +01:00
ieQu1 d1e8fefa1f docs(schema): Add descriptions of events 2022-03-23 13:52:51 +01:00
Dmitrii a0bec0d921
Merge pull request #7103 from ieQu1/doc-schema
docs: Add to the schema
2022-03-23 10:46:11 +01:00
ieQu1 503c7f00ae docs(schema): Fix typos 2022-03-23 08:40:59 +01:00
JianBo He 97c05d3a72 chore(emqx): fmt codes 2022-03-23 09:53:18 +08:00
JianBo He a889b0b6a9 test: update test/emqx_channel_SUITE.erl
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-03-23 09:53:18 +08:00
JianBo He df74c180b7 fix(channel): send will_msg if client has been kicked 2022-03-23 09:53:18 +08:00
JianBo He 87a29beb5f fix(channel): send DISCONNECT packet if connection has been kicked
fix #7241
2022-03-23 09:53:18 +08:00
ieQu1 c6b0e8806f docs(schema): Add descriptions to the schema 2022-03-22 19:09:20 +01:00
Zaiming (Stone) Shi f08c317939 docs: fix spellcheck 2022-03-22 14:07:51 +01:00
Zaiming (Stone) Shi 7a9ad86574 chore: increase line width to 120
and fix bad formats from erlfmt
2022-03-22 11:34:29 +01:00
Zaiming (Stone) Shi f9bad0412b docs: add doc for stats 2022-03-22 11:34:29 +01:00
Zaiming (Stone) Shi 91bcf02970 chore: format code apps/emqx 2022-03-21 16:51:31 +01:00
Xinyu Liu ecf4d4b206
Merge pull request #7356 from DDDHuang/update_version
chore: release 5.0.0 beta4
2022-03-21 21:16:48 +08:00
DDDHuang e86fd9c4cb feat: release V5.0.0 beta4 2022-03-21 19:45:03 +08:00
Zhongwen Deng 88e0c4067f fix: api_plugins common test failed bump dashboard to v0.25.0. 2022-03-21 17:56:22 +08:00
Zhongwen Deng 5c9a87f251 chore: fix elvis warning: len_length is too long. 2022-03-21 17:56:22 +08:00
Zhongwen Deng bf6339ebf4 chore: upgrade hocon to 0.26.3 to fix dialyzer warning 2022-03-21 17:56:22 +08:00
Zhongwen Deng 267fd398a6 fix: elvis warning 2022-03-21 17:56:22 +08:00
Zhongwen Deng be0c26130a feat: add transate_to meta to root schema. 2022-03-21 17:56:22 +08:00
Zhongwen Deng 18886f657b feat: add emqx_config_logger. 2022-03-21 17:56:22 +08:00
DDDHuang 74e6fa5a94 fix: generate bridge api response code
fix: generate connector api response code SUITE

fix: generate exhook api response code
2022-03-21 14:12:19 +08:00
firest 8e5c118562 fix(retainer): fix spellcheck in schema 2022-03-21 10:14:05 +08:00
firest beba7c9692 fix(limiter): improve code style and description 2022-03-18 16:00:42 +08:00
firest d28b34f0d1 fix(limiter): improve test case and fix some bugs 2022-03-18 16:00:42 +08:00
firest 32030c8369 feat(limiter): remove the group(zone) level 2022-03-18 16:00:42 +08:00
lafirest e7dec7835f feat(limiter): change zone to group and simplify config 2022-03-18 16:00:42 +08:00
lafirest d231b2222e
Merge pull request #7328 from lafirest/fix/delayed_lookup
fix(delayed): make it possible to lookup/delete other node's delayed …
2022-03-18 00:53:53 +08:00
firest 3fc4236565 fix(delayed): make it possible to lookup/delete other node's delayed message 2022-03-17 14:36:55 +08:00
Thales Macedo Garitezi c45578c130
chore: bump gen_rpc 2022-03-16 15:20:13 -03:00
Zaiming (Stone) Shi 4a35aaa50e
Merge pull request #7304 from zmstone/update-emqtt-to-1.4.8
chore: update emqtt to 1.4.8
2022-03-15 17:50:38 +01:00
Zaiming (Stone) Shi d7d0525733
Merge pull request #7313 from zmstone/chore-pin-ekka-0.12.2
chore: pin ekka 0.12.2
2022-03-15 14:30:18 +01:00
Thales Macedo Garitezi 58705a1383
Merge pull request #7289 from thalesmg/fix-ekka-monitor-cleanups
fix(ekka): run cleanups on node down events
2022-03-15 09:39:37 -03:00
Zaiming (Stone) Shi f8d8bcb8bc chore: pin ekka 0.12.2
with mnesia_down vs node_down fix
and fast rocksdb build
2022-03-15 12:16:47 +01:00
Zaiming (Stone) Shi 420ad32aa7 chore: update emqtt to 1.4.8 2022-03-15 12:11:44 +01:00
JimMoen 02ed2148d7 refactor: move api `top` -> `front`, `bottom` -> `rear` 2022-03-15 10:28:46 +08:00
JimMoen e96bbf5c8b refactor(authn_api): add 'after related' for move api 2022-03-15 10:28:46 +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
DDDHuang e67138a6a7 fix: trace data dir suffix 2022-03-14 16:15:53 +08:00
Yang Miao 4c93a71446
Merge pull request #7290 from EMQ-YangM/add_metrics_and_status_to_authz
feat(emqx_authz): add metrics and status to authz
2022-03-14 09:34:11 +08:00
zhongwencool f0f03d8a96
Merge pull request #6566 from zhongwencool/plugin-http-api
Plugin http api
2022-03-14 09:17:11 +08:00
EMQ-YangM f287547251 feat(emqx_authz): add metrics and status to authz 2022-03-13 12:41:03 +08:00
Zhongwen Deng 704d1b20c6 fix: add bpapi.versions 2022-03-12 00:29:18 +08:00
Xinyu Liu 4025e79d1b
Merge pull request #7283 from terry-xiaoyu/default_value_for_rates
Fix HTTP APIs for getting rule events and testing rule SQLs
2022-03-11 20:17:58 +08:00
Xinyu Liu 3cf18a293d
Merge pull request #7271 from EMQ-YangM/add_metrics_and_status_to_authn
feat(emqx_authn_api): add metrics and status to authn
2022-03-11 19:21:44 +08:00
Shawn 590fa1b375 fix(rule): check request body for /rule_test crashes 2022-03-11 18:13:12 +08:00
EMQ-YangM 81f9482fac fix(bpapi): add authn bpapi version 2022-03-11 17:41:39 +08:00
EMQ-YangM b7a9f1e087 fix(emqx_map_lib): fix static checks errors 2022-03-11 15:56:14 +08:00
Zhongwen Deng ab10163abf chore: redefined qos 2022-03-11 15:27:40 +08:00
Zhongwen Deng 3938aa127b feat: add /configs/global_zones API to aggregate emqx_zone_schema 2022-03-11 15:27:40 +08:00
EMQ-YangM 8af7131a49 fix(emqx_autn_api): wo do not need fixpoint 2022-03-11 14:18:50 +08:00
EMQ-YangM 7165fbc5ca fix(emqx_authn_api): fix elvis error 2022-03-11 14:18:50 +08:00
EMQ-YangM dce602c251 fix(emqx_authn_api): format metrics and status 2022-03-11 14:18:15 +08:00
JimMoen f5caf66253 refactor(api): unified api name style 2022-03-11 11:07:55 +08:00
JimMoen 593e1a3efb feat(authn): authn mnesia rows fuzzy searching by `clientid` or `username` 2022-03-10 10:01:40 +08:00
zhongwencool f7ec74d367
Merge pull request #7248 from zhongwencool/improve-ct-coverage
test: Improve test coverage
2022-03-10 09:47:10 +08:00
Zhongwen Deng 7beaa91814 fix: schema mod error 2022-03-09 19:24:33 +08:00
JianBo He 857bd1e12a test(exhook): remove helpless test case 2022-03-09 13:50:17 +08:00
JianBo He 0c8d739e2f test: change assert condition 2022-03-09 13:50:17 +08:00
JianBo He 6dac422c93 chore: rename sys_topic to sys_topics 2022-03-09 13:50:17 +08:00
JianBo He ecc8d92e6c test(sys): refine prop_emqx_sys 2022-03-09 13:50:16 +08:00
JianBo He ba6cfd595b feat(sys): support client events notification 2022-03-09 13:50:16 +08:00
zhongwencool 514e374868
Merge pull request #7215 from thalesmg/fix-congestion-log
fix(congestion): fix congestion message formatting
2022-03-08 22:45:38 +08:00
zhongwencool a5b2300ce4
Merge pull request #7236 from zhongwencool/config-api
feat(config): Filter unnecessary HTTP APIs
2022-03-08 22:33:45 +08:00
Zhongwen Deng 512a5c3b8e fix: elvis warning 2022-03-08 14:50:10 +08:00
Zhongwen Deng 1244391cb7 fix: alarm crash when safe_publish not ready. Filter out unnecessary APIs 2022-03-08 14:14:54 +08:00
Xinyu Liu c5f92ef856
Merge branch 'master' into improve_rule_bridge_apis 2022-03-08 11:12:30 +08:00
zhongwencool 2d9a086bbb
Merge pull request #7198 from zhongwencool/emqx-conf-ct-coverage
chore: add more test for emqx_config_handler
2022-03-08 10:04:02 +08:00
Zhongwen Deng a7ba678463 fix: elvis warning 2022-03-08 09:05:23 +08:00
Zhongwen Deng 9b00f2756b feat: Make sure that Specify Key and ?WKEY cannot be on the same level. 2022-03-07 21:48:31 +08:00
Shawn 9a9c92ae88 fix: update testcases for emqx_bridge 2022-03-07 16:48:36 +08:00
Thales Macedo Garitezi 3e08282ffb
chore: improve formatting
Without `~0p`, had some weird indentation while printing
2022-03-04 15:22:33 -03:00
Thales Macedo Garitezi e76f67e985
style: please elvis checks 2022-03-04 11:14:13 -03:00
Thales Macedo Garitezi 0c76b6cf4d
fix(congestion): fix congestion message formatting
It seems that the `~ts` in the format string does not handle maps,
which results in a crash when trying to format the congestion message.

```erlang
28> io_lib:format("~ts", [#{}]).
** exception error: bad argument
     in function  io_lib:format/2
        called as io_lib:format("~ts",[#{}])
```

Example:

```
2022-03-04T12:43:26.900609+00:00 [warning] '$kind': unclean_terminate, clientid: 192.168.2.116_bench_sub_11412_1782328074, context: badarg, exception: error, line: 582, mfa: emqx_connection:terminate/2, peername: 192.168.2.116:47358, stacktrace: [{io_lib,format,["connection congested: ~ts",[#{buffer => 4096,clientid => <<"192.168.2.116_bench_sub_11412_1782328074">>,conn_state => disconnected,connected_at => 1646397524470,high_msgq_watermark => 8192,high_watermark => 1048576,memory => 57064,message_queue_len => 20,peername => <<"192.168.2.116:47358">>,pid => <<"<0.259.28>">>,proto_name => <<"MQTT">>,proto_ver => 5,recbuf => 4096,recv_cnt => 2,recv_oct => 81,reductions => 267523,send_cnt => 333,send_oct => 149869,send_pend => 128,sndbuf => 332800,sockname => <<"10.10.1.13:1883">>,socktype => tcp,username => undefined}]],[{file,"io_lib.erl"},{line,187}]},{emqx_congestion,do_cancel_alarm_congestion,4,[{file,"/emqx/apps/emqx/src/emqx_congestion.erl"},{line,88}]},{lists,foreach,2,[{file,"lists.erl"},{line,1342}]},{emqx_connection,terminate,2,[{file,"/emqx/apps/emqx/src/emqx_connection.erl"},{line,576}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]
```
2022-03-04 11:00:49 -03:00
Zhongwen Deng 6ff2db6180 fix: elvis warning 2022-03-04 15:10:10 +08:00
Zhongwen Deng 153e1bcb91 fix: pre_update_config is executed one more time than expected 2022-03-04 14:43:51 +08:00
JimMoen fab9ad91de fix(schema): nullable => required 2022-03-04 10:06:36 +08:00
Zhongwen Deng e2f386383d fix: replace local ref by remote ref 2022-03-04 09:13:56 +08:00
Zhongwen Deng 71d20d153b fix: replace deep_merge with merge. 2022-03-03 22:52:46 +08:00
Zhongwen Deng 4dfcb90b16 fix: get_roots broken 2022-03-03 20:31:30 +08:00
Zhongwen Deng a862eb0252 chore: add more test for emqx_config_handler 2022-03-03 17:39:32 +08:00
JianBo He 7ba1db759e
Merge pull request #7182 from HJianBo/mqttsn-replay-register 2022-03-03 10:55:45 +08:00
Zaiming (Stone) Shi 4e64010a3b build: more structured build info 2022-03-02 21:22:03 +01:00
JianBo He 5b1ba335cb chore(session): add obtain_next_pkt_id/1
In the current implement, mqtt-sn gateway is using the emqx_session as
its session structure. We need a method to get a pkt_id for sending like
REGISTER related messages
2022-03-02 14:58:43 +08:00
JianBo He 123b667eb0
Merge pull request #7128 from lafirest/refactor/retainer_flow_control
refactor(emqx_retainer): use hierarchical limiter for the flow control
2022-03-02 14:46:56 +08:00
lafirest 9bdebabdbc fix(retainer): fix/add some comment 2022-03-02 11:34:19 +08:00
Dmitrii b4439c6710
Merge pull request #7176 from ieQu1/fix-add-hook
test(emqx_hook): Fix flaky t_add_hook_order test
2022-03-01 15:52:22 +01:00
Zaiming (Stone) Shi f39ae6dfa7
Merge pull request #7177 from zmstone/docs-add-more-detailed-desc-for-strict-mode
docs: add more details desc for strct_mode config
2022-03-01 14:58:14 +01:00
ieQu1 87d7698e1e test(emqx_hook): Fix flaky t_add_hook_order test 2022-03-01 14:15:11 +01:00
Zaiming (Stone) Shi be34b927ad docs: add more detailed description for strict_mode config 2022-03-01 13:11:16 +01:00
JimMoen 0849a2d4c7 test(frame): malformed utf-8 packet 2022-03-01 18:55:31 +08:00
JimMoen 9a75004759 feat(frame): utf-8 string check in `strict_mode` 2022-03-01 18:51:56 +08:00
Zaiming (Stone) Shi b3745715c4 build: support a default edition 2022-02-28 17:03:42 +01:00
Zaiming (Stone) Shi d029a73b99 refactor: make release edition static info at compile time 2022-02-28 16:37:47 +01:00
Zaiming (Stone) Shi 7df2a4655a chore: pin hocon 0.26.1
0.26.0 had a bug where 'mapping' field is encoded as a integerx- list
2022-02-28 12:54:49 +01:00
firest ec17c4d63c fix(emqx_limiter): fix schema error 2022-02-27 23:37:20 +08:00
Zaiming (Stone) Shi edb16f902e chore: pin hocon 0.16.0 for 'mappings' in generated config doc 2022-02-27 14:44:28 +01:00
Thales Macedo Garitezi 69e0f9c6cf
Merge pull request #7109 from thalesmg/elixir-plugin-test
Add Elixir Plugin Template Test
2022-02-25 11:31:41 -03:00
zhongwencool 8d26ba6e9f
Merge pull request #7108 from thalesmg/fix-sys-mon-portinfo
fix(sys_mon): guard before calling `erlang:port_info`
2022-02-25 17:38:24 +08:00
zhongwencool 13a0eff678
Merge pull request #7125 from zhongwencool/schema-json
feat: generate hot config's schema.json and remove nullable option.
2022-02-25 17:18:20 +08:00
JianBo He f45a00f3c1
Merge pull request #7126 from HJianBo/force-kill-takeover-failure-proc-5.0
refactor(cm): force kill the proc that failed to response takeover call
2022-02-25 17:11:37 +08:00
Zhongwen Deng 3aa9afc5bf fix: rpc get node info maybe crash when emqx_sys process is not start yet. 2022-02-25 14:20:19 +08:00
Zhongwen Deng 4eec83b0e5 fix: memsup's memory alway false. 2022-02-25 14:19:57 +08:00
Thales Macedo Garitezi 0e319d5e4e
fix: rm useless `catch` 2022-02-24 16:28:00 -03:00
Thales Macedo Garitezi 427866f8ad
test(sys_mon): add test for closed port 2022-02-24 15:13:18 -03:00
Thales Macedo Garitezi b46af91e74
test: disable export warning during tests 2022-02-24 14:20:36 -03:00
Thales Macedo Garitezi d89925ce7b
fix(sys_mon): guard before calling `erlang:port_info`
Sometimes, the `emqx_sys_mon:procinfo/1` might be called with
something that is not a port, like `[]`.  Not sure on the conditions
for this to happen.

```
2022-02-18T20:05:02.671592+00:00 [error] Generic server emqx_sys_mon terminating. Reason: {badarg,[{erlang,port_info,[[]],[{error_info,#{module => erl_erts_errors}}]},{emqx_sys_mon,portinfo,1,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,205}]},{emqx_sys_mon,'-handle_info/2-fun-5-',2,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,150}]},{emqx_sys_mon,suppress,3,[{file,"/emqx/apps/emqx/src/emqx_sys_mon.erl"},{line,184}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}. Last message: {monitor,<0.7796.0>,busy_dist_port,[]}. State: #{events => [{busy_dist_port,#Port<0.127>}],timer => #Ref<0.2758388682.1853620226.133920>}.
```
2022-02-24 14:07:09 -03:00
Zhongwen Deng db584f79d6 feat: upgrade hocon to 0.25.0 to replace nullable with required. 2022-02-24 22:39:03 +08:00
JianBo He ffafbfaaa6 test(cm): refine testcases 2022-02-24 21:00:54 +08:00
JianBo He 9c1fe4336b refactor(cm): force kill the proc that failed to response takeover call
port from: #7026
2022-02-24 21:00:45 +08:00
firest 5bf1d77993 refactor(emqx_retainer): use hierarchical limiter for the flow control 2022-02-24 18:06:40 +08:00
JianBo He fa921775e7
Merge pull request #6999 from lafirest/feat/esockd_limiter
feat(emqx_limiter): use hierarchical limiter for esockd
2022-02-24 17:33:51 +08:00
Thales Macedo Garitezi 278361e6b6
Merge pull request #7110 from thalesmg/fix-flaky-order-prop
test(fix): fix flaky prop
2022-02-23 09:09:23 -03:00
Zaiming (Stone) Shi e6380a1911
Merge pull request #7104 from zmstone/fix-windows-build-5.0
[5.0] Fix windows build
2022-02-23 10:22:45 +01:00
zhongwencool b7f808db9e
Merge pull request #7027 from DDDHuang/error_code
feat: support http error code & error code api
2022-02-23 16:12:20 +08:00
firest 511be52326 fix(emqx_limiter): fix dialyzer error 2022-02-23 10:29:25 +08:00
firest e1875880bb fix(emqx_limiter): rename emqx_htb_generic to emqx_esockd_htb_limiter 2022-02-23 09:56:26 +08:00
Zaiming (Stone) Shi 08d1b38bbe chore: refine console printout about quic not started 2022-02-22 22:33:33 +01:00
Thales Macedo Garitezi 8141c38ce1
test(fix): fix flaky prop
Failing when duplicate elements were being generated.

```
 An exception was raised: error:{assertEqual,
                                [{module,emqx_hooks_SUITE},
                                 {line,65},
                                 {expression,"Order"},
                                 {expected,
                                  [{5,'',''},
                                   {5,'',''},
                                   {4,'\223',''},
                                   {2,'}Ijrµ\036',''}]},
                                 {value,
                                  [{5,'',''},
                                   {4,'\223',''},
                                   {2,'}Ijrµ\036',''}]}]}.
```
2022-02-22 17:57:00 -03:00
Thales Macedo Garitezi 3d19e77f00
Merge pull request #7090 from thalesmg/fix-use-tags-in-deps
fix(deps): use tags for dependencies
2022-02-22 09:09:37 -03:00
DDDHuang a5d8f2ce3b fix(api): banned api error code format 2022-02-22 17:14:35 +08:00
DDDHuang 98a11f3c15 fix(api): emqx_connector_api error code format 2022-02-22 17:14:35 +08:00
DDDHuang 90ee450a84 feat: support http error code & error code api 2022-02-22 17:14:35 +08:00
JimMoen 437feefdc0 fix(channel): server_keepalive only for MQTT v5.0 2022-02-22 10:50:49 +08:00
Thales Macedo Garitezi 16ad442bc3
fix(deps): use tags for dependencies
Some dependencies, like `bcrypt` and `quic`, have their references
declared as `branch`, yet there are no branches with those names, but
tags.  Despite rebar3 managing somehow to handle that, if a project
managed by Mix tries to declare EMQX as its dependency, it's not able
to fetch those dependencies.

```
$ mix deps.get
* Updating emqx (https://github.com/emqx/emqx - v5.0-beta.3)
* Updating lc (https://github.com/qzhuyan/lc.git - 0.1.2)
* Updating gproc (https://github.com/uwiger/gproc - 0.8.0)
* Updating typerefl (https://github.com/k32/typerefl - 0.8.6)
* Updating jiffy (https://github.com/emqx/jiffy - 1.0.5)
* Updating cowboy (https://github.com/emqx/cowboy - 2.9.0)
* Updating esockd (https://github.com/emqx/esockd - 5.9.0)
* Updating ekka (https://github.com/emqx/ekka - 0.11.1)
* Updating gen_rpc (https://github.com/emqx/gen_rpc - 2.5.1)
* Updating hocon (https://github.com/emqx/hocon.git - 0.22.1)
* Updating pbkdf2 (https://github.com/emqx/erlang-pbkdf2.git - 2.0.4)
* Updating recon (https://github.com/ferd/recon - 2.5.1)
* Updating snabbkaffe (https://github.com/kafka4beam/snabbkaffe.git - 0.16.0)
* Updating bcrypt (https://github.com/emqx/erlang-bcrypt.git - origin/0.6.0)
error: pathspec 'origin/0.6.0' did not match any file(s) known to git
** (Mix) Command "git --git-dir=.git checkout --quiet origin/0.6.0" failed
```

Therefore, we change them to `tag`s.
2022-02-21 15:36:24 -03:00
JimMoen e816e3e4a3
Merge pull request #7075 from JimMoen/refactor-authz-sources-api
refactor: authz_api_sources swagger spec
2022-02-22 01:24:42 +08:00
k32 d4458618b2 fix(hook): Executed hooks in deterministic order 2022-02-21 14:27:24 +01:00
k32 115c3f2d29 chore: Fix URLs 2022-02-21 10:13:09 +01:00
JimMoen 000020617c refactor: authz_api_sources spec 2022-02-21 16:33:08 +08:00
lafirest be2c36cfa0 feat(emqx_limiter): use hierarchical limiter for esockd 2022-02-21 11:37:38 +08:00
k32 9fb35a1d64
docs: Fix typo
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-02-18 18:35:16 +01:00
k32 1c62c6e60b docs: Add documentation for the sysmon roots 2022-02-18 16:26:18 +01:00
k32 8566d2e246
Merge pull request #7051 from k32/schema-typos
docs: Fix typos
2022-02-18 15:38:51 +01:00
Zaiming (Stone) Shi e330f789af fix(ekka): pin version 0.12.1
print lock owner status before killing it
2022-02-18 09:19:57 +01:00
zhongwencool 0b74373464
Merge pull request #7043 from lafirest/test/ratelimiter
test(emqx_limiter): improve the code coverage of RateLimit to 87%
2022-02-18 09:59:23 +08: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
Zaiming (Stone) Shi 6a354d910e chore: rename EMQ_X to EMQX in hrl file macros 2022-02-17 15:55:46 +01:00
zhongwencool c88504f918
Merge pull request #7023 from zhongwencool/license-alarm-support
License alarm support
2022-02-17 22:09:51 +08:00
lafirest 3c92906405 test(emqx_limiter): improve the code coverage of RateLimit to 87% 2022-02-17 14:50:27 +08:00
Zaiming (Stone) Shi 64db085163 chore: EMQ X -> EMQX in source code 2022-02-16 22:08:12 +01:00
Zaiming (Stone) Shi 0528262705 chore(app.src): EMQ X -> EMQX in .app.src files 2022-02-16 17:51:45 +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
zhongwencool 34fe5082c4 fix(schema): schema global validations not working 2022-02-16 14:20:15 +08:00
Zaiming (Stone) Shi 2e94880bb6 docs: More EMQ X -> EMQX rename in descriptive strings 2022-02-15 22:39:11 +01:00
zhongwencool 1413809b81
Merge pull request #6948 from zhongwencool/fix-watermark-master
fix(watermark): watermark should use > instead of >=
2022-02-14 16:11:47 +08:00
zhongwencool 80169ccb68 chore: add more eunit for emqx_datetime 2022-02-14 15:30:03 +08:00
JianBo He 229a62bcc9
Merge pull request #6988 from HJianBo/acl-metrics-add
feat(metrics): add acl metrics statistics
2022-02-14 15:06:04 +08:00
zhongwencool 498434826a feat(schema): schema support epoch_second, epoch_millisecond type. 2022-02-14 11:35:32 +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
JianBo He f471214956 feat(metrics): add acl metrics statistics 2022-02-11 15:20:18 +08:00
JianBo He e895de2c5e
Merge branch 'master' into port/slow_subs 2022-02-11 14:37:10 +08:00
DDDHuang fbefc92178
Merge pull request #6969 from DDDHuang/ws_client_metrics
feat(metrics): ws client support more send&recv metrics
2022-02-11 11:14:56 +08:00
DDDHuang 511060adb4 fix(test): ws conn metrics 2022-02-11 09:38:41 +08:00
DDDHuang 0826084ce9 feat(metrics): ws client support more send&recv metrics 2022-02-11 09:38:41 +08:00
Thales Macedo Garitezi 609d8a5efa
fix(channel): wrong case clause when alias is inexistent (5.0)
Fixes #6978 .
2022-02-10 16:23:54 -03:00
Zaiming (Stone) Shi 91366a71a4 fix: try Expr of only catches exceptions in Expr but not cases clauses 2022-02-10 13:12:22 +01:00
Zaiming (Stone) Shi a86b684535 fix(emqx_config_handler): do not log throw exception 2022-02-10 12:40:46 +01:00
Chris 14630568d6 feat: create tests for connector pgsql module and refactoring 2022-02-10 10:40:46 +01:00
firest 361ca5be42 fix(emqx_slow_subs): change rpc call to bpapi 2022-02-10 17:40:19 +08:00
firest b9884de1d0 fix: fix proper test error 2022-02-10 16:09:17 +08:00
firest 2fcc24dea6 fix(emqx_slow_subs): fix test case error 2022-02-10 15:16:37 +08:00
lafirest b09683bfcd fix(emqx_slow_subs): fix some errors and test cases 2022-02-10 14:55:19 +08:00
lafirest 0c48bd92db feat: port slow subs from v4.4 2022-02-10 14:51:37 +08:00
DDDHuang fbb8f46fcd fix(api): qos shcema & code formate 2022-02-10 10:33:39 +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 e6997dc1ce
Merge pull request #6942 from terry-xiaoyu/hook_delivery_drop
Hook delivery drop
2022-02-09 18:28:56 +08:00
zhongwencool 47b1dde7fd
Merge pull request #6949 from zhongwencool/add-qos-type
feat(schema): support qos type.
2022-02-09 16:13:11 +08:00
Shawn 9118cfb4ad fix(connection): revert metric names for 'recv_msg.dropped.await_pubrel_timeout' 2022-02-09 15:41:28 +08:00
zhongwencool 36cf00108c feat(schema): support qos type. 2022-02-09 15:16:43 +08:00
zhongwencool b2d77cac39 fix(watermark): watermark should use greater than(>), not greater than or equal to(>=). 2022-02-09 11:17:45 +08:00
lafirest de75edd176
Merge pull request #6925 from lafirest/fix/flaky-test
fix(emqx_ratelimiter): relax the rate bound of test cases
2022-02-09 10:01:38 +08:00
Thales Macedo Garitezi 152bbe6bb3
refactor: rm unused fn 2022-02-08 18:18:18 -03:00
Thales Macedo Garitezi 01794c2d2c
fix(ctl): fix formatting when printing messages without arguments
Without passing an empty argument list to `emqx_ctl:print`, formatting
instructions like `~n` are being printed literally.

```
Ignore.~nJoin the cluster successfully.~nCluster status: #{running_nodes =>
                      ['emqx@emqx-0.int.thalesmg','emqx@emqx-1.int.thalesmg',
                       'emqx@emqx-2.int.thalesmg','emqx@emqx-3.int.thalesmg',
                       'emqx@emqx-4.int.thalesmg'],
                  stopped_nodes => []}
```
2022-02-08 17:48:19 -03:00
k32 5a1b18ae86 fix(system_monitor): Fix conditional start 2022-02-08 12:46:27 +01:00
Shawn 707284db31 fix(session): update calling to session APIs 2022-02-08 18:49:38 +08:00
Shawn 93092657b9 fix(session): update testcases 2022-02-08 18:33:06 +08:00
zhongwencool 3b4eade1ad
Merge pull request #6900 from zhongwencool/restricted-shell
feat(shell): add restricted shell and user_default
2022-02-08 17:25:28 +08:00
Shawn 2879001694 fix(metrics): rename metrics 'messages.dropped.expired' to 'messages.dropped.await_pubrel_timeout' 2022-02-08 17:14:59 +08:00
Shawn 06168f7080 refactor(session): pass ClientInfo as first params to APIs of emqx_session 2022-02-08 16:52:47 +08:00
zhongwencool f3fa302d84 chore: print only the port number when bound on all interfaces. 2022-02-08 15:25:22 +08:00
zhongwencool b50ceac9bb chore(listener): change the listener binding format 0.0.0.0:port to :port. 2022-02-08 10:28:10 +08:00
Ilya Averyanov 17599432d1 feat(license): add license application 2022-02-07 19:05:47 +03:00
k32 9c5d35e0db chore(ekka): Bump version to 0.12.0 2022-02-07 14:39:43 +01:00
k32 78c762479f feat(router): Mark CM_SHARD and ROUTE_SHARD as dirty 2022-02-07 12:38:59 +01:00
k32 dbe1282d32 chore(mria): Bump version to 0.2.0 2022-02-07 12:37:13 +01:00
zhongwencool 6a701e098f feat(shell): add restricted shell and user_default 2022-02-07 15:33:59 +08:00
lafirest 467bb830b1 fix(emqx_ratelimiter): relax the rate bound of test cases 2022-02-07 13:57:48 +08:00
k32 f699de9773 feat(system_monitor): Bump version to 3.0.0 2022-02-07 02:22:11 +01:00
Zaiming (Stone) Shi 507952c473 feat: dump schema json file to dashbarod static dir 2022-01-31 16:38:41 +01:00
Zaiming (Stone) Shi fe24892b6d fix(emqx_limiter): no white space in schema map name 2022-01-31 16:04:37 +01:00
Zaiming (Stone) Shi f7703c906e refactor: move plain_check impl to emqx_hocon 2022-01-29 10:16:55 +01: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
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
zhongwencool c049e296d4
Merge pull request #6852 from zhongwencool/fix-keepalive-init
fix(keepalive): keepalive desc improvement.
2022-01-27 22:41:10 +08:00
Zaiming (Stone) Shi 815c47e169 test: call logger apis directly 2022-01-27 15:19:50 +01:00
Thales Macedo Garitezi bd0d331b64
Merge pull request #6636 from emqx/elixir-packages-mkII
ci(mix): build emqx packages with elixir
2022-01-27 11:10:30 -03:00
Kian-Meng Ang fc92e4c8bf docs: fix typos 2022-01-27 12:29:38 +01:00
zhongwencool a7676d0163 fix(doc): Update the documentation/keepalive according to the review. 2022-01-27 18:57:35 +08:00
Zaiming (Stone) Shi 6bf5f2c426 test: fix old hocon API calls 2022-01-27 08:21:31 +01:00
zhongwencool 3ce3c5c805 fix(doc): Update the documentation according to the review 2022-01-27 10:54:11 +08:00
Zaiming (Stone) Shi 252d7e85d9 refactor: call new hocon apis 2022-01-27 00:23:08 +01:00
Zaiming (Stone) Shi 8c114db168 chore: pin hocon 0.23.0 2022-01-27 00:23:08 +01:00
Zaiming (Stone) Shi 1718360156 refactor: delete deprecated logging macros 2022-01-26 23:25:11 +01:00
Thales Macedo Garitezi 12f1757328
chore(mix): fix include path for mix 2022-01-26 16:59:50 -03:00
Thales Macedo Garitezi f34e87daeb
chore(ekka): update ekka -> 0.11.3
This ekka tag contains the core node discovery callback feature.
2022-01-26 14:19:39 -03:00
Zaiming (Stone) Shi b9e507110c build: add EMQX_ENTERPRISE compile flag 2022-01-26 14:25:59 +01:00
Zaiming (Stone) Shi 391e480824 build: parameterise package version
so that community and enterprise edition can be built from the
same branch
2022-01-26 14:25:59 +01:00
k32 6f8aa016c3 test(bapapi): Print errors to the console 2022-01-26 11:59:32 +01:00
k32 bdc6d18589 feat(bpapi): Version negotiation 2022-01-26 11:59:21 +01:00
zhongwencool abc0a3526e fix(keepalive): keepalive init with right recv_oct 2022-01-26 18:27:15 +08:00
zhongwencool e458d4790c chore(docs): update mqtt schema desc 2022-01-26 16:38:24 +08:00
Zaiming (Stone) Shi 2105d1f22b test: call ct helpers to load config 2022-01-25 11:50:18 +01:00
Zaiming (Stone) Shi bf7ac80a83 feat: add api to delete override conf files
used in tests
2022-01-25 08:29:04 +01:00
Zaiming (Stone) Shi f1937e261c refactor(emqx_config): apply cluster|local overrides on top of base 2022-01-24 13:30:42 +01:00
k32 d90566be5c ci(bpapi): Fail static check on BPAPI violations 2022-01-21 13:55:09 +01:00
k32 9fad296385
Merge pull request #6809 from k32/bpapi-resource
refactor(emqx_resource): Decorate RPCs
2022-01-20 12:54:46 +01:00
zhongwencool 5bbe2ec1c6
Merge pull request #6766 from zhongwencool/fix-trace-api-return
fix(trace): create_trace return new trace; delete_trace return 204
2022-01-20 10:41:45 +08:00
k32 c2e5dfae97 fix(bpapi): Ignore emqx_plugin_libs_rule:cluster_call/3 function 2022-01-19 22:00:34 +01:00
k32 177c9c7f77 fix(bpapi): Ignore pmap for now 2022-01-19 19:09:55 +01:00
k32 7061e6eefe refactor(emqx_exhook): Decorate RPCs 2022-01-19 18:18:20 +01:00
k32 ded45b161a test(emqx_cm_SUITE): Fix flaky test 2022-01-19 16:48:53 +01:00
k32 a469c466a6 test(emqx_mgmt): Exempt do_query function from BPAPI static check 2022-01-19 16:48:53 +01:00
k32 97078002f2 refactor(emqx_cm): Decorate RPCs 2022-01-19 16:48:53 +01:00
DDDHuang e7dd401de9
Merge pull request #6776 from DDDHuang/client_metrics_5x
feat(metrics): client metrics with more detail
2022-01-19 13:36:57 +08:00
k32 4e9fb00a0e refactor(mgmt_trace): Decorate RPCs 2022-01-18 16:46:32 +01:00
k32 39766d0ab4 refactor(emqx_bridge): Decorate remote procedure calls 2022-01-18 15:25:34 +01:00
k32 fbd7b132ca docs(bpapi): Clarify deprecation procedure 2022-01-18 15:25:34 +01:00
k32 2ccf02cea9 refactor(emqx_mgmt): Decorate RPCs 2022-01-18 14:07:02 +01:00
DDDHuang 98e7ce7b7c fix(test): for paho qos3 2022-01-18 18:06:47 +08:00
DDDHuang f87f80f6e4 feat(metrics): client metrics with more detail 2022-01-18 11:28:41 +08:00
zhongwencool 75ad2ba65c fix(trace): create_trace return new trace; delete_trace return 204 2022-01-18 09:34:36 +08:00
k32 52441c92fa
Merge pull request #6758 from k32/bpapi-mgmt
refactor(emqx_mgmt): Decorate RPCs
2022-01-17 11:12:02 +01:00
k32 428eeeffc0 refactor(emqx_cm): Move lookup_client/1 to emqx_cm 2022-01-14 16:45:14 +01:00
k32 288f9254ba refactor(emqx_mgmt): Decorate RPCs 2022-01-14 15:41:10 +01:00
zhongwencool 8b31466538 chore(trace): replace trace_filter by is_trace 2022-01-14 15:33:43 +08:00
zhongwencool 681ab6b754 fix(review): refactor function name base on review sugguestion 2022-01-14 15:00:05 +08:00
zhongwencool 9727eb514d feat(trace): improve debug msg format 2022-01-14 15:00:05 +08:00
zhongwencool dc6c49d7f5 chore(trace): always ?SLOG when ?TRACE 2022-01-14 15:00:05 +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
k32 aa54c6135b fix(bpapi): Move static checks to test directory 2022-01-13 20:58:33 +01: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
k32 64d594d1df
Merge pull request #6705 from k32/bpapi-conf
refactor(emqx_conf): Decorate remote procedure calls
2022-01-12 22:32:35 +01:00
k32 1e795759ce docs(bpapi): Add README 2022-01-12 21:36:24 +01:00
Zaiming (Stone) Shi cc2ae5ed71
Merge pull request #6624 from HJianBo/fix-conf-name-prefix
Remove `emqx_` prefix for some config scopes
2022-01-12 20:36:52 +01:00
k32 784ca5bf24 fix(emqx_map_lib): Fix underspec 2022-01-12 16:20:13 +01:00
k32 d25258943b feat(bpapi): Verify emqx cluster RPC 2022-01-12 16:19:46 +01:00
k32 04bac16741 fix(bpapi): Use argument types from the spec 2022-01-12 15:40:21 +01:00
k32 7b65684c45 refactor(emqx_conf): Decorate remote procedure calls 2022-01-12 15:40:21 +01:00
JianBo He 6e0a248555 chore: add namespace for _schema.erl module 2022-01-12 15:01:00 +01:00
JianBo He b1959086d9 chore: fix elvis warnings 2022-01-12 13:51:37 +08:00
JianBo He 12cc9065f8 chore(limiter): change root name emqx_limiter > limiter 2022-01-12 13:51:37 +08:00
k32 cad4eff283 refactor(persistent_session): Decorate API calls 2022-01-11 14:28:29 +01:00
k32 26f4b2495b test(bpapi): Run verification in CI 2022-01-11 11:26:35 +01:00
k32 f4bf749134
Merge pull request #6679 from k32/bpapi-emqx
refactor(emqx): Decorate remote procedure calls
2022-01-07 19:52:45 +01:00
k32 9602ce0250
Merge pull request #6678 from k32/broker-bpapi
refactor(emqx_broker): Decorate remote procedure calls
2022-01-07 16:23:12 +01:00
k32 8c72eeb8d1 refactor(emqx): Decorate remote procedure calls 2022-01-07 12:59:10 +01:00
k32 1754afdab0 refactor(emqx_broker): Decorate remote procedure calls 2022-01-07 12:07:29 +01:00
k32 de89f7b253 fix(emqx_rpc): Add types and remove impossible clauses 2022-01-07 12:06:41 +01:00
k32 2307040bec fix(bpapi): Add more static checks exceptions 2022-01-07 10:57:53 +01:00
zhongwencool 977b1bb7ec chore(test): add snabbkaffe for create_trace test 2022-01-07 11:08:40 +08:00
zhongwencool 07ba4ad05e fix: delete error log when file enoent.
delete emqx_trace_api, replace LOG by SLOG
2022-01-07 10:24:26 +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
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 63167cea70 chore: update copyright 2022-01-05 20:55:00 +01:00
zhouzb f4ed3ccdd7 chore(release): update emqx release version 2022-01-05 23:30:06 +08:00
k32 22bdcfa4b5 fix(bpapi): Apply remarks 2022-01-05 14:37:26 +01:00
zhongwencool d3d240e8d5 fix: revert hocon to 0.22.1 2022-01-05 19:50:11 +08:00
k32 9c675194f5 fix(bpapi): Fix dialyzer warnings 2022-01-05 12:10:48 +01:00
zhongwencool c6c7f70a30 chore(hocon): upgrade hocon to 0.22.3 2022-01-05 15:57:19 +08:00
lafirest 81d862061a
Merge pull request #6557 from lafirest/fix/limiter
feat(emqx_limiter): improve burst implementation
2022-01-05 09:43:22 +08:00
k32 4f3f938d71 feat(bpapi): Introduce bpapi behavior 2022-01-05 01:43:18 +01:00
k32 0f6ec9d646 fix(bpapi): Fix build 2022-01-05 01:28:34 +01:00
k32 eaa71438b2 feat(bpapi): Typecheck function parameters 2022-01-05 01:28:34 +01:00
k32 64378be9a0 fix(bpapi): Optimize BPAPI dump size 2022-01-05 01:28:34 +01:00
k32 2c3af8d9fe feat(bpapi): Move to emqx
Fix standalone build
2022-01-05 01:28:34 +01:00
k32 96fdd0c31f fix(bpapi): Fix build order 2022-01-05 01:28:34 +01:00
k32 5c2a559991 feat(bpapi): Initial commit 2022-01-05 01:28:34 +01:00
k32 6ee18b6104 refactor(broker): Don't use a macro 2022-01-05 01:28:31 +01:00
lafirest a593921137 fix(emqx_retainer): fix the stats function of retainer 2022-01-04 17:26:48 +08:00
Zaiming (Stone) Shi 719800914a Merge branch 'ci-run-dialyzer-on-slef-hosted' into merge-5.0-beta.3-to-master 2022-01-03 16:23:11 +01:00
k32 b4048c2789
Merge pull request #6609 from k32/dev/sysmon-conf
fix(system_monitor): Unify configuration with sysmon
2022-01-03 14:03:32 +01:00
k32 377ed03a20 fix(system_monitor): Unify configuration with sysmon 2022-01-03 12:09:37 +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
Zaiming (Stone) Shi b09d0d8e4c
Merge pull request #6586 from zmstone/docs-explain-layered-config-at-the-top
docs: explain layered config at the top
2021-12-31 08:10:15 +01:00
Ilya Averyanov 2ffcaad41e chore(authz): increase coverage 2021-12-31 01:24:18 +03:00
Thales Macedo Garitezi c29bc126ef
Merge pull request #6507 from emqx/build-with-mix-mkII
Build with Elixir Mix Release
2021-12-30 15:00:38 -03:00
Zaiming (Stone) Shi d191f7cf7e chore: update to hocon 0.22.2 2021-12-30 18:36:26 +01:00
zhongwencool 489fb7f806 fix(trace): copy binary:encode_hex/2 from binary.erl 2021-12-30 21:38:23 +08:00
zhongwencool 43141dffee
Merge branch 'release-5.0-beta.3' into trace-formatter 2021-12-29 22:37:59 +08:00
zhongwencool b8bb5ff738 fix(trace): delete duplicate topic from msg 2021-12-29 22:33:34 +08:00
Thales Macedo Garitezi 048afa6d2d
fix(config): add missing enum constructors for `shared_subscription_strategy`
Currently, there's code and tests that expect the possibility of a
value `sticky`, `hash_topic` and `hash_clientid` in the
`node.shared_subscritpion_strategy` configuration, but the schema enum
does not contain those constructors.
2021-12-29 10:34:20 -03:00
zhongwencool 121d906992 chore(log): add SLOG/3 to add meta info 2021-12-29 14:48:48 +08:00
zhongwencool 8b5b3a448a fix(test): trace_handler ct fail 2021-12-29 11:06:31 +08:00
zhongwencool 4b6bba11eb feat(trace): struct log for trace 2021-12-29 00:26:54 +08:00
zhongwencool 0712fc1e75 chore(schema): remove emqx_schema:unicode_binary/0 2021-12-28 23:50:12 +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
zhongwencool 47be5b9ef2
Merge pull request #6539 from zhongwencool/fix-override-conf-not-load
fix(conf): can't include local/overide-conf file
2021-12-28 18:03:56 +08:00
zhongwencool e44f7de596 chore(conf): update hocon to 0.22.1 2021-12-28 16:17:19 +08:00
Shawn bf2392f682 chore(typerefl): update typerefl to 0.8.6 2021-12-28 10:52:30 +08:00
lafirest e2240bdf03 feat(emqx_limiter): improve burst implementation 2021-12-28 10:13:55 +08:00
zhongwencool 668180388c feat(trace): replace logger_formatter by emqx_trace_formatter 2021-12-27 14:40:40 +08:00
JianBo He 523b5761b7
Merge pull request #6527 from HJianBo/fix-receive-maximum-50
fix: disconnect the client due to exceed receive-maximum packets
2021-12-27 09:13:24 +08:00
zhongwencool 0b099432c5 fix(conf): can't include local/overide-conf file 2021-12-24 19:20:36 +08:00
tigercl 41694b7b34
Merge pull request #6526 from emqx/release-5.0-beta.3
Sync 5.0-beta.3 fixes into master
2021-12-24 13:49:13 +08:00
zhongwencool 33a6568654 fix(banned): crash by bad peerhost; add banned http API tests 2021-12-24 10:56:41 +08:00
k32 bd31b52e35 chore(ekka): Bump version to 0.11.2 2021-12-23 15:29:35 +01:00
Spycsh 41e373dbc4
Merge pull request #6478 from Spycsh/slog
chore: refactor ?SLOG
2021-12-23 22:21:33 +08:00
JianBo He 52502e29c3 fix: disconnect the client due to exceed receive-maximum packets
As described in the 5.0 specification, we should disconnect clients that
exceed the receive-maximum limit.

> If it receives more than Receive Maximum QoS 1 and QoS 2 PUBLISH packets
where it has not sent a PUBACK or PUBCOMP in response, **the Server uses a
DISCONNECT packet with Reason Code 0x9**

fix: #6447
2021-12-23 14:06:11 +08:00
Thales Macedo Garitezi 238895a301
chore(mix): correctly define release version
With this, we no longer need the last hack in `mix_release.sh`.

A version schema with 3 parts (Major.Minor.Patch) is required by
Elixir:

https://hexdocs.pm/elixir/1.13.1/Version.html#module-versions
2021-12-22 15:43:43 -03:00
Thales Macedo Garitezi 68cbded7c6
fix(dialyzer): fix dialyzer warnings
Adding hocon to emqx solves the issue, since other offending apps
depend on emqx.  The warnings were that it was not able to find info
on the `hocon_schema` behaviour.

Example:
```
Callback info about the hocon_schema behaviour is not available
```
2021-12-22 15:15:19 -03: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
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
zhongwencool f7a55d3f8d
Merge pull request #6238 from zhongwencool/fix-keepalive-ct-failed
fix: keepalive ct failed
2021-12-20 11:00:20 +08:00
zhongwencool 96ee51fe57
Merge pull request #6460 from zmstone/feat-add-plugin-mgmt
refactor(plugins): refactor plugins configuration interface
2021-12-20 09:24:38 +08:00
Spycsh ca2660d609 chore: refactor ?SLOG 2021-12-18 00:17:45 +01:00
k32 93acf8a3a7
Merge pull request #6451 from k32/dev/fix-dispatch-when-emqx-is-stopped
fix(broker): Check broker status before dispatch
2021-12-17 15:19:34 +01:00
zhongwencool 870af6df41 fix: Limit interval between 0~65535 2021-12-17 15:51:54 +08:00
zhongwencool 38d42517f7 fix: misc_SUITE:t_drain_down sometimes fails 2021-12-17 14:58:50 +08:00
zhongwencool 38438415b8 fix: replace LOG by SLOG 2021-12-17 10:52:14 +08:00
zhongwencool 89d904b7ef feat(trace): trace http api schema 2021-12-17 09:29:37 +08:00
Zaiming (Stone) Shi 3a7924d0fd refactor(plugins): new CLI for plugins 2021-12-16 21:21:16 +01:00
Zaiming (Stone) Shi 47661042b9 fix(cli): make emqx_ctl aware of max width 2021-12-16 20:12:15 +01:00
Zaiming (Stone) Shi b9a3b558ee refactor(plugins): refactor plugins configuration interface 2021-12-16 13:59:20 +01:00
k32 618113d507 fix(broker): Check broker status before dispatch
Fixes: #6388
2021-12-15 19:49:46 +01:00
zhongwencool a43ac1b778 fix: improve rfc3339 format error 2021-12-15 16:58:07 +08:00
zhongwencool f95ef04cf7
Merge branch 'master' into api-key-secret 2021-12-15 16:01:09 +08:00
Thales Macedo Garitezi 95de2d3467
fix(monitor): fix return value on badrpc
If the rpc in `emqx_dashboard_monitor_api:get_collect/1` fails, an
empty map is return.  But the current function expects a 4-tuple,
which results in a 500 error returned on such occasions.

```
curl -su admin:public localhost:8888/api/v5/monitor/current | jq .
{
  "code": "INTERNAL_ERROR",
  "message": "error, function_clause, [{emqx_dashboard_monitor_api,format_current_metrics,[[#{},{0,0,0,0},{0,0,0,0}],{0,0,0,0}],[{file,\"emqx_dashboard_monitor_api.erl\"},{line,179}]},{emqx_dashboard_monitor_api,current_counters,2,[{file,\"emqx_dashboard_monitor_api.erl\"},{line,167}]},{minirest_handler,apply_callback,3,[{file,\"minirest_handler.erl\"},{line,112}]},{minirest_handler,init,2,[{file,\"minirest_handler.erl\"},{line,38}]},{cowboy_handler,execute,2,[{file,\"cowboy_handler.erl\"},{line,41}]},{cowboy_stream_h,execute,3,[{file,\"cowboy_stream_h.erl\"},{line,318}]},{cowboy_stream_h,request_process,3,[{file,\"cowboy_stream_h.erl\"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]"
}
```
2021-12-14 17:56:32 -03:00
Ilya Averyanov b8a68d7a9f
Merge pull request #6384 from savonarola/refactor-password-hashing
refactor(authn): unify password hashing
2021-12-14 16:21:02 +03:00
Ilya Averyanov 708d9cfc6c refactor(authn): restore pbkdf2 password hashing functionality 2021-12-13 21:40:09 +03:00
zhongwencool b4e2aa0dcf
Merge branch 'master' into feat-add-emqx-plugins-app 2021-12-13 22:28:03 +08:00
lafirest cbe683c6a3
Merge pull request #6353 from lafirest/slow_subs
feat(emqx_slow_sus): ported emqx_slow_subs from v4.4
2021-12-13 17:35:17 +08:00
JimMoen 5785b0c20b fix(ssl): file content return type 2021-12-13 16:08:41 +08:00
Zaiming (Stone) Shi d3d8b3a01f fix: allow listener not_found before restart 2021-12-12 22:18:56 +01:00
Zaiming (Stone) Shi 38ac10d3e2 feat(plugins): add emqx_plugins skeleton
* added emqx_plugins app.
* emqx_plugins.erl is moved from emqx app to emqx_plugins app
  same for the test SUITE
2021-12-12 19:40:34 +01:00
Ilya Averyanov fddb28a4b0 fix(wss): update cowboy & ranch for OTP24 compatibility 2021-12-10 20:38:44 +03:00
lafirest 82746134bb feat(emqx_slow_sus): ported emqx_slow_subs from v4.4 2021-12-10 16:42:55 +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
zhongwencool 0614c157ec fix(elvis): elvis warning 2021-12-09 16:42:10 +08:00
zhongwencool cf11f3f8ee feat(api-key): support api_key/secret 2021-12-09 16:42:10 +08:00
JianBo He 20ba9d285f feat(exhook): expose headers for on_messages_publish hook 2021-12-09 15:06:17 +08:00
Thales Macedo Garitezi 2b5fe9179e
fix(live_conn): fix live connection count on race condition (5.0)
Port from #6406 to 5.0.

When multiple clients try to connect concurrently using the same
client ID, they all call `emqx_channel:ensure_connected`, increasing
the live connection count, but only one will successfully acquire the
lock for that client ID.  This means that all other clients that
increased the live connection count will not get to call neither
`emqx_channel:ensure_disconnected` nor be monitored for `DOWN`
messages, effectively causing a count leak.

By moving the increment to `emqx_cm:register_channel`, which is only
called inside the lock, we can remove this leakage.

Also, during the handling of `DOWN` messages, we now iterate over all
channel PIDs returned by `eqmx_misc:drain_down`, since it could be
that one or more PIDs are not contained in the `pmon` state.
2021-12-08 15:15:27 -03:00
Tobias Lindahl 92f116afa4
Merge pull request #6393 from emqx/fix-takeover-race-on-enqueued-messages 2021-12-08 11:00:46 +01:00
Ilya Averyanov 2b0a3e8ba3 refactor(authn): unify password hashing 2021-12-07 23:38:26 +03: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
Tobias Lindahl 14bef1ba31 refactor: make clauses safe for future reordering 2021-12-07 16:14:32 +01:00
Zaiming (Stone) Shi 5440b431a1 fix: typo takeovered -> takenover 2021-12-07 16:06:23 +01:00
Tobias Lindahl e6ecc6ca60 fix(emqx_channel): fix race condition in session takeover
Sessions must not enqueue messages when another process is taking over
the client id, since it already passed on the message queue in the
session state.

Without this fix, messages arriving after `{takeover, 'begin'} to a
channel with no connection (i.e., a persistent session) would be lost.
2021-12-07 14:17:59 +01:00
Tobias Lindahl 4eef9a5bac
Merge pull request #6378 from emqx/fix-flaky-tests-persistent-session-SUITE
test(flaky_tests): fix persistent_session_SUITE
2021-12-06 14:01:34 +01:00
Thales Macedo Garitezi b6dede3679
Merge pull request #6372 from emqx/fix-typo-listeners
fix(listeners): fix typo in listener type

`emqx_listeners:{current,max}_conns` were matching on type `tcl`.
However, this type doesn't exist (it's not defined in
`?TYPES_STRING`). Therefore, this clause would never match.  It seems
that the intention was that it shouldbe `tcp`.
2021-12-06 09:06:54 -03:00
Tobias Lindahl 6ed3dbd39b test(persistent_session_SUITE): protect against non-atom sinks 2021-12-06 12:40:58 +01:00
Thales Macedo Garitezi 2d46ae7517
fix(typo): fix more typos and restore rate_limit config after test 2021-12-06 08:14:50 -03:00
Tobias Lindahl e62b094f3b test(snabbkaffe): Update to latest snabbkaffe
In particular, this should remove the flaky snabbkaffe failures in
persistent session SUITE where the snabbkaffe_nemesis is trying to
make an ets:lookup in a table that no longer exists.
2021-12-06 11:22:25 +01:00
JimMoen a6a1b288d2
Merge pull request #6365 from JimMoen/fix-vm-mem-info
fix(vm_mem): info calc and display
2021-12-06 17:47:52 +08:00
Tobias Lindahl 366c757959 test(flaky_tests): fix persistent_session_SUITE
Increase timeout on message receive and ensure more info when the test fails.
2021-12-06 10:42:19 +01:00
DDDHuang b0b2adca37
Merge pull request #6377 from DDDHuang/alram_api_info
fix(alarm): alarm message with .2f format
2021-12-06 17:42:02 +08:00
Zaiming (Stone) Shi 96de7e6b30 docs: refine authn and auth config docs 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi a1f79850b4 refactor: allow accessing override config paths 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi 5525cb3262 refactor: only apply environment variables on base config 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi e6e28f9002 docs: fix emqx_schema doc style 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi bfc36efa0e fix: pin hocon 0.21.1 2021-12-06 08:00:37 +01:00
DDDHuang 1b0da3cc58 fix(alarm): alarm message with .2f format 2021-12-06 14:36:51 +08: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
Thales Macedo Garitezi bc8a0d7060
fix(listeners): fix typo in listener type
`emqx_listeners:{current,max}_conns` were matching on type `tcl`.
However, this type doesn't exist (it's not defined in
`?TYPES_STRING`). Therefore, this clause would never match.  It seems
that the intention was that it shouldbe `tcp`.
2021-12-03 15:55:51 -03:00
JimMoen d4246ad2f6 fix(vm): add literal_alloc memory calculation 2021-12-03 14:41:33 +08:00
zhongwencool 858891dbf5 fix: rewrite ct badmatch 2021-12-03 09:54:44 +08:00
Ilya Averyanov 6b65151f69
Merge pull request #6325 from savonarola/test-authn-resources-scram
chore(authn): add SCRAM mechanism tests
2021-11-30 12:16:20 +03:00
tigercl 36cece7a49
Merge pull request #6314 from JimMoen/fix-re-escape
fix(authz): placehodler regular escape
2021-11-30 10:21:28 +08:00
Ilya Averyanov 4580c03ebc chore(authn): add SCRAM mechanism tests 2021-11-29 20:49:45 +03:00
Thales Macedo Garitezi 284619ef86
Merge pull request #6310 from emqx/test-fix-possible-flakiness
test(flakiness): prevent possible flakiness in test

If the spawned process doesn't have enough time to be properly set up,
the returned stacktrace may be empty, making the test fail. By
synchronizing the startup, we know that the process will have a proper
stacktrace by the time of the assertion.
2021-11-26 08:09:05 -03:00
JimMoen 1d3558ebe0 style: make elvis happy 2021-11-26 17:46:38 +08:00
zhongwencool f697028b70
Fix ping not return pong (#6285)
* fix: ./bin/emqx ping return pong

* chore: waiting longer for logger flush log to disk

* fix: change swagger page's limit from 100 to 1000

* chore: type wrong

* fix: sync log to disk by logger_disk_log_h:filesync
2021-11-26 17:02:45 +08:00
JimMoen b41c41570a fix(authz): placehodler regular escape 2021-11-26 15:39:42 +08:00
tigercl 124ba7a071
Merge pull request #6311 from emqx/release-5.0-beta.2
Sync bug fixes
2021-11-26 14:24:19 +08:00
Thales Macedo Garitezi d6288a0b70
test(flakiness): prevent possible flakiness in test
If the spawned process doesn't have enough time to be properly set up,
the returned stacktrace may be empty, making the test fail.  By
synchronizing the startup, we know that the process will have a proper
stacktrace by the time of the assertion.
2021-11-25 17:15:07 -03:00
JimMoen f74e34b6a5 fix(conf): change `max_topic_levels` default configuration 2021-11-25 10:11:24 +08:00
Thales Macedo Garitezi db3f7ff749
feat(sys_mon): remove `current_function`
Since we now output `current_stacktrace`, `current_function` is now
redundant.
2021-11-24 12:16:16 -03:00
Thales Macedo Garitezi a41d0d49bd
test(impossible_case): remove impossible case test
Since `emqx_vm:get_process_info/1` only accepts PIDs as arguments,
it's impossible for `emqx_sys_mon:procinfo/1` to return after
receiving the atom `undefined`.
2021-11-24 11:34:36 -03:00
Thales Macedo Garitezi 75a17431d5
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace
This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-24 11:24:27 -03:00
Tobias Lindahl ca89a8da61
Merge pull request #6274 from emqx/persistent-sessions-ram-backend
feat(persistent_sessions): add choice between ram or disc backends in…
2021-11-24 09:25:14 +01:00
Spycsh fda2e86187
Merge pull request #6107 from Spycsh/slog
chore: refactor slog under emqx, conf and exhook
2021-11-23 16:39:06 +01:00
Tobias Lindahl 9a97a7a1c7 chore(persistent_session): remove quotes around boolean in config 2021-11-23 16:24:40 +01:00
Tobias Lindahl df2dda2e10 chore(persistent_session): make more table creation parameterized 2021-11-23 16:23:47 +01:00
Tobias Lindahl 9eaedbf246 test(persistent_sessions): add back test groups lost in refactoring 2021-11-23 16:17:27 +01:00
Tobias Lindahl 46788ad31b chore(persistent_sessions): add descriptions of persistent session configs 2021-11-23 13:53:04 +01:00
Tobias Lindahl 0865fc6e57 test(persistent_sessions): increase wait time for cm unregister in test 2021-11-23 13:52:02 +01:00
Tobias Lindahl 6eb4a617bc test(persistent_sessions): make another attempt at fixing flaky test 2021-11-23 13:29:47 +01:00
zhouzb 4d92e2b6af fix(connector): fix options handling for mongo connector 2021-11-23 20:01:21 +08:00
Tobias Lindahl 08acb5d435 feat(persistent_sessions): add choice between ram or disc backends in mnesia 2021-11-23 11:51:21 +01:00
zhongwencool ef0e440d27
feat: http trace api for 5.0 (#6200)
* feat: port log trace http api for 5.0

* fix: name must printable unicode len<256

* fix: check-nl-at-eof warning

* fix: handler_id always atom
2021-11-23 13:49:12 +08:00
DDDHuang 6a60c17970
fix: add lw gateway endpoint placeholder support (#6267) 2021-11-23 12:08:45 +08:00
Thales Macedo Garitezi d7725f799c
fix(flaky_test): improve live connection count test on CI (#6257)
* fix(flaky_test): improve live connection count test on CI

It seems that a race condition that is triggered more often in CI can
make the test fail, possibly due to the ETS write not being seen by
the subsequent read in the test.

* style(elvis): fix NL in emqx_connector.conf
2021-11-23 11:12: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
zhouzb 5aa8ba45d3 fix(authn): add the case when the instance does not exist 2021-11-22 23:30:05 +01:00
zhouzb 81d425cb27 fix(ssl): fix the issue that the content of TLS certificate is not converted to path 2021-11-22 23:30:05 +01:00
Spycsh c89a663b53 chore: refactor slog under emqx, conf and exhook 2021-11-22 23:12:17 +01:00
Ilya Averyanov 071c2c99e8 refactor(authn resources): add `emqx_resource` and `emqx_authn` tests 2021-11-22 21:08:04 +03:00
Shawn a0e81226d7 fix(elvis): improve some code format 2021-11-22 19:10:00 +08:00
Shawn 37aeb28a79 fix(connector): test case conflict 2021-11-22 18:52:43 +08:00
Shawn 07e3e43a21 fix(authn): xref issues 2021-11-22 17:35:33 +08:00
Shawn 9c93ea0338 feat(connector): add API for /connectors_test 2021-11-22 17:35:33 +08:00
Shawn c4668b4047 fix(bridge): load emqx_conf in testcases 2021-11-22 17:35:32 +08:00
Shawn 7d64013edd refactor(connector): add connector configs 2021-11-22 17:35:32 +08:00
Shawn e41736f5cb fix(bridge): update testcases for bridge APIs 2021-11-22 17:35:32 +08:00
Zaiming (Stone) Shi 90a65b8d04
Merge pull request #6242 from emqx/update-otp-version-and-pkg-name-scheme
Update otp version and pkg name scheme
2021-11-22 10:34:24 +01:00
Ilya Averyanov 3d449b5acf fix(authn): create authn chain tab in start_link 2021-11-21 19:52:29 +03:00
Zaiming Shi a705bc1fc7 build: change package name scheme
`${PROFILE}-${PKG_VSN}-otp${OTP_VSN}-${SYSTEM}-${ARCH}.zip`
2021-11-20 20:44:48 +01:00
Zaiming Shi f84d1aa75e style: fix some elvis style check 2021-11-20 20:41:06 +01:00
Zaiming Shi 6edd862dd5 refactor: no more EMQX_ENTERPRISE compile flag
The compile flag was introduced in EQM X 4.3 series
where CE and EE code was diverged large enough which made
non-practicle to determin edition at runtime.

such approach made testing quite challenging as we'll have to
build with different compile flags inorder to run per-edition
test cases

In this commit, we try to retrieve edition info from EMQX's
description text, (put to PT for fast access) at runtime
so we can test ALL editions from a super-set edition (EE).
2021-11-20 20:41:06 +01:00
Ilya Averyanov c86887491c fix(authn): transfer chain tab to emqx_authentication_sup
To preserve configuration after emqx_authentication crashes.
2021-11-19 16:41:22 +03: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
JimMoen e361cd5733
Fix dashboard APIs return (#6177)
* fix(dashboard_api): delete non-exist user wrongly return 204

* fix(dashboard): dashboard user should use `tags` not `tag`

* fix(dashboard): create/update user return 200 with full users list

* fix(dashboard): logout status code 204

* fix(dashboard): update pwd status code 204

* test: test suite for dashboard APIs

* refactor(dashboard): user info mnesia record name use description

* style: make elvis happy

* fix(api): dashboard swagger check request should not override env

* fix(dashboard): add/modify dashboard returns single record

* ci: update emqx-fvt version to new tag 1.0.2-dev1
2021-11-18 14:36:12 +08:00
zhongwencool 33f5eec802
feat: set keepalive via http api (#6171)
* feat: set keepalive via http api

* fix: make cluster_rpc test case solider
2021-11-18 10:56:58 +08:00
Tobias Lindahl e52d8138bf test(persistent_session_SUITE): fix another flaky test
Make sure that the connection process dies before terminating the
snabbkaffe trace.
2021-11-17 14:04:06 +01:00
Tobias Lindahl 5914b8ad3d
Fix flaky tests for persistent sessions (#6202)
* test(persistent_session_SUITE): remove redundant sleep and trap_exits

* test(persistent_session_SUITE): fix race for started snabbkaffe

Sometimes snabbkaffe was not started when publishing from a different
process. Wrap the publishing code in a ?check_trace to make sure it is
started, and make sure the publish process is truly down before ending
the trace.

* test(persistent_session_SUITE): fix takeover race

Make sure the previous session is unregistered before trying to
connect again. Sometimes the new session was trying to take over the
session that was shutting down still.
2021-11-17 18:55:11 +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
zhongwencool a7a5e2d1f4
fix: can't get default key if all key if default (#6181) 2021-11-17 14:27:51 +08:00
JianBo He d0bdf27e0c chore: fix elvis warnings 2021-11-17 11:04:09 +08:00
DDDHuang 7c48bcabed
fixt: generate api (#6124)
* fix: generate api

* fix: banned suite

* fix: generate api bad rpc

* fix: bad message suite

* fix: create banned with check existed
2021-11-17 10:55:48 +08:00
Tobias Lindahl ae5792fa64 chore(emqx_cm): remove unused tracepoints 2021-11-16 14:37:15 +01:00
Tobias Lindahl c9b86a8375 test: make testcases not rely on timer:sleep 2021-11-16 13:50:01 +01:00
Tobias Lindahl 05f3bc8c90 fix(emqx_cm): make takeover session less likely to hit a race 2021-11-16 13:49:45 +01:00
Zaiming Shi ff23e9dde1 test: sync with emqx_cm process before flushing emqx_pool 2021-11-15 22:27:16 +01:00
JianBo He 9e333ac8b3 fix(emqx_cm): fix typos 2021-11-15 22:26:46 +01:00
Zaiming Shi 7e2ca9e287 fix(session): force kill session for 'kick' and 'discard'
Prior to this fix, 'kick' and 'discard' calls may timeout (or
fail for other reason), failures lead to only a log, then
continue to allow the new session to get registered.

As a result, in case a client is stuck, there is no way to
force it to step down, end up with multiple connections (sessions)
for the client ID in dashboard.

After this fix, the stale pids are notified to shutdown
via a gen_server:call, and forced with a exit(Pid, kill) for any
exception happend to the gen_server:call
2021-11-15 22:26:46 +01:00
Zaiming (Stone) Shi 650905667b
Merge pull request #6172 from JimMoen/fix-emqx_cm-ct
test: add tasks flushing in emqx_cm cases
2021-11-15 17:17:27 +01:00
JimMoen cf80aaacc3 test: add tasks flushing in emqx_cm cases 2021-11-15 20:40:43 +08:00
Zaiming (Stone) Shi 9761fe2f6d
Merge pull request #6009 from tigercl/fix/authn
fix(authn): fix handling of query result
2021-11-15 13:32:56 +01:00
JimMoen 5a928ad8c3 test(cm): add sleep time for multicore scheduling 2021-11-15 13:52:15 +08:00
DDDHuang f0107868d4
fix: test suite stable (#6136)
* fix: test suite stable
2021-11-12 10:53:30 +08:00
zhongwencool 7a5da76197
Mgmt http api banned (#5998)
* fix(swagger): don't transform [log,publish] to a list.pwd

* chore: replace banned-api by hocon schema

* fix(api): code style warning
2021-11-11 16:35:29 +08:00
Zaiming Shi 9c1972020c test: fix flaky test emqx_stomp_SUITE:t_rest_clienit_inf 2021-11-10 22:51:18 +01:00
Thales Macedo Garitezi 60d5017eea
style(elvis): fix elvis style complaints 2021-11-10 11:12:10 -03:00
Thales Macedo Garitezi 8fe342a02d
feat(stats): track live channel / client count
Track connected client count

In order to correctly display the number of _connected_ clients in our
monitor dashboard, we need to track those connections that are
actually connected to clients, not considering connections from
persistent sessions that are disconnected. Today, the
`connections.count` that is displayed in the dashboards considers
those disconnected persistent sessions as well.

The new statistics can be found in the
[`emqx_management`](https://github.com/emqx/emqx/tree/main-v4.4/apps/emqx_management)
plugin, under `/api/v4/stats`, in the keys
`live_connections.{max,count}`.
2021-11-10 11:12:10 -03:00
zhongwencool 2d159ad9a1
fix(test): flaky mqtt expiry test case. (#6099) 2021-11-10 09:55:36 +08:00
k32 5726444645
Merge pull request #6066 from k32/remove-nosuspend-5
fix(emqx_connection): Add backpressure to TCP connections
2021-11-08 13:39:38 +01:00
Zaiming (Stone) Shi 3b02366a5b
Merge pull request #6064 from zmstone/style-check-newline-at-eof
Style: check newline at EOF
2021-11-04 18:01:45 +01:00
k32 0a5a9bd7d0 fix(emqx_connection): Add backpressure to TCP connections
Fixes #5494
2021-11-04 16:24:47 +01:00
Zaiming Shi d1abb30818 ci: fix elvis check 2021-11-04 15:27:10 +01:00
Zaiming Shi 56e2a9741f style: ensure newline at EOF for all files 2021-11-04 14:40:14 +01:00
Ilya Averyanov aed9ad3f7d
Merge pull request #6037 from savonarola/fix-authn-api-atom-leak
fix(authn api): eliminate possible atom leak
2021-11-03 23:17:47 +03:00
Zaiming Shi a139a0d453 fix(config): pin hocon 0.20.6
fix translation error
2021-11-03 11:15:35 +01:00
Tobias Lindahl 89cd68d36f refactor(persistent_sessions): fix coding style 2021-11-02 09:33:54 +01:00
Tobias Lindahl 8385eff98e fix(persistent_sessions): we only need to persist if the session expired 2021-11-02 09:27:50 +01:00
Tobias Lindahl b7ed649185 test(persistent_session): wait in test to avoid race 2021-11-01 14:56:10 +01:00
Ilya Averyanov 796553b5ea fix(authn api): eliminate possible atom leak 2021-11-01 16:51:48 +03:00
Tobias Lindahl ce49a281ed fix(persistent_sessions): protect against looking up stale data 2021-11-01 14:21:01 +01:00
Tobias Lindahl 329dd4d780 test(persistent_session): try to fix flaky snabbkaffe failure 2021-11-01 14:21:01 +01:00
Tobias Lindahl 1f13a6caad chore(persistent_sessions): tune mnesia parameters for better dump behavior 2021-11-01 14:21:01 +01:00
Tobias Lindahl ec68d7fc58 test(persistent_sessions): stabilize flaky tests 2021-11-01 14:21:01 +01:00
Tobias Lindahl 7ae6e04582 fix(persistent_sessions): channels can terminate without a session 2021-11-01 14:21:01 +01:00
Ilya Averyanov 800b4b32c7
refactor(authn api): use config schemas for request validations (#5999) 2021-11-01 17:52:03 +08:00
JimMoen d9cb0283f3 fix(alarm): duration unit in dashboard, microsecond => millisecond 2021-10-29 16:48:13 +08:00
zhouzb c64637ca39 test(authn): add test case of version checking 2021-10-29 14:18:25 +08:00
zhouzb 966348db05 fix(authn): fix version switching error when updating multiple times 2021-10-29 10:12:29 +08:00
zhongwencool e62fde321c
Emqx alarm (#5994)
* chore(alarm): normalize_message outside emqx_alarm

* chore(alarm): don't cache config in emqx_alarm; remove dirty_write/read; add desc/example to alarm; add more test

* chore(alarm_api): alarm_api with hocon schema

* fix: activted's nullable is true

* fix(swagger): translate map to object

* fix(cluster_rpc): debug failed cluster_rpc test

* fix: Update schema description

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2021-10-28 18:03:51 +08:00
Tobias Lindahl 48c7788d6f
Merge pull request #5875 from emqx/extend-persistent-sessions
Extend persistent sessions
2021-10-27 09:12:13 +02:00
Tobias Lindahl 99836b2660 fix(persistent_sessions): add back the trap_exit 2021-10-26 10:52:27 +02:00
JimMoen 0bd5cd9336 feat(authn): authn users page query 2021-10-26 16:16:37 +08:00
Tobias Lindahl 558416af1d chore(persistent_sessions): remove redundant trap_exit flag 2021-10-26 10:01:02 +02:00
Tobias Lindahl 28417ad1d7 fix(persistent_sessions): allow for some failures of workers 2021-10-26 09:55:57 +02:00
Tobias Lindahl 234641ccf4 refactor(persistent_sessions): don't start session sup when disabled 2021-10-26 09:54:41 +02:00
Tobias Lindahl e3dc9b3f4f fix(persistent_sessions): start the message gc timer 2021-10-26 09:53:49 +02:00
Tobias Lindahl f39ccfb304 chore(persistent_sessions): address review comments 2021-10-26 09:53:18 +02:00
Zaiming Shi a7413bc11e fix(authn): save certificates to certs dir 2021-10-24 16:21:57 +02:00
Zaiming Shi 71d2e6bebd refactor(authz): call emqx_tls_lib to save & read SSL files 2021-10-24 10:44:47 +02:00
Zaiming Shi a7771afd9d refactor(tls): move ssl files handling to emqx_tls_lib
This is an attempt ot make it more generic for other APPs to use.
Aslo added test cases to cover most of the code paths.
2021-10-23 18:20:38 +02:00
Zaiming (Stone) Shi bdeb1685e0
Merge pull request #5977 from zmstone/chore-pin-hocon-0.20.5
Pin hocon 0.20.5
2021-10-22 16:36:12 +02:00
Zaiming Shi 0937c81632 test: fix emqx_config_SUITE 2021-10-22 09:45:01 +02:00
Tobias Lindahl 64787f4ccd test(persistent_session): fix bad guard 2021-10-22 01:03:08 +02:00
Tobias Lindahl 10de564abf test(persistent_sessions): test websocket connection 2021-10-22 00:46:58 +02:00
Zaiming Shi aa6053291e fix(schema): add roots for emqx_zone_schema
emqx_zone_schema is never used at root level, but for config doc
generation, it needs the roots.
2021-10-21 23:11:02 +02:00
Zaiming Shi b03b0717ce docs: authenticator_config ref link to the struct 2021-10-21 23:11:02 +02:00
Zaiming Shi f9b211cce6 chore: pin hocon 0.20.5
for two changes:
default string values are filled with binary() instead of [integer()]
better reference links in config document
2021-10-21 23:09:51 +02:00
Tobias Lindahl 9188f5b67e fix(persistent_sessions): postpone table creation until configs are loaded 2021-10-21 15:23:22 +02:00
Tobias Lindahl fe4d14303c fix(persistent_session): fix rebase error 2021-10-21 15:23:22 +02:00
Tobias Lindahl ec429857e0 refactor(persistent_sessions): code format changes after review 2021-10-21 15:23:21 +02:00
Tobias Lindahl 655d31726a feat(persistent_session): add early removal of delivered message 2021-10-21 15:23:21 +02:00
Tobias Lindahl b9b8111edb test: add new proper types to #session{} after rebase 2021-10-21 15:23:21 +02:00
Tobias Lindahl fd71bc50ab fix(persistent_session): Make sure to discard expired sessions on reconnect 2021-10-21 15:23:21 +02:00
Tobias Lindahl f2d26f5e03 test(persistent_sessions): Remove bogus stopping of quicer 2021-10-21 15:23:21 +02:00
Tobias Lindahl 12639addb9 fix(persistent_session): Make sure the connection processs is dead 2021-10-21 15:23:21 +02:00
Tobias Lindahl ed0f435546 chore(persistent_sessions): correct copyright information in new files 2021-10-21 15:23:21 +02:00
Tobias Lindahl fdba441f4f fix(persistent_sessions): revert bogus table type change 2021-10-21 15:23:21 +02:00
Tobias Lindahl 7808ffe600 fix(persistent_sessions): protect (un)subscribe from calling session router 2021-10-21 15:23:21 +02:00
Tobias Lindahl 7b394267dd feat: persistent sessions stored in mnesia
* Persistent sessions can survive node/connection process down
* Internal SessionID is generated, external ClientID is as before
* Sessions are persisted to mnesia
* A session router is added in parallel to the ordinary router
* Messages that are subscribed to by a persistent session are
  persisted by publisher
* Information about persisted and delivered messages are stored in
  mnesia per session.
* A resume protocol similar to takeover is implemented for resuming
  from mnesia
* Can be configured (and enabled) by the top lever config
  "persistent_session_store"
2021-10-21 15:23:21 +02:00
Tobias Lindahl fc7b4c0009 refactor: make it possible to use different tries
In preparation for persistent sessions
2021-10-21 15:23:21 +02:00
Tobias Lindahl 24e870672c refactor: use set_session in preparation for persistent sessions 2021-10-21 15:23:21 +02: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 9fdd5e6a7e
fix(emqx_machine): Fix start/stop callbacks (#5969)
* fix(emqx_machine): Fix start/stop callbacks

* chore(ekka): Bump version to 0.11.1

* fix(router): Wait for the tables

* fix(emqx_cluster_rpc): Stop cluster RPC when joining a cluster

* fix(emqx_app): Fix a deadlock when joining the cluster

* fix(emqx_telemetry): Wait for mnesia tables

* test(ct_helper): Start ekka before emqx
2021-10-21 14:49:21 +08:00
Zaiming (Stone) Shi ed069cfecc
Merge pull request #5963 from zmstone/refactor-authn-schema
refactor(authn): check authenticator config with provider module
2021-10-21 08:07:48 +02:00
tigercl 45b484a26a
Merge pull request #5967 from tigercl/fix/authn-mysql
fix(authn): fix placeholders are not replaced correctly
2021-10-21 10:20:05 +08:00
zhouzb ef731c74eb chore(deps): unify version of hocon 2021-10-21 09:35:00 +08:00
William Yang 7b3537d822
Merge pull request #5966 from qzhuyan/dev/william/lc-0.1.2
feat(olp): bump to 0.1.2
2021-10-20 21:57:31 +02:00
Zaiming Shi ce5b456872 refactor(authn): make schema doc generation work 2021-10-20 17:42:06 +02:00
Zaiming Shi fa91e5f583 fix(authn): allow single authenticator instance from config 2021-10-20 15:06:08 +02:00
Zaiming Shi 019b9d17f6 refactor(emqx_config_handler): async remove 2021-10-20 14:12:46 +02: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 88d891a59a feat: support check_config callback for authenticator provider 2021-10-20 13:04:55 +02:00
Zaiming Shi 72c26931d7 fix: fill string fields' default value with binary 2021-10-20 11:52:30 +02:00
Zaiming Shi 1b9c082563 refactor(authn): check authenticator config with provider module
mainly two changes:

1. the schema is simplified at root level, per-authenticator checks
   are done after the type can be identified
2. the config handling part is split out from emqx_authentication
   module to emqx_authentication_config module
2021-10-20 10:13:11 +02:00
Zaiming Shi 0fcb3a1e93 docs: add more schema docs for authz 2021-10-20 09:17:21 +08:00
Zaiming Shi 0cf5aa5611 test: remove cuttlefish code 2021-10-20 09:17:21 +08:00
William Yang d3ddecb144 feat(olp): bump to 0.1.2
remove noop logging
2021-10-19 21:20:12 +02:00
Zaiming Shi 2e01eeb6b4 fix(emqx_schema): typo in nullable prop 2021-10-19 15:42:34 +02:00
William Yang c780a1a53c
Merge pull request #5957 from qzhuyan/dev/william/quic-0.0.9
feat(quic): bump quicer 0.0.9
2021-10-19 14:52:08 +02:00
William Yang 56d8e0f59f feat(quic): bump quicer 0.0.9 2021-10-19 13:54:43 +02:00
k32 b3a8753219 fix(mria): Replace mnesia calls with mria 2021-10-19 12:24:35 +02:00
tigercl bd53c488d1
Merge pull request #5950 from tigercl/fix/authn-version
fix(authn): fix the authentication instance cannot run after the update
2021-10-19 09:58:09 +08:00
zhouzb 31e2d9d2c0 fix(authn): fix the authentication instance cannot run after the update 2021-10-19 09:05:54 +08:00
k32 0d2d5f6bf9 fix(emqx_alarm): Wait for tables 2021-10-18 22:40:18 +02:00
k32 37a1c45af0 fix(dialyzer): Fix problems found by dialyzer 2021-10-18 22:04:05 +02:00
k32 07ea6e5689 fix(mria): Fix startup sequence 2021-10-18 22:04:05 +02:00
k32 fcdf10080d chore(ct): ekka_mnesia -> mria_mnesia 2021-10-18 22:04:05 +02: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
zhanghongtong b1bf21c73b fix(emqx schema): fix function clause by user_lookup_fun 2021-10-18 16:37:16 +08:00
zhongwencool c73205a589
Ct helpers migrate (#5943)
* chore: common test

* chore: delete emqx_ct_helpers deps
2021-10-18 13:45:52 +08:00
Zaiming Shi ad195d0eb0 chore(emqx_vm): delete unused function get_process_group_leader_info 2021-10-16 21:10:43 +02:00
Zaiming Shi 71a11834ad chore: pin rebar plugins and test deps 2021-10-15 16:46:49 +02:00
Zaiming Shi 68d91e770b test: remove ct_helpers from apps/emqx rebar.config 2021-10-15 16:11:48 +02:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
William Yang 30a0635ea5 fix: bump ekka to 10.0.9
fix ekka etcd cluster ssl options
2021-10-14 22:49:25 +02:00
William Yang dcca1d7544
Merge pull request #5867 from qzhuyan/dev/william/olp
feat(olp): first PR for overload protection
2021-10-14 10:00:01 +02:00
Shawn 9c7eef5295 feat(rules): update rule_engine configs from APIs 2021-10-14 15:09:37 +08:00
Shawn c6c314de1a fix(hocon): update hocon to 0.19.6 2021-10-14 15:09:37 +08:00
lafirest 8a2c5e2422 feat(rate_limiter): implement hierarchical token buckets 2021-10-14 10:20:05 +08:00
William Yang 23fc8afc50 feat(olp): rename olp mgmt API
on -> enable
off -> disable
2021-10-13 10:18:57 +02:00
William Yang 58033c083d chore(olp): update alarm text 2021-10-12 16:08:20 +02: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
Zaiming (Stone) Shi 04f2487108
Merge pull request #5908 from zmstone/refactor-emqx-more-slog
refactor(emqx): fix remaining legacy logging
2021-10-12 06:45:25 +02:00
JimMoen 19456d84a5 style: code format fix 2021-10-12 10:37:45 +08:00
William Yang b0c27c74fd feat(olp): bump lc to 0.1.1 2021-10-12 00:00:20 +02:00
Zaiming Shi eb43423552 refactor(emqx): fix remaining legacy logging 2021-10-11 21:51:39 +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
Spycsh d4657754eb chore(dialyzer): fix spec for record field message.extra 2021-10-11 14:10:22 +02:00
Zaiming Shi 71731c01f1 refactor(emqx): refine SLOG messages
unified logging for unexpected handle_cast handle_call and handle_info
2021-10-11 07:41:52 +02:00
Zaiming Shi 785793b345 refactor: add logging allow or not check for SLOG 2021-10-11 07:41:52 +02:00
Zaiming Shi 5274e0a726 refactor(emqx): add 'extra' field to message record 2021-10-11 02:07:33 +02:00
Spycsh fe5a169be1 chore: change to structured logging under apps/emqx/src 2021-10-09 14:02:22 +08:00
Shawn 63bf161522 fix(test): testcase t_validity_period failed occasionally 2021-10-09 09:17:09 +08:00
Zaiming (Stone) Shi aa0c58daa0
Merge pull request #5881 from zmstone/fix-flaky-tests-cm-session-race-condition
chore: fix flaky test cm_SUITE open session racecondition
2021-10-07 17:28:10 +02:00
William Yang 8d8969672b feat(olp): add desc in schema 2021-10-07 16:03:54 +02:00
Zaiming Shi a882a8c496 chore: fix flaky test cm_SUITE open session racecondition 2021-10-07 11:51:40 +02:00
Zaiming Shi 7ae4505636 test(emqx_broker): fix flaky tests 2021-10-07 11:31:22 +02:00
William Yang 77f8159ca1 docs(olp): emqx_olp module 2021-10-06 21:07:14 +02:00
William Yang 9ecb7821f9 feat(olp): use tagged deps libs 2021-10-06 10:38:39 +02:00
Zaiming Shi ce486e5540 fix(ssl): verify ciphers list against all available ciphers
Prior to this change the ciphers are only checked against
the list returned from from
`ssl:cipher_suites(all, 'tlsv1.2', openssl)`
which may cause some (weak) ciphers missing in certain
otp + openssl installation
2021-10-05 15:25:56 +02:00
Zaiming Shi b42a2f2bc2 fix(ssl): delete some weak cipher suites from the default list 2021-10-05 15:15:00 +02:00
William Yang afb4b5dbd7 test(olp): add CT suite emqx_olp_SUITE 2021-10-05 14:37:39 +02:00
William Yang bfe4346469 feat(olp): alarm without nodeid 2021-10-05 14:36:36 +02:00
William Yang 547484a2d1 chore(olp): add spec. 2021-10-05 09:47:21 +02:00
William Yang 6baf2dbd95 feat(olp): backoff new conn 2021-10-05 09:23:23 +02:00
William Yang 370edac031 feat(olp): add default config 2021-10-04 16:30:48 +02:00
William Yang 4dc63b26a8 feat(olp): metrics 2021-10-04 16:30:44 +02:00
William Yang 67267acb70 feat(olp): management API 2021-10-04 14:36:30 +02:00
William Yang eb895a9f80 feat(olp): quic 2021-10-04 12:31:14 +02:00
William Yang 9304e3c122 feat(olp): add config and backoff gc 2021-10-04 12:21:30 +02:00
William Yang 166f02edc4 feat(olp): don't hibernate conn proc when overloaded 2021-10-04 10:44:53 +02:00
William Yang e9710ade14 feat(olp): first commit for overload protection
- add lc app
- add alarm handler for lc runq alarm
- backoff when handling CONNECT message
- close new connswhen overload
2021-10-01 16:14:38 +02:00
zhongwencool 93c210887b chore: don't use emqx_machine.hrl in emqx 2021-09-30 16:04:30 +08:00
zhongwencool 44a6f04a45 chore: reorganize shards position 2021-09-30 16:04:30 +08:00
zhongwencool be123f613d
Fix: apps should boots after emqx_machine_sup's children spawn. (#5851)
* fix(cluster_call): apps should start after cluster_call init

* fix: undef function

* chore: reformat code

* fix: ekka must start before emqx
2021-09-30 13:56:18 +08:00
zhanghongtong b94dcb7bc7 chore(release): update emqx release version 2021-09-29 18:29:44 +08:00
tigercl 55ec5bab9e
Merge pull request #5773 from tigercl/feat/psk-file
feat(psk): support psk
2021-09-29 13:37:49 +08:00
Zaiming (Stone) Shi 83e7ab681b
Merge pull request #5820 from JimMoen/refactor-frame-parse-logging
Refactor frame parse logging with bug fix.
2021-09-28 19:31:39 +02:00
Zaiming Shi 225ebdaa87 fix(frame): simlify error excption context
We should not raise error with the exact context after logging it
because it will end up duplicated in the log
2021-09-28 18:15:32 +02:00
JimMoen c1ff30896a fix(frame): safely serializing and structured log. 2021-09-28 18:55:25 +08:00
JimMoen 9832eea250 fix(frame): safely parsings. 2021-09-28 14:11:18 +08:00
JimMoen 7d6180f10a fix(frame): variable byte integer could be larger than 4 bytes. 2021-09-28 14:11:18 +08:00
Zaiming Shi a158b0235d chore(tests): use assertError
the ?catch_error macro passes when there is no exception
2021-09-28 14:11:18 +08:00
Zaiming Shi fec3c6574e perf(emqx_frame): skip empty tail 2021-09-28 14:11:18 +08:00
Zaiming Shi 9d0ef5de6b refactor(emqx_frame): log frame parse error with more context 2021-09-28 14:11:18 +08:00
tigercl 79685a77ba
Merge branch 'master' into fix/authn2 2021-09-28 09:27:08 +08:00
Zaiming (Stone) Shi 3df21a9e14
Merge pull request #5822 from Spycsh/fix-windows-compile
chore: fix Windows compilation process
2021-09-27 23:30:59 +02:00
Zaiming Shi 697a11ded0 fix(tls): drop unsupported ciphers
we use a hard-coded list of pre-selected ciphers as config
default value. some of them may not be supported by the
underlying openssl lib.

now moved the pre-selected ciphers to emqx_tls_lib:selected_ciphers
which performs a filtering before return.
2021-09-27 20:51:48 +02:00
Shawn e2721c144c feat(bridge): support http bridge 2021-09-27 22:01:18 +08:00
zhouzb 74c9a38e9f fix(psk): fix bugs and add test case 2021-09-27 21:42:32 +08:00
Zaiming Shi 5417eb328a fix(schema): no ciphers validator for quic listener 2021-09-27 13:53:54 +02:00
Zaiming Shi 58ffc4651f fix(config): use default value for tls versions
default value for ssl.versions is dynamically resolved based
on otp version and underlying openssl installation
2021-09-27 13:53:54 +02:00
Zaiming Shi d376c0f9fc refactor(schema): call emqx_tls_lib for default tls versions 2021-09-27 13:53:54 +02:00
Zaiming Shi e7e8b8c77b fix(schema): check tlsv1.3 availability 2021-09-27 13:53:54 +02:00
zhouzb f9aa345787 chore(psk): improve logs for psk 2021-09-27 15:32:56 +08:00
zhouzb 2262bf508e chore(authn): improve code 2021-09-27 14:50:22 +08:00
zhongwencool 5280f83651
Merge pull request #5784 from zhongwencool/delayed-api-schema
feat(delayed_api): support hocon schema
2021-09-27 13:45:17 +08:00
Shawn 69f3cce75d feat(rules): hook on bridges events and query bridges from rules 2021-09-26 23:00:08 +08:00
Shawn bd081913b5 refactor(rules): remove emqx_rule_actions 2021-09-26 23:00:08 +08: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 b78c914651 test(authn): cleanup the dirty configs 2021-09-26 15:19:55 +08:00
JianBo He f3c675b139 chore(deps): upgrade esockd to 5.8.3 2021-09-26 15:19:55 +08:00
lafirest 6e3ec6c9db fix(schema): fix authn/z's schema time unit 2021-09-26 14:41:46 +08:00
lafirest e31e175e47 fix(schema): fix some time unit in schema 2021-09-26 14:38:53 +08:00
zhouzb 096e85dc14 chore(authn): improve log and fix disabled authentication still working 2021-09-26 11:31:19 +08:00
zhouzb 6051ea92eb chore(authn): improve log 2021-09-24 17:24:04 +08:00
zhouzb e31840d943 fix(authn): add timeout option for mysql connector 2021-09-24 17:15:10 +08:00
zhouzb d391690505 chore(psk): fix bugs 2021-09-24 17:07:08 +08:00
zhouzb e9cd757432 chore(psk): delete old module and update configuration 2021-09-24 17:07:05 +08:00
zhouzb 7c61bc18cf feat(psk): support psk 2021-09-24 17:05:26 +08:00
zhongwencool 8c441673c2 feat(delayed_api): support hocon schema 2021-09-24 15:22:05 +08:00
JimMoen e737f18548 fix(mgmt_api): Friendly HTTP Status Code for Listeners. 2021-09-24 14:28:52 +08:00
Zaiming Shi 3027bc3a0c fix(schema): sll key and cert files are nullable 2021-09-23 16:57:16 +02:00
Zaiming Shi 4392357877 fix(schema): simplify ssl ciphers filed schema 2021-09-23 16:57:16 +02:00
Zaiming Shi 4f638b8242 fix(schema): upgrade to hocon 0.19.5
renamed no_conversion option to only_fill_defaults
2021-09-23 16:57:15 +02:00
Zaiming Shi 5bd67a49de chore(schema): reformat schema fields descriptions 2021-09-23 16:56:02 +02: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
zhouzb 4860049268 chore(authn): insert final newline 2021-09-23 10:11:54 +08:00
zhouzb 79026d5900 chore(authn): add supervisor for authn and fix checking errors 2021-09-23 10:11:50 +08:00
tigercl 2b9870992c
Merge pull request #5763 from tigercl/feat/clear-certs
feat(clear certs): clear certs when deleting instance
2021-09-23 09:43:56 +08:00
zhongwencool 81a795ffc9
Merge pull request #5728 from zhongwencool/swagger-hocon-spec
chore(swagger): swagger support hocon schema
2021-09-22 17:42:07 +08:00
zhongwencool 085d8e8efa chore(schema): restore space 2021-09-22 16:41:00 +08:00
zhongwencool dab5fbf285 feat(swagger): swagger support hocon schema 2021-09-21 21:41:16 +08:00
Zaiming Shi 2edd3879b8 feat(config): save override config in hocon pretty-print format 2021-09-19 14:33:43 +02:00
zhouzb bb4e5fdb4f chore(authn): fix dialyzer 2021-09-18 09:14:03 +08:00
zhouzb 69755ad3fb fix(authn): fix bug in authn 2021-09-18 09:14:03 +08:00
zhouzb b89973ce7c fix(authn): fix type error 2021-09-18 09:14:00 +08:00
zhouzb 35a4a05f03 feat(clear certs): clear certs when deleting instance 2021-09-18 09:11:41 +08:00
JimMoen 6edc9f4221 fix(emqx_types): spec refs `emqx_types.erl` instead directly. 2021-09-17 19:28:22 +08:00
JimMoen 9c95557bfc fix(emqx_types): type spec refs does not exist file. 2021-09-17 19:28:22 +08:00
JianBo He cfabb8549e build(deps): upgrade emqx_http_lib to 0.4.1 2021-09-17 18:13:57 +08:00
Zaiming (Stone) Shi ab39284ece
Merge pull request #5754 from zmstone/feat-make-possible-to-disable-client-initiated-renegotiation
feat(ssl): make possible to disable client-initiated ssl renegotiation
2021-09-17 08:22:34 +02:00
Zaiming (Stone) Shi 1af8148e30
Merge pull request #5760 from zmstone/minor-refactors
refactor(authn): minor refactors
2021-09-17 07:59:16 +02:00
tigercl 9000dab57a
Merge pull request #5761 from zmstone/fix-deps-pin-typerefl-from-main-proj
fix(deps): pin typerefl verison from root rebar.configs
2021-09-17 10:47:18 +08:00
Zaiming Shi 6cf1107f42 refactor(authn): ensure infinity timeout for gen_server call 2021-09-16 23:17:50 +02:00
Zaiming Shi 0877fb5569 refactor(authn): register providers in batch 2021-09-16 23:17:50 +02:00
Zaiming Shi 0b432a6a77 refactor(auth): rename functions from may_xx to maybe_xx 2021-09-16 23:17:50 +02:00
Zaiming Shi 13a03d8c1c feat(ssl): make possible to disable client-initiated ssl renegotiation 2021-09-16 23:17:22 +02:00
Zaiming Shi 16c652586b fix(deps): pin typerefl verison from root rebar.configs 2021-09-16 23:16:31 +02:00
zhouzb 43ce727632 chore(gen_id): using emqx_misc:gen_id/0, /1 2021-09-16 16:51:46 +08:00
JimMoen deac54c847 chore(for editor): Add comments for Emacs major mode. 2021-09-16 15:43:30 +08:00
JimMoen ba26a8511c fix(emqx_types): emqx_types:version() used but undefined. 2021-09-16 15:43:30 +08:00
k32 2a65347972
Merge pull request #5727 from k32/interleave-pqueue
feat(mqueue): Interleave messages with different priorities
2021-09-15 15:10:37 +02:00
k32 20d4652454 feat(mqueue): Interleave messages with different priorities 2021-09-15 11:58:54 +02:00
Shawn cb8dabe579 feat(bridges): add CRUD HTTP APIs for bridges 2021-09-15 17:46:42 +08:00
lafirest 75f528e08d
Merge pull request #5743 from lafirest/fix/connector
fix(emqx_schema): support get ip address by host name
2021-09-15 15:21:54 +08:00
lafirest 6c27c83dc3 fix(emqx_schema): support get ip address by host name 2021-09-15 14:59:19 +08:00
tigercl c4403e886d
Merge pull request #5732 from tigercl/feat/upload-certs
feat(upload certs): save certs to file
2021-09-15 10:58:31 +08:00
zhouzb 0fe300575e chore(authn): better function name 2021-09-15 09:59:35 +08:00
zhouzb f6d7739f01 fix(upload certs): fix external dependency 2021-09-14 16:09:36 +08:00
zhouzb 1a61640b15 feat(upload certs): serialize errors about saving cert 2021-09-14 15:07:57 +08:00
zhouzb ee178ccea9 feat(upload certs): support return cert content by http api 2021-09-14 14:59:13 +08:00
zhouzb 63d3a7b525 feat(upload certs): save certs to file 2021-09-14 13:38:09 +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
zhanghongtong 07a2ef4700 chore(release): update emqx release version 2021-09-10 19:34:45 +08:00
tigercl 78397329e8
Merge pull request #5684 from tigercl/chore/authn
chore(authn): provide easy-to-read hints for more errors
2021-09-10 19:04:11 +08:00
zhouzb a3b587c9f9 fix(authn): fix test case for authn 2021-09-10 18:13:11 +08:00
zhouzb 6b521acd6f fix(authn): fix type error for http headers 2021-09-10 17:31:16 +08:00
zhouzb b07e686350 fix(authn): fix bad type 2021-09-10 16:58:10 +08:00
zhouzb 5cea9a4edc chore(authn): add api spec 2021-09-10 15:55:37 +08:00
Zaiming Shi 01ce32094c refactor(bin/emax): delete cold_eval 2021-09-10 07:28:12 +02:00
Zaiming Shi 0b11ab2d59 refactor(schema): reorder config root fields
so more important configs are ordered before less important
2021-09-10 07:28:09 +02:00
Zaiming Shi 01166a8bfb feat(schema): generate document when building the release 2021-09-10 07:27:02 +02:00
Zaiming Shi 6b7d3bcf98 chore(hocon): upgrade to 0.17.0 2021-09-10 07:27:01 +02:00
Zaiming Shi 3a60f00643 refactor(emqx_gateway_schema): use hoconsc:map 2021-09-10 07:27:01 +02:00
Zaiming Shi 0039bfca6b refactor(emqx_machine_schema): use hoconsc:map type 2021-09-10 07:27:01 +02:00
Zaiming Shi bbd1c142de refactor(emqx_schema): use hoconsc:map type 2021-09-10 07:27:01 +02:00
Zaiming Shi a9cca84595 fix(emqx_schema): allow listener to be null 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
zhouzb c6e52b32fb chore(authn): improve code of moving authenticator 2021-09-09 09:32:18 +08:00
JimMoen b5d1ffa814
Merge pull request #5673 from JimMoen/stu-dev
Code refactor during studying.
2021-09-08 18:17:05 +08:00
DDDHuang e2d9d9bfcb
fix: banned api rfc time & login hidden error type (#5681) 2021-09-08 17:53:52 +08:00
zhouzb 7d312a630b chore(authn): provide easy-to-read hints for more errors 2021-09-08 16:35:54 +08:00
Jim Moen 4e5d781d21 fix: Words spelling fix. 2021-09-08 11:39:56 +08:00
Jim Moen bcebe1de24 refactor(emqx_cm_sup): Internal functions to create workers. 2021-09-08 11:39:56 +08:00
zhouzb 287d315ed5 fix(listener): updating authentication no longer causes the listener to restart 2021-09-08 11:24:59 +08:00
zhouzb 29cad91a47 fix(authn): fix superuser in mongodb authn 2021-09-08 10:58:00 +08:00
zhouzb 8531e9ce11 chore(authn): rename superuser to is_superuser 2021-09-08 09:53:39 +08:00