Commit Graph

482 Commits

Author SHA1 Message Date
firest 467a2bc9b1 test(rbac): add test cases for RBAC in REST API 2023-10-17 16:23:38 +08:00
firest 26ec860d96 feat(backup): add migration mechanism when import backup data 2023-10-17 16:23:32 +08:00
firest e095de7367 feat(api_key): add RBAC feature for the API key 2023-10-16 14:10:01 +08:00
zhongwencool 1021088f5f fix: 500 error response when downloading non-existent trace files 2023-10-12 15:23:23 +08:00
Ilya Averyanov c2c56ba481 chore(auth): update tests 2023-10-05 13:41:50 +03:00
Ilya Averyanov 1eb75b43c4 chore(auth): split emqx_authn and emqx_authz apps 2023-10-05 13:41:50 +03:00
Zaiming (Stone) Shi ce5bd0a3ce Merge remote-tracking branch 'origin/release-53' into 0928-sync-release-53 2023-09-29 11:36:32 +02:00
Zaiming (Stone) Shi 922d5a9a83 fix(ldap): do not allow multi-matches to proceed
if ldap query returns more than on match
we should reject the auth request instead of picking
the first one
2023-09-28 21:20:50 +02:00
Zaiming (Stone) Shi 1a13b2ac56 Merge remote-tracking branch 'origin/release-53' into 0928-sync-release-53 2023-09-28 13:53:03 +02:00
Ilya Averyanov 14983ec14a chore(hooks): validate hookpoints and document hook callbacks
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-09-26 14:27:42 +03:00
Zaiming (Stone) Shi d31bfc70fb
Merge pull request #11659 from zhongwencool/fix-listener-ssl-create-500
fix: create ssl listener return 500 crash
2023-09-26 11:38:07 +02:00
zhongwencool 0eed01abee fix: create ssl listener return 500 crash 2023-09-22 17:34:19 +08:00
firest 9e55ae240a feat(sso): add `role` into the result of login endpoints 2023-09-22 13:48:07 +08:00
firest 45ccc66474 fix(dashbaord): fix test cases to support RBAC 2023-09-15 15:49:37 +08:00
Zaiming (Stone) Shi 7c2f87fabe test: merge broker and router boot modules 2023-09-06 21:36:16 +02:00
Zaiming (Stone) Shi e794143ae1 Merge remote-tracking branch 'origin/release-52' into 0906-sync-release-52-to-master 2023-09-06 09:08:22 +02:00
Thales Macedo Garitezi 2cfe5ba057 fix(plugins_api): fix response types and test 2023-09-04 14:37:25 -03:00
Thales Macedo Garitezi 02c3d6a0a7 fix(data_import): rm duplicate import call and fix test 2023-09-04 14:19:59 -03:00
Thales Macedo Garitezi 4dfbc859f9 fix(plugins): update plugin order on whole cluster
Fixes https://emqx.atlassian.net/browse/EMQX-10879
2023-08-30 16:39:52 -03:00
Andrew Mayorov 2da604dfa4
test(mgmt): simplify flaky `t_verify_imported_mnesia_tab_on_cluster`
And also rest of the test setup in the suite.
2023-08-30 20:24:18 +04:00
zhongwencool 4245a4d8c6 fix: authz clean-cache clientid always return not_found 2023-08-29 08:17:47 +08:00
SergeTupchiy c04f770118
Merge pull request #11506 from SergeTupchiy/EMQX-10274-do-not-download-empty-trace-log
fix(emqx_trace): don't download empty trace log file
2023-08-28 22:17:00 +03:00
Serge Tupchii 0072749143 fix(emqx_trace): don't download empty trace log file
Closes: EMQX-10274
2023-08-28 19:25:55 +03:00
Thales Macedo Garitezi f007b44426 fix(data_import): rm duplicate import call and fix test 2023-08-22 13:29:15 -03:00
firest b08102269a refactor(calendar): refactor datetime-related code and remove redundant 2023-08-16 10:55:46 +08:00
firest 2fc0468e0c feat(banned): add a new API used to clear all banned data 2023-08-11 17:25:49 +08:00
zhongwencool d5fe891961 fix: don't be kill when send large payload when log is debug 2023-08-10 09:22:30 +08:00
Ilya Averyanov deaac9bd73 fix(authz): correctly identify qos of subscribe actions 2023-07-25 15:20:52 +03:00
zhongwencool 0524c3b3b1 test: configs SUITE crash 2023-07-19 11:05:14 +08:00
JianBo He 439eb4d029 test: cover the node params for `get /configs` endpoint 2023-07-19 11:05:14 +08:00
zhongwencool 402f75592e chore: move rpc call from emqx_management_proto to emqx_conf_proto 2023-07-19 11:05:14 +08:00
zhongwencool 59ed65787f fix: get_config return target node's node conf 2023-07-19 11:05:14 +08:00
Kjell Winblad f28510b3ad refactor: HTTP connector into emqx_bridge_http app 2023-07-12 14:46:43 +02:00
Serge Tupchii 19de10be7c feat(emqx_management): add /cluster/topology HTTP API endpoint
The endpoint shows Mria RLOG cluster topology info:
connections between core and replicant nodes.

