Commit Graph

557 Commits

Author SHA1 Message Date
JianBo He 0c1412315c chore(bpapi): ignore emqx_mgmt_api:collect_total_from_tail_nodes/3 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
JianBo He 1fe9c105aa refactor(mgmt): smplify the node_query/cluster_query implementation 2022-11-24 20:14:33 +01:00
JianBo He 08121e7df6 fix(mgmt): optimize the speed of query tail pages
In the previous, when you query the tail pages, all the front of rows
will be queried out and formatted. It greatly hurts the speed of query.

Currently, we only format the final result rows. i.e, the query for the
last page of data will be 10x faster.
2022-11-24 20:14:33 +01:00
Zaiming (Stone) Shi c940b901f5 chore: fix app versions 2022-11-16 16:26:43 +01:00
Zaiming (Stone) Shi 09455edae8 Merge tag 'v5.0.10' into dev/ee5.0 2022-11-16 16:20:30 +01:00
firest c079760b0a fix(JWT): make the `exp` to be optional claim 2022-11-15 15:41:01 +08:00
Stefan Strigler 12ba831246 fix(emqx_authn_api): return 404 for status of unknown authenticator
This also makes sure we call the same code everytime we access an authenticator.
Moreover we return a 500 in case a remote call fails due to technical issues.
2022-11-11 13:34:44 +01:00
Zaiming (Stone) Shi a314950be9 docs: fix zh punctuations 2022-10-26 16:19:38 +02:00
Zaiming (Stone) Shi e3240b52a8 chore: bump app versions 2022-10-24 11:48:17 +02:00
zhongwencool bfc780f95b
Merge branch 'master' into authn-config-check 2022-10-14 16:36:50 +08:00
JianBo He 93d3fec73f chore(i18n): correct tags name 2022-09-30 23:14:19 +08:00
JianBo He a84c6f938c chore(swagger): caption tags name 2022-09-30 23:04:26 +08:00
Shawn 4135910b42 chore: merge master into dev/ee5.0 2022-09-26 09:52:33 +08:00
JimMoen 2984397e73 chore: apps vsn bump 2022-09-23 17:09:15 +08:00
JimMoen fc3fdfb994 fix(build): apply PR#8956 changes 2022-09-23 17:09:10 +08:00
JimMoen 85835256f1 Merge tag 'v5.0.8' into merge-release-v5.0.8-into-master 2022-09-23 16:06:44 +08:00
Ilya Averyanov c11afc357e fix(auth): use empty strings for absent placeholder values 2022-09-20 15:20:55 +03:00
zhongwencool 5056cbebf4 chore: update apps/emqx_authn/src/emqx_authn_app.erl
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-09-16 09:45:37 +08:00
Zhongwen Deng 6bd72fe5a1 fix: check authn's mechanism field 2022-09-16 09:45:37 +08:00
JianBo He 8845da130e
Merge pull request #8957 from HJianBo/strip-double-quote
chore: support strip double quote in authn/authz
2022-09-14 17:35:41 +08:00
firest 8590fef829 fix(authn_redis): Avoid duplicating check for non-existent keys 2022-09-14 16:30:59 +08:00
JianBo He a461375b30 chore: support strip double quote in authn/authz
more compatibility for https://github.com/emqx/emqx/pull/8827
2022-09-14 15:25:31 +08:00
firest 62fd955a0e fix(authn_redis): make dialyzer happy 2022-09-14 14:16:43 +08:00
firest 9e97760520 fix(authn_redis): Add new clause for non-existent key check
fix #8800
when the key not-existing, redis may return a list that all elements are `undefined`
2022-09-14 11:30:26 +08:00
Zaiming (Stone) Shi 4534966e36 Merge remote-tracking branch 'origin/master' into dev/ee5.0 2022-09-13 12:16:54 +02:00
JianBo He e282e3986f Merge branch 'using-erlang-system-time-5' into release-v5.0.8 2022-09-13 11:22:57 +08:00
JianBo He a715573c64
Merge branch 'master' into using-erlang-system-time-5 2022-09-13 09:09:06 +08:00
firest 061e3c264b fix(authn_redis): fix that redis authn will deny the unknown users 2022-09-09 15:28:01 +08:00
firest a770447e75 fix(authn_redis): fix that redis authn will deny the unknown users 2022-09-09 14:53:31 +08:00
JianBo He 8521d8dac5 fix(time): replace os:system_time with erlang:system_time
Avoid the problem of inaccurate timers caused by mixing erlang:system_time/0-1
and os:system_time/0-1
2022-09-08 16:13:05 +08:00
JianBo He 9f6fb4f1ce
Merge branch 'master' into fix-coap-topic 2022-09-07 17:48:44 +08:00
Zaiming (Stone) Shi befc4acced Merge remote-tracking branch 'origin/master' into merge-master-to-ee50-a 2022-09-06 20:31:38 +02:00
Zaiming (Stone) Shi f785da075b ci: only start required docker for integration tests 2022-09-06 19:25:53 +02:00
JianBo He da4efc11c2 chore: log authn-http parsing failed reason 2022-09-06 15:38:32 +08:00
Thales Macedo Garitezi 09d640c1b6
Merge pull request #8887 from thalesmg/bugfix-will-msg-not-connected
bugfix: do not publish last will when authentication failed
2022-09-05 10:38:47 -03:00
Thales Macedo Garitezi e0fcf07cf9 fix: do not publish last will when authentication failed
fixes #8886
2022-09-05 08:55:47 -03:00
JimMoen d4785553b9
Merge pull request #8872 from JimMoen/fix-mqtt-bridge-fields
Fix mqtt bridge fields.
 - Show ssl file path in Dashboard.
 - MQTT bridge `payload` field not required.
