Commit Graph

2663 Commits

Author SHA1 Message Date
JianBo He
262fb13a71 chore(exhook): fix diaylzer warnings 2021-12-09 15:06:17 +08:00
JianBo He
20ba9d285f feat(exhook): expose headers for on_messages_publish hook 2021-12-09 15:06:17 +08:00
lafirest
f25c8cdf0f
Merge pull request #6410 from lafirest/fix/lw_cmd_record
fix(emqx_lwm2m): limit the max size of cmd record
2021-12-09 14:57:01 +08:00
JianBo He
e662628581 chore(gw): fix bad default value in query-string 2021-12-09 14:50:28 +08:00
lafirest
c9cbaeff95 fix(emqx_lwm2m): limit the max size of cmd record 2021-12-09 14:39:11 +08:00
JianBo He
028f1fa71c chore(gw): fix listener examples 2021-12-09 11:33:09 +08:00
Shawn
f7941cd2bb
Merge pull request #6387 from terry-xiaoyu/improve_connector_apis
Improve bridge and connector APIs
2021-12-09 10:54:55 +08:00
DDDHuang
7aa08a82d5
Merge pull request #6283 from DDDHuang/as_doc_example
fix: add auto subscription swagger example
2021-12-09 10:35:08 +08:00
Ilya Averyanov
1c9d867c5e chore(authz): add test for authz backend creation dry run 2021-12-08 21:38:10 +03:00
Ilya Averyanov
b7d227d2ef chore(authz): move file backend to a separate module 2021-12-08 21:38:10 +03:00
Ilya Averyanov
056558e445 chore(authz): encapsulate authz backend logic 2021-12-08 21:38:10 +03:00
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
k32
9fbc247e29 feat(system_monitor): Add system_monitor application 2021-12-08 16:34:10 +01:00
Shawn
d76f82d3d2 fix(bridges): add new option 'enable' for bridge configs 2021-12-08 18:16:38 +08:00
JianBo He
afb2cf19c2
Merge pull request #6297 from HJianBo/gw-improve-apis-2
Standardize HTTP-APIs return value and Status/Error Code
2021-12-08 18:02:13 +08:00
Tobias Lindahl
92f116afa4
Merge pull request #6393 from emqx/fix-takeover-race-on-enqueued-messages 2021-12-08 11:00:46 +01:00
JianBo He
7c261b5356 chore(gw): improve examples for _gateway_api 2021-12-08 17:18:39 +08:00
JianBo He
e48f10d2d6 chore(gw): ignore needless args 2021-12-08 11:33:11 +08:00
JianBo He
a937a3d4dc chore(gw): fix bad argument type 2021-12-08 11:13:00 +08:00
JianBo He
0eff5358ca chore(gw): add examples for gw&client api 2021-12-08 10:52:27 +08:00
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
Shawn
12fbcd8181 feat(connector): add num_of_bridges to the response of GET /connectors 2021-12-07 15:09:08 +08:00
Shawn
098d8eacb7 fix(metrics): update testcases for plugin_libs_metrics 2021-12-07 10:12:04 +08:00
Shawn
cc96880f18 fix(dialyzer): some dialyzer issue 2021-12-07 09:56:57 +08:00
Shawn
6903997b94 feat(connector): add new option 'mode' to mqtt connectors 2021-12-07 09:56:57 +08:00
Shawn
9b4fe87ed0 fix(bridges): update testcases for bridge APIs 2021-12-07 09:56:57 +08:00
Shawn
e1794fbce6 fix(connector): create different schema for POST,PUT,GET methods 2021-12-07 09:56:57 +08:00
Shawn
56d46c80eb refactor(rule): generate swagger from hocon schema for /bridges 2021-12-07 09:56:57 +08:00
Shawn
affe69afd6 fix(rules): update the test cases for rule APIs 2021-12-07 09:48:47 +08:00
Shawn
416b9f8d7c refactor(rule): generate swagger from hocon schema for /rules 2021-12-07 09:48:47 +08:00
Shawn
24bded99d5 refactor(metrics): rename speed to rate in emqx_plugin_libs_metrics 2021-12-07 09:47:53 +08:00
Shawn
e07fce791f feat(connector): add examples to the swagger doc 2021-12-07 09:47:53 +08: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
JianBo He
d735e2e755 chore: delete 500 error 2021-12-06 16:34:00 +08:00
JianBo He
f1dbeb4bda chore: fix bad result match 2021-12-06 16:34:00 +08:00
JianBo He
dab3e14686 fix(gw): fix static checking 2021-12-06 16:34:00 +08:00
JianBo He
7f04837ad2 fix(gw): fix elvis warnings 2021-12-06 16:34:00 +08:00
JianBo He
3f35604d16 refactor(gw): fix gateway http api schema 2021-12-06 16:34:00 +08:00
JianBo He
f3f3f12635 refactor: improve the _api_clieints implement 2021-12-06 16:33:59 +08:00
JianBo He
01c50992e9 refactor: improve gw api 2021-12-06 16:33:38 +08:00
JianBo He
169848c027 feat(gw): return the created/updated resource info 2021-12-06 16:32:46 +08:00
JianBo He
bc012d6554 chore(gw): change lwm2m&coap api path 2021-12-06 16:30:59 +08:00
Zaiming (Stone) Shi
68a7c096b0
Merge pull request #6362 from zmstone/emqx-config-put-raw-with-env-vars
fix: config put raw with env vars
2021-12-06 09:22:32 +01:00
zhongwencool
fbe66cb9f2
Merge pull request #6351 from zhongwencool/prometheus-accept-header
chore(HTTP): prometheus or json format by accept header
2021-12-06 16:12:54 +08:00
JianBo He
1ae1460e44
Merge pull request #6364 from HJianBo/stop_publish_clear_msg_for_5
Allow to stop publish clear message
2021-12-06 16:06:38 +08:00
Zaiming (Stone) Shi
a1ad6098b3 build: generate document to dashboard priv dir 2021-12-06 08:52:10 +01:00
Zaiming (Stone) Shi
96de7e6b30 docs: refine authn and auth config docs 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi
ed073f9966 test: fix emqx_rewrite_SUITE with new path info in schema check failure 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi
e774e976a7 fix: ensure atom connector is loaded when emqx_conf_schema is loaded 2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi
89614245f6 test: use macro for authentication root name 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
a723e41390 test: fix a flaky test which gets interfered by other test cases 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
a681079ba7 refactor: remove special env override from schema
EMQX_NODE_NAME and EMQX_NODE_COOKIE are translated into
EMQX_NODE__NAME and EMQX_NODE__COOKIE
2021-12-06 08:00:42 +01:00
Zaiming (Stone) Shi
d9a980c7e1 docs: fix config doc, avoid using <text> in doc body 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
tigercl
9e8b4ab237
Merge pull request #6298 from tigercl/feat/cluster-authn
feat(authn): support sync configuration in the cluster
2021-12-06 10:04:48 +08:00
Zaiming (Stone) Shi
867cc3c4ad test: ensure emqx_connector is loaded 2021-12-04 09:33:14 +01:00
Zaiming (Stone) Shi
5d3cb6ae1c refactor(authn): align authn config root name
authn configs are checked independently per-auth provider,
this was to make authn providers more plugable.