Closes: EMQX-10392
2023-07-11 16:25:36 +03:00
Stefan Strigler 93a9772743
Merge pull request #11211 from sstrigler/EMQX-9963-refactor-all-http-ap-is-to-respond-404-on-the-deletion-of-the-resource-is-non-exist
consistently return 404 if resource not found
2023-07-10 16:25:31 +02:00
Ilya Averyanov 12e237c36d
Merge pull request #11132 from savonarola/0531-authz-qos-retain
feat(authz): use extensible map format for actions in authz rules
2023-07-10 15:32:02 +03:00
zhongwencool 86d3984025 fix: mgmt api SUITE failed 2023-07-10 10:34:36 +08:00
Stefan Strigler 80e4ffff75 fix(emqx_management): return 404 if plugin does not exist 2023-07-08 14:43:43 +02:00
Stefan Strigler 3fd28f9e18 fix(emqx_management): return 404 for unknown listener id 2023-07-08 14:43:43 +02:00
Ilya Averyanov 7de26a1776 feat(authz): use extensible map format for actions in authz rules
* support authorization on retain, qos fields
* refactored authz tests heavily
2023-07-07 19:40:34 +03:00
zhongwencool b5cc8fb3c3 fix: start_after_created's default value 2023-07-07 16:39:26 +08:00
JianBo He 71d1f80530 test(api): cover the accept logic for `/configs` API 2023-07-06 11:30:38 +08:00
Andrew Mayorov fe0b8cfbaf
test(conf): respect `init_config_load_done` in emqx_conf itself
This should make task of configuring various applications (emqx_conf
/ emqx) during testsuites setup much simpler.
2023-07-04 13:20:02 +02:00
Andrew Mayorov f76f3b77d7
test: add tooling to make testruns more isolated and predictable
Also showcase their usage in some of the existing testsuites.
2023-07-04 12:53:39 +02:00
zhongwencool d509c47344 feat: add conf load api 2023-07-04 14:17:11 +08:00
zhongwencool 82ea9e5a04 test: dashbaord api ct failed 2023-06-29 10:49:39 +08:00
zhongwencool 803cd6c812
Merge pull request #11082 from emqx/release-51
sync release-51 to master
2023-06-19 15:12:37 +08:00
Andrew Mayorov 13d9f5c3e7
Merge pull request #11053 from fix/EMQX-10231/cluster-view
fix(ft-fs): use `emqx:running_nodes()` as default cluster view
2023-06-17 00:54:24 +02:00
zhongwencool fc1d78134a test: replace 'to' with 'path' 2023-06-15 19:13:51 +08:00
Andrew Mayorov acd6e5635b
fix(ct): adapt cluster setup helper to replicant nodes
Before this change, trying to start cluster consisting of cores +
replicants resulted in error joining replicant node to the cluster.
2023-06-15 00:50:15 +03:00
zhongwencool 267053cc35
Merge pull request #11045 from zhongwencool/hide-zones-authn-in-listeners
feat: hide zone/authn in listeners and remove listeners's authn api
2023-06-14 20:32:27 +08:00
zhongwencool 7668753f50 feat: hide zone/authn in listeners and remove /listeners/:id/authentication api 2023-06-14 15:17:12 +08:00
zhongwencool 091c49277f fix: api_listener crash when setting max_connnections as string 2023-06-14 11:26:41 +08:00
Thales Macedo Garitezi 5ef7102cba fix(listener_mgmt_api): use union member selector fn for better error messages (r5.1)
Fixes https://emqx.atlassian.net/browse/EMQX-10247
2023-06-12 16:48:13 -03:00
Serge Tupchii e4d09d4ad4 feat: implement configuration and user data export/import CLI
Closes: EMQX-9203
2023-06-09 14:11:47 +03:00
Zaiming (Stone) Shi 641166a67a
Merge pull request #10971 from zmstone/0607-merge-master-to-release-51
0607 merge master to release 51
2023-06-08 09:22:21 +02:00
JianBo He fcef456174 feat: add `live_connections` field for some HTTP APIs
i.e:
- `/monitor_current`, `/monitor_current/nodes/{node}`
- `/monitor/nodes/{node}`, `/monitor`
- `/node/{node}`, `/nodes`
2023-06-08 11:24:06 +08:00
Zaiming (Stone) Shi 641aca00d8
Merge pull request #10954 from zhongwencool/flapping-detect-conf
feat: don't hide enable in flapping detect conf
2023-06-07 23:04:56 +02:00
Zaiming (Stone) Shi ccd2589ff2 Merge remote-tracking branch 'origin/master' into release-51 2023-06-07 21:43:29 +02:00
JimMoen 65483e972e
refactor: use unified table define 2023-06-07 22:51:44 +08:00
zhongwencool 535870386a fix: zones update api failed 2023-06-07 21:54:32 +08:00
Andrew Mayorov 99ea9b86c2
feat(tlslib): add separate managed certfiles GC process
Which periodically inpects managed certificates directory and tries
to collect "orphans" here, in other words files that aren't
referenced anywhere in the current emqx config.
2023-06-05 22:41:07 +03:00
Zaiming (Stone) Shi 28c564d15b Merge remote-tracking branch 'origin/master' into release-51 2023-06-02 16:25:48 +02:00
zhongwencool 8d8efe449e
Merge pull request #10896 from zhongwencool/api-keys-hot-conf-update
feat: api_key conf support hot conf
2023-06-02 15:58:45 +08:00
William Yang 8ee78ad6b4 test: fix emqx_mgmt_api_configs_SUITE 2023-06-01 14:52:33 +02:00
Andrew Mayorov aa98740280
Merge pull request #10903 from fix/ci-flaky-dashboard
test(dashboard): fix inter-suite test flakiness
2023-05-31 20:28:39 +03:00
Andrew Mayorov f90ce9bbfe
test(dashboard): fix inter-suite test flakiness 2023-05-31 19:09:37 +03:00
Zhongwen Deng 5729ea0426 feat: api_key conf support hot conf 2023-05-31 18:23:58 +08:00
JianBo He fc806c4acd test: fix failed tests 2023-05-30 20:15:49 +08:00
JianBo He 1e7872c319 feat: support kickout clients in batch 2023-05-30 19:58:40 +08:00
Zhongwen Deng df4a0afdf5 fix: zones api default value 2023-05-26 18:59:38 +08:00
JimMoen 0788f2f197
fix: `emqx_ctl traces ...` command args
* use second time as trace `start_at` and `end_at`
* default trace time duration 30min to same as api created
* prevent format line broken
2023-05-26 09:48:56 +08:00
JimMoen 28015597ee
Merge remote-tracking branch 'emqx/release-50' into merge-release-50 2023-05-24 19:34:12 +08:00
JimMoen 1ac140312d
test: lookup topic with percent encoded topic name 2023-05-24 17:39:25 +08:00
Andrew Mayorov c440cd77b0
fix(test): prefer `emqx_connector_http:join_paths/2` in api tests
It is more consistent with what HTTP servers are expecting, plus
not OS-specific as `filename:join/2`.
2023-05-19 15:37:01 +03:00
Zhongwen Deng e26ce5816e feat: hide keepalive_backoff, introduce keepalive_multiplier 2023-05-17 21:25:10 +08:00
Zhongwen Deng 1d609dacf7 test: update api_config test 2023-05-10 09:21:42 +08:00
Zhongwen Deng c901f3a9d4 test: nodes's log test failed 2023-05-09 11:56:24 +08:00
Zaiming (Stone) Shi d5f5f35787 Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master 2023-05-02 18:08:04 +02:00
Zaiming (Stone) Shi 2e9dca280c refactor(listener-schema): use a tombstone for deleted listeners 2023-04-29 22:10:19 +02:00
Zaiming (Stone) Shi c13a972bf0 test(emqx_management): add test group for listener API 2023-04-29 22:10:19 +02:00
Zaiming (Stone) Shi b3c0abf494 test(emqx_management): fix listeners api test cases 2023-04-29 22:10:19 +02:00
Zaiming (Stone) Shi ed7a8659d2 feat: add a json format support for the /status API 2023-04-26 14:41:33 +02:00
ieQu1 282bfee8ff feat(emqx): Add an API that returns the list of running nodes 2023-04-18 09:22:58 +02:00
zhongwencool 69d1a35c90
Merge pull request #10156 from zhongwencool/conf-refactor
feat: configuration priority ENV > emqx.conf > API
2023-04-16 13:45:35 +08:00
Zhongwen Deng 8461551f51 test: rename module from emqx_map_lib to emqx_utils_maps 2023-04-15 06:56:33 +08:00
zhongwencool a00daa4d97
Merge branch 'master' into deprecated-stats-conf 2023-04-15 06:47:28 +08:00
zhongwencool 494ffe86ad
Merge branch 'master' into conf-refactor 2023-04-15 06:40:38 +08:00
Zhongwen Deng 8facd130f6 chore: update cluster_hocon_file/0 function 2023-04-14 23:19:38 +08:00
Zhongwen Deng 7934a1cea1 feat: hide overload_protection,conn_congestion,flapping_detect 2023-04-14 21:29:27 +08:00
Zhongwen Deng 180f571765 feat: configuration priority ENV > emqx.conf > API 2023-04-14 20:51:58 +08:00
Stefan Strigler 4f80690162 fix: byebye jsx 2023-04-14 13:41:34 +02:00
Stefan Strigler 062ce5f819 refactor: rename emqx_map_lib to emqx_utils_maps 2023-04-14 13:41:34 +02:00
Stefan Strigler f8e9e54393 refactor: move emqx_json to emqx_utils_json 2023-04-14 13:31:27 +02:00
Zhongwen Deng f161399bcc feat: deprecated trace config 2023-04-12 17:07:45 +08:00
Thales Macedo Garitezi 916ce99fd5 fix: handle subscription list api when there are `emqx:subscribe` subscriptions 2023-03-29 14:56:40 -03:00
Stefan Strigler 64a1d84a44 fix: create consistent interface 'with_node' for API access 2023-03-27 12:14:48 +02:00
Serge Tupchii b02d0088ea fix(emqx_management): resolve plugin name clashes
Allow installing a plugin if its name matches the beginning of another (already installed) plugin name.
For example: if plugin "emqx_plugin_template_a" is installed, it must not block installing plugin "emqx_plugin_template".

