Commit Graph

2528 Commits

Author SHA1 Message Date
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
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
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
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
lafirest e196f8150d
Merge pull request #6329 from lafirest/fix/event
fix(emqx_gateway): fix the function_clause error when client disconne…
2021-11-30 16:52:11 +08:00
lafirest cfe2954a88 fix(emqx_gateway): fix the function_clause error when client disconnect after connection created 2021-11-30 12:25:06 +08:00
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 e6d7e59c18
Merge pull request #6278 from savonarola/test-authn-resources-mongo
chore(authn): add MongoDB backend tests
2021-11-29 22:27:52 +03:00
Ilya Averyanov 4941b4d1a0
Merge pull request #6316 from savonarola/test-authn-resources-jwt
chore(authn): add JWKS backend tests
2021-11-29 22:03:41 +03:00
Ilya Averyanov 0baec8e27d chore(authn): unify Mongo type parameter naming 2021-11-29 21:39:28 +03:00
Ilya Averyanov 390575eafb chore(authn): add MongoDB backend tests 2021-11-29 21:17:56 +03:00
Ilya Averyanov 4580c03ebc chore(authn): add SCRAM mechanism tests 2021-11-29 20:49:45 +03:00
JianBo He 581cb6ac5d
Merge pull request #6268 from HJianBo/reduce-case-logs
test(gw): reduce useless log print
2021-11-29 11:03:40 +08:00
Ilya Averyanov 726e25d6ae chore(authn): add JWKS backend tests 2021-11-26 18:40:21 +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
Ilya Averyanov 759b03a6ad
Merge pull request #6306 from savonarola/ct-output
chore(ct): remove verbose output during tests
2021-11-26 12:54:21 +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
tigercl 12d8ebcc15
Merge pull request #6303 from tigercl/fix/authn-jwt
fix(authn): fix jwt authn
2021-11-26 13:36:01 +08:00
zhouzb 349fd1608b style(authn): improve code formatting 2021-11-26 10:29:57 +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
Ilya Averyanov ea0fa24ce5 chore(ct): remove verbose output during tests 2021-11-25 18:30:50 +03:00
Ilya Averyanov e6c2600718 chore(authn): add HTTP backend tests 2021-11-25 15:09:13 +03:00
zhouzb ecd3c9f85c test(authn): add test cases for jwt authn 2021-11-25 19:03:11 +08:00
zhouzb 15654b5b28 fix(authn): add handling of invalid secret 2021-11-25 17:17:44 +08:00
zhouzb d88bfdfe14 fix(authn): verify claims type is wrong 2021-11-25 16:42:08 +08: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
Ilya Averyanov 3400a3b978
Merge pull request #6288 from savonarola/handle-authn-backends-own-validations
fix(authn): handle authn backends own validations
2021-11-24 15:18:11 +03:00
Ilya Averyanov ac3707e4a9 fix(authn): handle authn backends own validations 2021-11-24 14:05:46 +03:00
zhouzb fb6ab93f47 fix(dialyzer): fix redundant cases 2021-11-24 18:21:08 +08:00
zhouzb 261ca3d625 fix(connector): fix crash in health checking of mongo connection 2021-11-24 16:48:35 +08: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
JimMoen d7c7292321 fix(authz): placeholder regular replace 2021-11-24 11:10:30 +08:00