in order to make environment variable overrides work for authn,
we need to have a unified view of the config layout,
no matter from root level, or partially checking per-provider
config independently, i.e. we try to use the same config envelop.
2021-12-04 09:33:14 +01:00
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
k32
dfa45c909a fix(crash_dump): Fix hocon schema related to the erlang crash dump 2021-12-03 18:45:45 +01:00
k32
fd9f6bd140 fix(crash_dump): Replace crash dump directory with a file 2021-12-03 18:18:24 +01:00
k32
954179b959
Merge pull request #6370 from k32/perf
chore(mria): Bump version to 0.1.4
2021-12-03 17:39:21 +01:00
k32
2ceb660344 chore(mria): Bump version to 0.1.4 2021-12-03 17:13:12 +01:00
zhouzb
1dfc37cd18 test(authn): fix test cases 2021-12-03 15:55:34 +08:00
JianBo He
f645a4eada test(retainer): add test case for stopping publish clear msg 2021-12-03 14:42:27 +08:00
JianBo He
4b3b29873a feat(retainer): allow to stop publish clear msg 2021-12-03 14:41:42 +08:00
JimMoen
d4246ad2f6 fix(vm): add literal_alloc memory calculation 2021-12-03 14:41:33 +08:00
JimMoen
a7cd1ad30b fix(mgmt): node memory usage info 2021-12-03 14:41:33 +08:00
zhouzb
e1bcbd012c feat(authn): support sync configuration in the cluster 2021-12-03 14:14:40 +08:00
zhongwencool
85a6f0f1e8
Merge pull request #6350 from zhongwencool/emqx-conf
feat: support eqmx_ctl cluster_call command.
2021-12-03 11:27:21 +08:00
zhongwencool
858891dbf5 fix: rewrite ct badmatch 2021-12-03 09:54:44 +08:00
zhongwencool
f6c61189c4 chore(HTTP): prometheus or json format by accept header 2021-12-02 10:30:50 +08:00
JimMoen
a58493f7a4 test(authz): fix test suite for schema check and app start 2021-12-02 10:12:10 +08:00
JimMoen
effa3b8b90 style: make elvis happy 2021-12-02 10:12:10 +08:00
JimMoen
d7ec368884 fix(authz): fix mongo resources create 2021-12-02 10:12:10 +08:00
JimMoen
68af284570 fix(authz): http source create and update 2021-12-02 10:12:10 +08:00
zhongwencool
e7a7d64004 feat(conf): skip/fast_forward tnx_id via cluster_call cli 2021-12-02 09:30:27 +08:00
zhouzb
b983a18cdf fix(auth): replace query with cmd 2021-12-01 20:24:43 +08:00
zhongwencool
c1a7d7bede fix(conf): emqx_conf return nest error 2021-12-01 16:08:49 +08:00
zhongwencool
25c4f4aa4e
Merge pull request #6339 from zhongwencool/swagger-ct-test
chore(swagger): add test for sub fields
2021-12-01 14:12:14 +08:00
tigercl
e888e1ef8d
Merge pull request #6338 from tigercl/fix/superuser
fix(authn): fix superuser when missing is_superuser_field
2021-12-01 14:00:56 +08:00
zhongwencool
1f6e2e7397 chore: add test for sub fields 2021-12-01 12:01:44 +08:00
zhouzb
6b8997cbda fix(authn): fix superuser when missing is_superuser_field 2021-12-01 09:23:36 +08:00
Zaiming (Stone) Shi
d2fa0a71f4 refactor: give psk auth a better namespace 2021-12-01 00:33:20 +01:00
k32
a92970a904 feat(mria): Add RPC-related configuration to the schema 2021-11-30 21:59:59 +01: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