Closes: #10213, EMQX-9290
2023-03-24 16:11:31 +02:00
Thales Macedo Garitezi 52263a0448 feat: add ocsp stapling and crl support to mqtt ssl listener 2023-03-14 16:08:47 -03:00
ieQu1 e3595f2e79 chore(mria): Bump version to 0.4.0 2023-03-11 00:37:25 +01:00
Stefan Strigler 0cfa5e2ce1
Merge pull request #9994 from sstrigler/EMQX-3688-emqx-mgmt
emqx mgmt code coverage and cleanup
2023-02-22 14:30:36 +01:00
Stefan Strigler 28382ec26b test: add test for pubsub api 2023-02-21 13:11:34 +01:00
Stefan Strigler e78c2c2869 fix: return 404 in case node is not found 2023-02-21 10:20:34 +01:00
Stefan Strigler 9ecf154a71 fix: limit bytes param to signed 32bit int
We still need to check if chunk we're reading fits in memory
2023-02-21 10:20:14 +01:00
Stefan Strigler 0482f43802 test: add test for banned and alarms 2023-02-21 09:41:00 +01:00
Stefan Strigler 0d357f7038 refactor: cleanup list subscriptions 2023-02-21 09:41:00 +01:00
Stefan Strigler 0d2ce85776 fix: return 'not found' for subscriptions of unknown client 2023-02-21 09:41:00 +01:00
Stefan Strigler f3ced5d5eb refactor: kickout_client doesn't need a format fun 2023-02-21 09:41:00 +01:00
Stefan Strigler a6d88c3caa test: more tests 2023-02-21 09:41:00 +01:00
Stefan Strigler fc33bce40d test(emqx_mgmt): test list_nodes/0 2023-02-21 09:41:00 +01:00
Stefan Strigler f9895a33b6 refactor: rename max_row_limit to default_row_limit 2023-02-21 09:41:00 +01:00
Stefan Strigler 293df88f36
Merge pull request #9965 from sstrigler/EMQX-3689-emqx-mgmt-api
EMQX 3689 emqx mgmt api
2023-02-15 15:13:17 +01:00
Stefan Strigler 21b8ff6d14 test: use unit test to test paginate 2023-02-15 13:31:48 +01:00
Stefan Strigler 4417ea9db7 style: missing comma 2023-02-14 09:13:45 +01:00
JianBo He 36b1c3eb5b fix(api): fix bad return error message if client id is not found 2023-02-14 15:30:55 +08:00
Stefan Strigler 8b47acd58d test: page overflow and bad rpc in cluster 2023-02-13 17:46:26 +01:00
Stefan Strigler 8d34a72ab6 test: add test for clustered badrpc 2023-02-13 17:14:15 +01:00
Stefan Strigler 89630a8a74 test: query bad node 2023-02-13 16:09:04 +01:00
Stefan Strigler 9e954585ae test: add node query tests and some more 2023-02-13 15:45:37 +01:00
Stefan Strigler 847f899fa0 test: ensure bad plugin upload gets deleted 2023-02-06 09:46:16 +01:00
Stefan Strigler e135f8654c test: enable basic plugins API tests 2023-02-06 09:46:16 +01:00
Zaiming (Stone) Shi 3d6756cbe8 test: fix addrinuse errors in listeners API test SUITE 2023-02-02 16:37:56 +01:00
Zhongwen Deng c2bdb9faa7 test: multiple_nodes case failed 2023-02-01 10:07:22 +08:00
Zhongwen Deng b6e6315b50 feat: change loads from string to float 2023-02-01 10:07:22 +08:00
Zhongwen Deng 5783127c30 test: cpu_sup:load mock test 2023-02-01 10:07:22 +08:00
Erik Timan 5b3a77e3c7 test(emqx_management): fix flaky route handling in get topic test
This reworks a test case to use a second slave node. This ensures that
an added route is permanently in the routing table. The old version
reverted the routing table quickly since the node name given wasn't a
real node.
2023-01-31 08:28:55 +01:00
Erik Timan 33e011aff5 fix(emqx_management): handle multiple routes in topics/{topic} API
The topics/{topic} API endpoint would return 500 - Internal Error if a
topic had multiple routes. This is now fixed by returning a list of
routes.
2023-01-31 08:27:33 +01:00
Erik Timan 30a5cfaa83 fix(emqx_management): remove trace files after zip download
We only deleted the resulting zip after a trace file download, not the
actual trace files. This adds a deletion of the uncompressed trace files
as well. It also creates unique directories when collecting trace files
so that concurrent downloads doesn't overwrite files in transit.
2023-01-17 14:24:10 +01:00
Erik Timan 94296258b4 test(emqx_management): refactor test suite to use common test utils for API calls 2023-01-17 14:24:10 +01:00
Stefan Strigler bc69a00329 test: get plugin template as artifact 2023-01-17 09:50:17 +01:00
Zaiming (Stone) Shi a77d33b97d
Merge pull request #9751 from lafirest/fix/un_cleared_ca
fix that obsoleted cert file will not be deleted after the listener is updated/deleted
2023-01-13 14:38:55 +01:00
firest 0a965879dd fix: fix that obsoleted cert file will not be deleted after the listener is updated/deleted 2023-01-13 18:42:27 +08:00
Zhongwen Deng eacdaffe3c fix: default max_connections in raw config should be binary not atom 2023-01-13 16:01:57 +08:00
firest c5f557e315 fix: disable basic auth for HTTP API 2023-01-12 21:35:49 +08:00
Andrew Mayorov e07aa2086b
fix(api): augment paged search responses with `hasnext` flag
This flag indicates whether there are more results available on the
next pages. It is needed in cases when the total number of search
results is not known in advance.