merge `v5.0.7` into `master`.
2022-09-05 09:46:45 +08:00
JimMoen d533e35df0 chore: update app vsn 2022-09-02 22:26:21 +08:00
JianBo He a41461ac93
chore: update apps/emqx_authn/src/simple_authn/emqx_authn_jwt.erl 2022-09-02 16:17:25 +08:00
firest 8b9494cf4b fix(jwt): support non-integer timestamp claims
fix #8825
2022-09-02 10:17:47 +08:00
Zaiming (Stone) Shi 5a3fb4a011 Merge remote-tracking branch 'origin/master' into dev/ee5.0 2022-08-31 17:11:15 +02:00
Zaiming (Stone) Shi 2eb078ff3b chore: bump changed app versions 2022-08-26 14:32:28 +02:00
ieQu1 9449e3cb32 refactor(auth_mnesia): Export transaction funs 2022-08-22 19:52:37 +02:00
Shawn 45352206a3 fix(auth): remove emqx_connector from testcases of authz/authn 2022-08-22 20:20:45 +08:00
Shawn b3162fe5ff fix: conflicts between master and ee5.0 2022-08-14 22:24:09 +08:00
Shawn 0cdf4b47f1 feat: add more resource creation opts 2022-08-12 13:47:45 +08:00
Ilya Averyanov 64aa30ec63 chore(authn/authz): better handling of placeholder interpolation errors 2022-08-10 18:22:37 +03:00
Shawn 35fe70b887 feat: support aysnc callback to connector modules 2022-08-10 00:34:35 +08:00
Shawn d3950b9534 fix(resource): make option 'queue_enabled' disabled by default 2022-08-10 00:34:35 +08:00
Shawn 0377d3cf61 fix: update existing testcases for new emqx_resource 2022-08-10 00:34:35 +08:00
Shawn 2fb42e4d37 refactor: create emqx_resource_worker_sup for resource workers 2022-08-10 00:34:35 +08:00
zhouzb 79d6613a18
Merge pull request #8531 from HJianBo/fix-authn-cndn
fix(authn): fix cert_subject and cert_common_name placeholder
2022-07-26 09:09:34 +08:00
Ilya Averyanov 2f470b8878
Merge pull request #8554 from savonarola/authn-logging
Add more tracing for authentication
2022-07-25 17:43:00 +03:00
Ilya Averyanov 1a236db91b chore(log): add authentication tracing 2022-07-25 17:14:19 +03:00
zhongwencool 2466881460
chore: Update apps/emqx_authn/src/emqx_authn_user_import_api.erl
Co-authored-by: zhouzb <zhouzb@emqx.io>
2022-07-25 17:45:38 +08:00
zhongwencool 7261fbaa6b
chore: Update apps/emqx_authn/src/emqx_authn_user_import_api.erl
Co-authored-by: zhouzb <zhouzb@emqx.io>
2022-07-25 17:45:28 +08:00
Zhongwen Deng a3296078c3 chore: make sure swagger's tags always titlecase 2 2022-07-25 16:55:38 +08:00
Zhongwen Deng dd59c850e0 chore: make sure swagger's tags always titlecase 2022-07-25 16:09:17 +08:00
JianBo He 1c8defeeda chore: make elvis happy 2022-07-25 13:17:54 +08:00
JianBo He ba1347513e test(authn): test cert_subject/cert_common_name placeholder 2022-07-25 09:28:28 +08:00
JianBo He f8f4ad3e5b fix(authn): fix cert_subject and cert_common_name placeholder 2022-07-25 09:28:28 +08:00
Zhongwen Deng a12478225a fix: fix bad swagger format 2022-07-20 16:56:07 +08:00
JimMoen 994a76510d fix(authn): jwt ssl opts use emqx_schema:ssl_clients_opts 2022-07-13 10:37:16 +08:00
Shawn b55048f705 chore: update app versions 2022-07-08 16:29:07 +08:00
Shawn 9ca5927b88 fix: issue in test cases 2022-07-08 14:07:28 +08:00
Shawn 841f816e39 refactor: improve the health_check for webhook bridges 2022-07-08 09:17:23 +08:00
Chris dbe806d950 fix: allow for exp field to optional to keep backwards compat with 4.X 2022-07-07 10:18:52 +02:00
JimMoen 2ad99fca7a chore: update appup.src 2022-07-01 21:07:33 +08:00
JimMoen 7b825fe4bd test(authn): authn `is_superuser` default value false. 2022-07-01 21:07:26 +08:00
JimMoen f0c783b260 test(authn): emqx_authn and gateway_athn http `content-type` 2022-07-01 20:55:39 +08:00
JimMoen b88796518e fix(authn): authn http `is_superuser` field
only support true|false|[num]
and for [num]: zero => false | non-zero => true

