Commit Graph

202 Commits

Author SHA1 Message Date
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