Also, in such cases there's no `count` field in responses anymore
because responding with `0` was confusing for clients: it's not possible
to differentiate between "there are no results" and "we don't know how
much".

Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-01-12 10:57:30 +03:00
Zhongwen Deng 5d4a1933a2 chore: add more test for api_key 2023-01-10 19:04:00 +08:00
Zhongwen Deng 142826c4c3 chore: limit the maximum number of api keys to 100 2023-01-10 19:03:39 +08:00
JianBo He 65729cd640 fix(clients): fix expiry_interval unit error
It should be second not millisecond
2023-01-06 10:31:27 +08:00
Zaiming (Stone) Shi dbc10c2eed chore: update copyright year 2023 2023-01-02 09:22:27 +01:00
firest af3f0c9bb0 fix(banned): ensure the default timeout of `banned` is large enough 2022-12-26 10:17:31 +08:00
Andrew Mayorov 41a4e41d0c
fix(ct): prevent testcase flapping
Testcase `t_log_file` was flapping when run happened to pass through
boundary of a second. Archive files' `ctime`s could differ between
consecutive archive downloads.
2022-12-16 13:45:06 +03:00
Zaiming (Stone) Shi 42c58e2a91 Merge remote-tracking branch 'origin/release-50' into 1214-sync-master-upstreams 2022-12-14 15:29:13 +01:00
Erik Timan 0242d5f360 test: rename return_body to return_all in emqx_mgmt api test util 2022-12-12 13:29:11 +01:00
Erik Timan 8009f0a3a8 test: api returns for lwm2m client posts
Add test coverage for HTTP 204 returns from lwm2m client API
posts. This includes a small refactoring of the request functionality
in emqx_mgmt_api_test_util.
2022-12-12 13:28:24 +01:00
Stefan Strigler 6b22a074f0 refactor: move `/mqtt/sys_topics` to generic `/configs/sys_topics` 2022-12-12 13:25:42 +01:00
Stefan Strigler 2a27d2e781 fix: return 409 in case of duplicate 2022-12-09 13:33:34 +01:00
Stefan Strigler 1f7c02ecf5 fix: return 400 if node in query doesn't look like a known node 2022-12-09 12:53:02 +01:00
Zaiming (Stone) Shi 7ee53e5319 Merge tag 'v5.0.11' into dev/ee5.0 2022-11-28 21:02:21 +01:00
JianBo He 6d9e1e0d7a test(mgmt): cover emqx_mgmt_api:cluster_query 2022-11-24 20:14:33 +01:00
JianBo He b9c5a5f822 fix(delayed): return correct node name 2022-11-24 20:14:33 +01:00
JianBo He 8a0c468b01 test: refine tests for lots of List HTTP API 2022-11-24 20:14:33 +01:00
Stefan Strigler afcb33aa20 feat: support publish with properties 2022-11-23 17:04:35 +01:00
Stefan Strigler acef85e11a test: initialize clients in test setup, teardown after test 2022-11-23 17:03:43 +01:00
Zhongwen Deng 65820eb943 fix: can't get default raw config 2022-11-18 15:07:23 +08:00
Zaiming (Stone) Shi 09455edae8 Merge tag 'v5.0.10' into dev/ee5.0 2022-11-16 16:20:30 +01:00
Stefan Strigler 1fb441dd9e test: add tests for 'configs?node' 2022-11-07 14:12:21 +01:00
Stefan Strigler 104b1a63d9 test: pass down Opts in request_api/X 2022-11-07 14:12:21 +01:00
Thales Macedo Garitezi 12addc2118
Merge pull request #9230 from thalesmg/status-endpoint-alias-50
feat(mgmt): add alias endpoint for health check
2022-10-31 10:22:17 -03:00
Zhongwen Deng 18235a7125 chore: update emqx_managment bpapi.versions 2022-10-28 09:16:05 +08:00
Zhongwen Deng ea95f792e0 refactor: multicall node_info to improve /node speed 2022-10-28 09:14:33 +08:00
Thales Macedo Garitezi d0ca79fc9e feat(mgmt): add alias endpoint for health check
This allow use to reference `/status` in the API documentation without
manually editing the `swagger.json` file.
2022-10-27 13:20:04 -03:00
Thales Macedo Garitezi 0eca531e64 feat: add `retry-after` headers to unavailable response 2022-10-25 15:01:05 -03:00
Thales Macedo Garitezi 997a262c96 fix(mgmt_api): return 503 when emqx is not running in `/status` (5.0) 2022-10-24 14:53:41 -03:00
Zaiming (Stone) Shi 508c0e84d0 Merge branch 'release-v50' into master 2022-10-24 11:46:31 +02:00
Zaiming (Stone) Shi d1332b72e7 feat(api/publish): return detailed publish results
Prior to this change, the publish API returns 200 in most of
the cases.
This change provides more insights to the publish result.