other type and string will fallback to default vaule => false
i.e null|undefined|[empty string]
2022-07-01 20:55:39 +08:00
JianBo He f8c90452cc chore: auto retry disconnected authn/authz resources 2022-07-01 12:01:39 +08:00
JianBo He 9acfd0ff9e chore: update emqx_authn.appup.src 2022-06-30 15:23:09 +08:00
JianBo He 7de23f5863 chore(authn-redis): checking password field 2022-06-30 13:26:58 +08:00
JianBo He 8f696b6f8c fix(authn): correct peerhost placeholder rendering 2022-06-30 12:50:56 +08:00
JianBo He d7c21020f6 feat(authn-redis): needs to compatible with 4.x auth data 2022-06-30 11:26:56 +08:00
ieQu1 a9ec193ef8 fix(prometheus): Disable authorization for metrics scraping endpoint 2022-06-23 00:31:53 +02:00
Shawn 51efe22e57 chore: update the appup files for authz/authn 2022-06-22 15:54:37 +08:00
Shawn defacb97df fix: disabled resources for authz/authn started after emqx reboot 2022-06-22 14:34:30 +08:00
Shawn cc25f92273 feat: add start_after_created option to resource:create/4 2022-06-16 23:34:52 +08:00
Ilya Averyanov 2c5450e7f6 chore(authn): fix raw authn configs 2022-06-15 22:26:08 +03:00
Ilya Averyanov e381e3698f feat(authn): add enable_authn flag for listeners 2022-06-15 22:26:08 +03:00
Ilya Averyanov 73dd969843
Merge pull request #8210 from savonarola/jwt-authn-add-from
feat(jwt authn): allow to specify JWT field
2022-06-15 14:56:04 +03:00
JianBo He ec840222cd
Merge pull request #8192 from HJianBo/authn-fuzzy-searching
fix(authn): fix enhance_authn fuzzy searching not working
2022-06-15 10:20:49 +08:00
Ilya Averyanov d0f686d19d feat(jwt authn): allow to specify JWT field 2022-06-14 14:34:45 +03:00
JianBo He 2ad2da082b
Merge pull request #8139 from savonarola/authn-jwt-test
chore(jwt authn): improve tests
2022-06-14 14:23:23 +08:00
JianBo He 29baf0f68a fix(authn): fix enhance_authn fuzzy searching not working 2022-06-13 13:38:06 +08:00
Ilya Averyanov 7301009b8e chore(jwt authn): improve tests, add pool_size to schema 2022-06-10 14:28:43 +03:00
Zhongwen Deng c7cc2e85b2 fix: add default&example for schema 2022-06-06 09:52:10 +08:00
Ilya Averyanov 0893a36dec fix(authn): removed explicit chain creation for security reasons 2022-06-02 14:03:19 +03:00
Ilya Averyanov 92145d0275 fix(metrics): make metric id unique for authn provider instances 2022-06-02 14:03:19 +03:00
Ilya Averyanov d32b2ecd81 fix(authn api): update removing listener-specific chain logic 2022-06-02 14:03:14 +03:00
Ilya Averyanov 1bad5f8b7c
Merge pull request #8088 from savonarola/authn-import-users-request
feat(authn api): add method for user file upload
2022-06-02 13:51:46 +03:00
Ilya Averyanov 2d53c21d45 chore(authn api): replace user import api with upload api 2022-06-01 19:56:23 +03:00
JianBo He efc0ca2b62
Merge branch 'master' into changes-enable_pipelining-type 2022-05-31 20:49:10 +08:00
JianBo He f0ddac63cb chore: change the enable_pipelining default value 2022-05-31 19:32:53 +08:00
Zhongwen Deng 8aa60cc0a5 feat: generate a minimized emqx.conf 2022-05-31 19:20:27 +08:00
Ilya Averyanov e258409a8f
Merge pull request #8071 from savonarola/mongodb-authn-defaults
chore(mongodb authn): add defaults for field names
2022-05-31 13:21:27 +03:00
JianBo He 96f58d0ec8 Merge remote-tracking branch 'ce/master' into authn-import-users-request 2022-05-31 10:11:21 +08:00
Ilya Averyanov 3be617cf40 feat(authn api): add method for user file upload 2022-05-31 00:40:10 +03:00
Ilya Averyanov 4cae80c8d2 fix(authn api): add method for removing listener-specific chains 2022-05-30 15:33:21 +03:00
Ilya Averyanov fdee23f492 chore(mongodb authn): add defaults for field names 2022-05-27 13:21:16 +03:00
Ilya Averyanov 5dba01b8fa fix(authn): fix user search API 2022-05-25 15:50:20 +03:00
Zaiming (Stone) Shi 3524fb6994
Merge pull request #7775 from zmstone/0426-5.0-hint-metrics-merge-errors
fix: hint metrics merge errors
2022-05-16 07:42:01 +01:00
Zaiming (Stone) Shi ed0ab70aaf test: fix flaky-ness of authn api tests
if api test suite runs after the JWT suite, it failes as
the config is not clean
2022-05-15 09:19:31 +02:00
Zaiming (Stone) Shi 2eb621ba57 fix: hint metrics merge errors 2022-05-13 21:38:51 +02:00
Zaiming (Stone) Shi 99d50d2455
Merge pull request #7496 from zmstone/0401-5.0-add-parallel-map-lib
refactor: refine pmap with nolink_apply
2022-05-13 18:40:36 +01:00
Zaiming (Stone) Shi 4013dd2f14 refactor: refine pmap implementation 2022-05-13 15:22:42 +02:00
Ilya Averyanov 91da451803 feat(authz): add default authn-based authz source 2022-05-13 12:51:10 +03:00
Ilya Averyanov ca0c80965a
Merge pull request #7890 from savonarola/fix-jwt-acl-v5
fix(jwt auth): improve JWT handling
2022-05-12 19:48:37 +03:00
Ilya Averyanov e0fa07b679 fix(jwt auth): improve JWT handling 2022-05-12 12:10:47 +03:00
JimMoen 4fa84cce29 test(authn): test unsupported redis CMD 2022-05-12 14:19:57 +08:00
JimMoen 87af77ec35 refactor: do not destory resource when update authn/authz resource 2022-05-12 14:19:57 +08:00
Zaiming (Stone) Shi 60ca1cb2a5 refactor(authn): use hocon enum type for user_id_type 2022-05-11 09:02:55 +02:00
Zaiming (Stone) Shi 57c1c418d6 docs(authn): use a string alias for user_id_type 2022-05-10 18:28:16 +02:00
Chris Hicks 841acb7828
Merge pull request #7783 from emqx/EMQX-4199-introduce-a-new-emqx-resource-manager-module
feat: isolate resource manager processes
2022-05-09 18:33:01 +02:00
Chris 0b3e30e813 feat: isolate resource manager processes 2022-05-09 13:24:34 +02:00
JianBo He 8db8598622 fix(mgmt): fix test case crash 2022-05-07 10:16:58 +08:00
JianBo He 6e03a7c686 fix(authn): use a random group id to void data overlap 2022-05-07 10:16:58 +08:00
EMQ-YangM 30b3060327 fix: improve authn, authz metrics 2022-05-05 18:53:31 +08:00
JimMoen 4744e4a5e4 fix(authn): make sure http headers are bin 2022-04-29 19:44:49 +08:00
JianBo He 344a754674
Merge pull request #7817 from JimMoen/fix-auth-http 2022-04-29 16:36:10 +08:00
JianBo He 7bbed713f4
Merge pull request #7835 from JimMoen/fix-mongo-require-fields
fix(auth): mongo field `filter` not required and have default value
2022-04-29 15:38:54 +08:00
JimMoen ad4b70c27e fix(auth): mongo field `filter` not required and have default value 2022-04-29 13:37:29 +08:00
JimMoen 5f75f6e3be docs: refine auth http i18n description 2022-04-29 12:48:21 +08:00
JimMoen c1dfd0aa36 test(auth): authn & authz http placeholder in HTTP path 2022-04-29 12:48:17 +08:00
JimMoen 15ef9892c5 fix(auth): authn & authz http support placeholder in HTTP path 2022-04-29 12:48:00 +08:00
JimMoen dae418ae4a fix(auth): authn & authz http not required `body` field 2022-04-29 12:47:56 +08:00
JimMoen e4826400b8 fix(auth): authn & authz HTTP haeders without `content-type` via GET method 2022-04-29 12:47:52 +08:00
Shawn fc73f96aeb fix(test): use different http port for testing authz and authn 2022-04-29 12:41:36 +08:00
Zaiming (Stone) Shi 4e65322667 refactor: move emqx_plugin_libs_metrics to emqx app
because it can not depend on other apps
2022-04-29 12:41:36 +08:00
zhouzb afe526ba67
Merge pull request #7789 from tigercl/chore/authn-fields
chore: rename certificate in jwt and selector in mongodb, remove pool_size in jwks
2022-04-29 10:14:06 +08:00
DDDHuang 778973b2de
Merge pull request #7791 from DDDHuang/auto_failed_connector
fix: disconnected status in auto_reconnect = false
2022-04-29 09:30:16 +08:00
Zaiming (Stone) Shi 638b7195d4
Merge pull request #7804 from HJianBo/not-allow-empty-claims
fix(authn-jwt): avoid to save empty claim name
2022-04-28 14:10:45 +01:00
EMQ-YangM 56761ecb74 fix: remove duplicated create_metrics 2022-04-28 16:20:38 +08:00
EMQ-YangM 51e025f075 fix: remove duplicated code 2022-04-28 16:10:47 +08:00
EMQ-YangM 4365de9ad5 fix: format code 2022-04-28 15:39:08 +08:00
DDDHuang 2a2308bbf8 refactor: resource check & connector status 2022-04-28 15:32:35 +08:00
EMQ-YangM 5b0ee30d72 fix: ignore unwanted results 2022-04-28 15:02:07 +08:00
EMQ-YangM 6530604f40 fix: add authn authz metrics supervisor 2022-04-28 14:38:45 +08:00
EMQ-YangM 098598a0be fix: add resource_metrics, node_resource_metrics 2022-04-28 12:43:55 +08:00
EMQ-YangM 2a7bd74ef1 feat: authn add new metrics 2022-04-28 11:16:45 +08:00
JianBo He e216e0f17f test(authn): add test for verifing claim name 2022-04-28 09:14:28 +08:00
JianBo He 6535eb879c fix(authn-jwt): avoid to save empty claim name
An empty claim_name has not a real meaning and will result in a
syntax error cluster_override.conf. i.e:
```
authentication {
  mechanism = "jwt"
  verify_claims { = "22"}
  ...
}
```
2022-04-28 08:34:04 +08:00
zhouzb 7ddd020dd2 docs: improve desc for filter field 2022-04-27 11:29:18 +08:00
zhouzb fa9bd74595 chore: rename selector to filter and fix spellcheck 2022-04-27 11:29:18 +08:00
zhouzb c384ae2534 chore: rename certificate in jwt to public_key, delete pool_size in jwks authn 2022-04-27 11:29:16 +08:00
JimMoen a75f42d629 docs: add missing i18n trans and make spellcheck happy 2022-04-27 11:00:22 +08:00
JianBo He a7354401df
Merge pull request #7758 from lafirest/fix/authn_user_search
fix(authn): Add support for query by is_superuser to the mensia backend
2022-04-26 18:27:53 +08:00