For single message publish endpoint (`publish/`):

HTTP error codes are:

200: Everything is OK
202: No subscriber for the topic
400: When mesage is invalid message.
     e.g. bad topic name or QoS out of range.
503: Failed to dispatch the message. e.g. during EMQX restart.

The response body is a JSON object with two fields
`message_id`, and `publish_result`.
The `message_id` is a globally unique ID for tracing.
`publish_result` is `"OK"` when the message is delivered
to at least one subscriber.
Otherwise `"no_subscriber"`.
`publish_result` may also be some other informative
message to hint the failure result, the content of which
may change in the future.

For `publish/bulk` endpoint:

200: When all message in the bulk are published OK
202: If at least one message in the bulk had `"no_subscriber"` result
400: When mesage is invalid message. e.g. bad topic name or
     QoS out of range.
503: When there is at least one message failed at dispatch.

The reply body is a list of JSON objects having the same layout
as for hte `publish` endpoint.
2022-10-20 20:03:27 +02:00
Zhongwen Deng 4d9cae0387 feat: get trace file's detail via /trace/:name/log_detail 2022-10-17 09:43:15 +08:00
Ivan Dyachkov 5a8cab46a9 test: update publish api test suite 2022-10-14 10:17:22 +02:00
Shawn 4135910b42 chore: merge master into dev/ee5.0 2022-09-26 09:52:33 +08:00
Zhongwen Deng 0241185225 chore: Add test coverage for listeners API 2022-09-19 18:25:25 +08:00
Zaiming (Stone) Shi 4534966e36 Merge remote-tracking branch 'origin/master' into dev/ee5.0 2022-09-13 12:16:54 +02:00
firest 47b35f0c6a fix(api): add listener create API from `POST /listeners/{type:name}` to `POST /listeners`
Old:
    API: POST /listeners/{type:demo}
    Body: {"type" : "tcp", "id" : "tcp:demo"}
New:
    API: POST /listeners
    Body: {"type" : "tcp", "name" : "demo"}
2022-09-08 20:28:40 +08:00
Zhongwen Deng 499da1ebe0 chore: add emqx_release:edition_longstr() 2022-09-06 15:46:18 +08:00
Zhongwen Deng 57cc880977 chore: change community to opensource 2022-09-05 14:27:47 +08:00
Zhongwen Deng d447659365 feat: add edition info to /nodes api 2022-09-05 11:29:49 +08:00
firest dee92bb8b8 fix(mgmt): fix status api test case error 2022-08-09 11:22:48 +08:00
Zhongwen Deng 116c664df1 feat: add sysmon config handler to reload conf 2022-07-21 12:33:56 +08:00
Zhongwen Deng 634a75341a fix: remove nonexistent listener should always return ok 2022-06-16 11:33:24 +08:00
Zhongwen Deng c6271de174 fix: restart started listener when listener connection options update 2022-06-16 11:26:54 +08:00
Zhongwen Deng 5e92ef54c5 fix: ct failed 2022-06-07 20:13:57 +08:00
Zhongwen Deng 6c9b959651 fix: ct failed 2022-05-31 19:20:27 +08:00
Zhongwen Deng 7c65d7159b feat: add node query_string to download logs for specific nodes 2022-05-11 23:19:06 +08:00
zhongwencool 0924c7dc13
Merge pull request #7902 from DDDHuang/ddd_fix
fix: node info, log path only path
2022-05-10 21:47:26 +08:00
DDDHuang 76102714aa fix: node info, log path only path 2022-05-10 18:00:09 +08:00
Zhongwen Deng e6e66b032e fix: mgmt_cli_SUITE ct failed 2022-05-10 09:38:48 +08:00
Zhongwen Deng 2371604589 fix: infinity means never expire 2022-05-09 14:43:37 +08:00
JianBo He 8db8598622 fix(mgmt): fix test case crash 2022-05-07 10:16:58 +08:00
JianBo He 2ef118ce4c chore(fmt): format management 2022-05-07 10:16:58 +08:00
JianBo He ae2c150384
Merge pull request #7593 from EMQ-YangM/improve_mgmt_cli_cover
draft: improve emqx_mgmt_cli test coverage
2022-05-06 09:10:10 +08:00
Zhongwen Deng 352984efe7 fix: dashboard https without deafult pem/keyfile 2022-04-29 11:45:22 +08:00
Zhongwen Deng 2c95fba4df fix: api_listener min TLS ct fail 2022-04-28 10:11:38 +08:00
firest d9c3cf5c97 fix(mgmt): add subscribe options in client subscribe API 2022-04-27 12:52:52 +08:00
firest 8d01e8a697 fix(mgmt): add subscribe options into the result of the client subscriptions API 2022-04-27 12:52:52 +08:00
firest 6b84016259 fix(mgmt): add subscribe options into the result of the /subscriptions API 2022-04-27 12:52:52 +08:00
Zhongwen Deng 38215f73fc fix: rate limiter schema check crash and return 500 2022-04-24 11:59:08 +08:00
Zhongwen Deng 2a25767112 fix: trace ct failed 2022-04-24 11:12:40 +08:00
Zhongwen Deng 45bb7b3610 test: add more test for ws/wss/ssl listeners 2022-04-20 10:05:52 +08:00
Zhongwen Deng 17ef987d25 fix: add proxy_protocol_timeout/access_rules default value 2022-04-20 09:54:09 +08:00
Zhongwen Deng c70462f287 chore: reformat mgmt 2022-04-20 02:52:31 +08:00
JianBo He ba24f0309d
Merge branch 'master' into hot-confs-sys-topics-limiter 2022-04-19 17:38:49 +08:00
Zhongwen Deng aa7807baeb chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00