Commit Graph

555 Commits

Author SHA1 Message Date
Shawn
9ba454a63d fix(bridge): filter the topic of received msgs got from remote MQTT broker 2021-12-31 12:00:43 +08:00
Shawn
e2d899ad6e fix(bridge): HTTP reqeust crash if using GET an DELETE method 2021-12-31 00:03:03 +08:00
Shawn
9d733c2ec5 fix(resource): typos on restart a resource 2021-12-30 23:48:41 +08:00
Shawn
d11cf6ad64 fix(bridges): store connector name and bridge name to config files 2021-12-30 23:48:41 +08:00
Shawn
110ae62b24 fix(bridge): don't concat names into ids 2021-12-30 23:48:41 +08:00
Shawn
14089a572e fix(bridge): changes timeouts from 30s to 15s 2021-12-30 23:48:41 +08:00
Shawn
aefcd6275b fix(bridges): ingress MQTT bridges didn't increase counters on msg received 2021-12-30 23:48:41 +08:00
Shawn
c23436166b fix(bridge): HTTP connector should failed on non-200 status codes 2021-12-30 23:48:41 +08:00
Shawn
ea1aaa9806 fix(bridge): remove clientid config from MQTT bridges
Don't allow the user provide the clientid for connecting the remote broker.
We generate the clientid using the bridge id and node name.
2021-12-30 23:48:41 +08:00
zhongwencool
d16362af96
Merge pull request #6547 from zhongwencool/trace-formatter
feat(trace): replace logger_formatter by emqx_trace_formatter
2021-12-30 23:40:59 +08:00
zhongwencool
489fb7f806 fix(trace): copy binary:encode_hex/2 from binary.erl 2021-12-30 21:38:23 +08:00
Ilya Averyanov
c98e0efdad chore(mongodb): update client 2021-12-30 13:57:48 +03:00
JimMoen
39c29b2396 fix(connector): redis cluster servers field 2021-12-30 15:37:53 +08:00
zhongwencool
43141dffee
Merge branch 'release-5.0-beta.3' into trace-formatter 2021-12-29 22:37:59 +08:00
Ilya Averyanov
f230c20521 chore(authn): test HTTPS authn 2021-12-29 16:24:57 +03:00
Ilya Averyanov
a7ca6cb39f chore(authn): test MongoDB authn via ssl connection 2021-12-29 16:24:52 +03:00
zhongwencool
121d906992 chore(log): add SLOG/3 to add meta info 2021-12-29 14:48:48 +08:00
tigercl
d769401869
Merge pull request #6555 from tigercl/chore/new-epgsql
chore: support prepared query in postgresql connector
2021-12-29 13:37:29 +08:00
zhongwencool
4b6bba11eb feat(trace): struct log for trace 2021-12-29 00:26:54 +08:00
Shawn
07997ab865 fix(bridge): Bridges should send a JSON message if payload template not set 2021-12-28 14:18:14 +08:00
Shawn
4406589980 fix(bridge): time unit error for MQTT keepalive 2021-12-28 14:12:28 +08:00
zhouzb
1a22d5ca46 fix: fix undef function call 2021-12-28 11:21:41 +08:00
zhouzb
d26042703e chore: provide prepared_query and equery 2021-12-28 09:52:31 +08:00
zhouzb
fc89fb0f8a chore: using prepared query in postgresql connector 2021-12-28 09:16:00 +08:00
Ilya Averyanov
e2e2c98679 chore(authn): test Mysql authn via ssl connection 2021-12-27 11:16:31 +03:00
Ilya Averyanov
6de89d1207 chore(authn): test PostgreSQL authn via ssl connection 2021-12-27 11:16:31 +03:00
zhongwencool
668180388c feat(trace): replace logger_formatter by emqx_trace_formatter 2021-12-27 14:40:40 +08:00
Thales Macedo Garitezi
34d6dbca61
chore(mix): simplify build by using rebar3 for umbrella apps
By treating the apps in the umbrella as dependencies to be managed and
built by rebar3, we can simplify the maintenance of the release, at
the cost of increased build times: using Mix as before, it could track
changed files better than using rebar.  But the complexity and
possibility of discrepancies make it using rebar much more compelling.
2021-12-22 09:40:01 -03:00
Shawn
27de3139a4 fix(http_connect): don't check status on_start 2021-12-20 11:36:52 +08:00
Shawn
cfaad15364 fix(connector): update the connector config failed 2021-12-18 20:19:34 +08:00
Shawn
a44e18e869 fix(bridge): filter out some extra fields from the request body 2021-12-18 19:19:58 +08:00
Shawn
11e8e0db69 fix(bridge): stop http failed due to econnrefused 2021-12-18 15:33:25 +08:00
Shawn
20091f8d2a fix(connector): some desc for connector APIs 2021-12-18 09:52:15 +08:00
Shawn
673a545aa2 fix(dialyzer): bad type specs 2021-12-17 22:15:56 +08:00
Shawn
0699682f38 refactor(bridges): rename some config entries for MQTT bridge 2021-12-17 21:22:04 +08:00
Shawn
9b34f6f9a3 fix(connector): add type and name in repsonse of GET /connectors 2021-12-17 16:45:42 +08:00
Zaiming (Stone) Shi
7d36079f0a docs(connector): better namespace for http schema 2021-12-11 22:17:52 +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
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
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
e07fce791f feat(connector): add examples to the swagger doc 2021-12-07 09:47:53 +08: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
d9a980c7e1 docs: fix config doc, avoid using <text> in doc body 2021-12-06 08:00:42 +01:00
JimMoen
d7ec368884 fix(authz): fix mongo resources create 2021-12-02 10:12:10 +08: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
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
zhouzb
4d92e2b6af fix(connector): fix options handling for mongo connector 2021-11-23 20:01:21 +08:00
Shawn
29ad6d215e feat(resource): add metrics to emqx_resource 2021-11-23 10:04:31 +08:00
Ilya Averyanov
071c2c99e8 refactor(authn resources): add emqx_resource and emqx_authn tests 2021-11-22 21:08:04 +03:00
Shawn
f0c61068e8 fix(authn): test cases issues 2021-11-22 17:35:33 +08:00
Shawn
9c93ea0338 feat(connector): add API for /connectors_test 2021-11-22 17:35:33 +08:00
Shawn
bcf5f499da feat(connector): add APIs for connector 2021-11-22 17:35:33 +08:00
Shawn
7d64013edd refactor(connector): add connector configs 2021-11-22 17:35:32 +08:00
Shawn
cf3f2c3057 fix(dialyzer): remote the extra str/1 2021-11-22 17:35:32 +08:00
Shawn
1e6884ee7d fix(bridge): convert confs for http bridge when creating 2021-11-22 17:35:32 +08:00
Shawn
f01f9632c1 fix(bridge): cannot start mqtt bridge from config 2021-11-22 17:35:32 +08:00
Shawn
63f942a1b8 feat(bridge): add descriptions to the mqtt bridge schema 2021-11-22 17:35:32 +08:00
Shawn
0cbdaa0f40 refactor(bridge): update config struct for mqtt bridge 2021-11-22 17:35:32 +08:00
Shawn
d046f9c6e7 fix(bridge): improve the schema of connector_http 2021-11-22 17:35:32 +08:00
Shawn
dd9e2c4b24 refactor(bridge): the configs for http bridges 2021-11-22 17:35:32 +08:00
zhouzb
f8a625a67f feat(mongo srv): support srv record for mongo connector 2021-11-17 12:12:30 +08:00
Zaiming Shi
d1abb30818 ci: fix elvis check 2021-11-04 15:27:10 +01:00
Zaiming Shi
56e2a9741f style: ensure newline at EOF for all files 2021-11-04 14:40:14 +01:00
William Yang
9c8cd6c437 perf(pool): change emqx_connector default pool type to hash 2021-10-27 08:47:02 +02:00
Zaiming Shi
72c26931d7 fix: fill string fields' default value with binary 2021-10-20 11:52:30 +02:00
Shawn
d1b3377c52 fix(mongo): update the health check method 2021-10-19 15:52:36 +08:00
zhongwencool
d80f20aca3
feat(swagger): define mgmt config_api by hocon schema (#5814)
* feat(swagger): define mgmt config_api by hocon schema

* fix: enum can't defined by integer, use union.

* fix: hocon schema union to enum
2021-10-13 14:04:43 +08:00
zhouzb
50765fa345 fix(http): fix function clause when create http connector instance 2021-09-29 19:35:06 +08:00
tigercl
79685a77ba
Merge branch 'master' into fix/authn2 2021-09-28 09:27:08 +08:00
Shawn
a9185f964e
fix(rules): improve specs and logs (#5821)
Co-authored-by: Zaiming Shi <zmstone@gmail.com>
2021-09-27 21:10:48 +02:00
Shawn
e2721c144c feat(bridge): support http bridge 2021-09-27 22:01:18 +08:00
Shawn
69f3cce75d feat(rules): hook on bridges events and query bridges from rules 2021-09-26 23:00:08 +08:00
lafirest
6e3ec6c9db fix(schema): fix authn/z's schema time unit 2021-09-26 14:41:46 +08:00
lafirest
e31e175e47 fix(schema): fix some time unit in schema 2021-09-26 14:38:53 +08:00
zhouzb
e31840d943 fix(authn): add timeout option for mysql connector 2021-09-24 17:15:10 +08:00
Zaiming Shi
97e1cf65b7 refactor(schema): make a client ssl options schema
client and server ssl options share some common fields
this commit make an abstraction for the common fields
then export server_ssl_options_schema/2 and client_ssl_options_schema/1
for other schema modules to call
2021-09-23 16:56:02 +02:00
Zaiming Shi
fbd5701989 fix(emqx_schema): make ssl config schema right 2021-09-23 16:56:02 +02:00
tigercl
2b9870992c
Merge pull request #5763 from tigercl/feat/clear-certs
feat(clear certs): clear certs when deleting instance
2021-09-23 09:43:56 +08:00
Shawn
c0258e1be6 feat(bridge): let mqtt bridge work with rules 2021-09-22 14:29:47 +08:00
Shawn
502f962b4c refactor(bridge): change confs for channel from array to map 2021-09-22 14:29:47 +08:00
zhouzb
69755ad3fb fix(authn): fix bug in authn 2021-09-18 09:14:03 +08:00
JimMoen
6edc9f4221 fix(emqx_types): spec refs emqx_types.erl instead directly. 2021-09-17 19:28:22 +08:00
JimMoen
9c95557bfc fix(emqx_types): type spec refs does not exist file. 2021-09-17 19:28:22 +08:00
zhouzb
43ce727632 chore(gen_id): using emqx_misc:gen_id/0, /1 2021-09-16 16:51:46 +08:00
JimMoen
deac54c847 chore(for editor): Add comments for Emacs major mode. 2021-09-16 15:43:30 +08:00
Shawn
b1999b2205 fix(bridge): update bridge with new conf failed 2021-09-15 17:46:42 +08:00
Shawn
7058b83760 refactor(bridge): rename message_in/out to ingress/egress_channels 2021-09-15 17:46:42 +08:00
Shawn
c1ff8778e1 fix(bridges): add logs for creating/removing bridges 2021-09-15 17:46:42 +08:00
Shawn
8730a03ab8 feat(bridges): add start/stop/restart HTTP APIs for bridges 2021-09-15 17:46:42 +08:00
zhouzb
63d3a7b525 feat(upload certs): save certs to file 2021-09-14 13:38:09 +08:00
tigercl
09c376c1e5
Merge pull request #5707 from terry-xiaoyu/bridge_apis
feat(bridges): avoid clientid competition between bridges on differen…
2021-09-10 19:32:20 +08:00
tigercl
78397329e8
Merge pull request #5684 from tigercl/chore/authn
chore(authn): provide easy-to-read hints for more errors
2021-09-10 19:04:11 +08:00
zhouzb
5cea9a4edc chore(authn): add api spec 2021-09-10 15:55:37 +08:00
Shawn
d46241fe2f feat(bridges): avoid clientid competition between bridges on different nodes 2021-09-10 14:21:17 +08:00
Shawn
135c005467 fix(bridges): do not start any bridge by default 2021-09-10 11:43:03 +08:00
Shawn
1ecec5ef3a refactor(bridges): move some test cases from old emqx_bridge_mqtt app 2021-09-10 11:43:03 +08:00
Shawn
037b75a276 refactor(bridges): remote the old emqx_bridge_mqtt app 2021-09-10 11:43:03 +08:00
Shawn
1b5c08adeb fix(bridges): update hocon schema for bridges for hocon 0.15.0 2021-09-10 11:43:03 +08:00
Shawn
298cf24f00 fix(bridges): mqtt bridge cannot forward msgs using payload template 2021-09-10 11:43:03 +08:00
Shawn
eb8822ce41 feat(bridges): start one mqtt bridge worker for each in/out channel 2021-09-10 11:43:03 +08:00
Shawn
4f82debbe7 feat(bridge): new configs for mqtt bridge 2021-09-10 11:43:03 +08:00
Shawn
39bb1b8d9d fix(bridges): start mqtt bridge failed 2021-09-10 11:43:03 +08:00
Shawn
9ed90ba7a9 feat(bridges): add connector for mqtt bridge 2021-09-10 11:43:03 +08:00
zhouzb
627de1d58c fix(test): fix test case 2021-09-07 10:29:45 +08:00
zhouzb
e998770f2e refactor(authn): refactor to support global and listener authentication 2021-09-06 18:46:08 +08:00
Zaiming Shi
19aff7bfdd fix(authz): schema fields used directly. 2021-09-03 14:58:49 +02:00
Zaiming Shi
ec13463f4a refactor(schema): prepare for hocon schema doc generation 2021-09-03 11:02:31 +02:00
zhanghongtong
b014266fa0 chore(connector http): update ssl for http connector 2021-09-02 15:32:44 +08:00
Zaiming Shi
5165fd6b30 refactor(schema): implement new hocon_schema callbacks 2021-08-30 09:56:03 +08:00
Rory Z
7e8dde7e26 chore: fix dialyzer error
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-08-25 10:15:00 +08:00
zhanghongtong
a2bafd1a18 feat(authz): support authorization config file part 2 2021-08-25 10:15:00 +08:00
zhanghongtong
618125b1da fix(connector): fix schema error for mongo 2021-08-12 21:52:06 +08:00
Zaiming Shi
e6232665a3 refactor(emqx): ensure app shutdown and reboot order
make use of application dependency to ensure start order.
also the same dependency top-sorted for shutdown and reboot order
2021-08-04 08:40:03 +02:00
zhouzb
5c9dabc064 feat(authn mongo api): add api spec for mongo authn 2021-07-30 11:47:48 +08:00
zhouzb
5b6452d853 feat(authn): support mongodb authn 2021-07-29 16:07:36 +08:00
zhouzb
76d6949cd1 fix(authn): fix password hash algorithm for mysql and pgsql authn 2021-07-28 14:26:26 +08:00
zhouzb
7d2aac7e24 feat(http pipelining): support to switch http pipelining 2021-07-26 14:41:15 +08:00
zhouzb
3e515d8a8a fix(authn): fix bugs for http authn 2021-07-26 14:41:14 +08:00
zhanghongtong
bb417e4498 feat(authz): support http
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-17 15:48:29 +08:00
zhouzb
42c5432514 fix(http authn): fix bugs for http authn and http connector 2021-07-14 18:20:46 +08:00
zhouzb
5bb55332a5 chore(auhtn): keep one ssl opts checking func 2021-07-12 16:33:52 +08:00
tigercl
df92a60085
feat(http connector): support http connector (#5192)
- support http connector
- support http authn
2021-07-12 15:35:06 +08:00
zhanghongtong
178bafbabf chore: rename required function to not_empty
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-09 14:18:41 +08:00
zhanghongtong
c10d154dab chore(connector): update schema file
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-09 14:18:41 +08:00
Rory Z
6d7424b445 fix(connector): fix mongo connector auth failed 2021-07-08 11:25:18 +08:00
Rory Z
612d25fdb3 chore(connector): rename mongo config key 2021-07-07 10:06:10 +08:00
Rory Z
53df218e6a feat(connector): mongo support replica set 2021-07-06 18:07:06 +08:00
Rory Z
fd0a211629 chore(authz): mongo connector support ssl 2021-07-05 17:57:03 +08:00
Rory Z
f733293a8b chore(authz): update apps vsn 2021-07-05 17:57:03 +08:00
Rory Z
694f3bd67f feat(authz): support mongo single 2021-07-05 17:57:03 +08:00
zhanghongtong
2b082f9cf9 chore(connector): update connector ssl schema 2021-06-29 18:22:44 +08:00
Rory Z
4157524910
feat(redis connector): redis connector support cluster (#5074) 2021-06-25 11:47:57 +08:00
Shawn
8978464269
change resource,connectors,data_bridges as normal apps (#5034) 2021-06-19 16:27:21 +08:00
zhanghongtong
abca2938f4 fix(connector): add nullable for sentinel_name in redis schema 2021-06-18 16:11:51 +08:00
turtleDeng
54dedc8343 Revert "chore: mv emqx_connector to emqx_data_bridge"
This reverts commit d640e2ccfa.
2021-06-17 19:11:10 +08:00
Turtle
d640e2ccfa chore: mv emqx_connector to emqx_data_bridge 2021-06-17 16:42:41 +08:00
turtleDeng
0515ef6e45
feat(connector): add more connector (#4985) 2021-06-16 11:28:26 +08:00
zhanghongtong
949e8348fc chore(connector): ensure alllication start in mysql connector 2021-06-16 09:41:52 +08:00
Zaiming Shi
9a78f812e1 fix(emqx_resource): fix schema schema definition 2021-06-15 12:35:08 +02:00
Shawn
1de2f5cb2f fix(emqx_data_bridge): update bridge failed 2021-06-08 21:46:52 +08:00
Shawn
65dc2f2be8 feat(emqx_resource): remove the schema sugar from parse transformed code 2021-06-08 21:46:52 +08:00
Shawn
4914b003ac feat(emqx_resource): update the unused APIs 2021-06-07 17:20:34 +08:00
Shawn
2ff92d2880 feat(emqx_data_bridge): add HTTP APIs for data bridge 2021-06-07 16:12:06 +08:00
Shawn
f1552f4f4f feat(emqx_data_bridge): create emqx_data_bridge 2021-06-04 23:47:16 +08:00
Shawn
3da62e59d6 fix(emqx_connector): the HTTP API for emqx_connector_mysql 2021-06-03 01:24:30 +08:00
Shawn
bea5966ac8 fix(emqx_connector): remove unrelated files and add license headers 2021-06-02 19:10:24 +08:00
Shawn
49c5edce2e fix(emqx_connector): start emqx_connector_mysql failed 2021-06-02 17:28:47 +08:00
Shawn
5d52ce044d feat(emqx_resource): read and save configs from and to file 2021-06-02 01:58:32 +08:00
Shawn
e7ffa07a1a feat(emqx_connector): load connectors from emqx_connector.conf 2021-05-31 22:49:42 +08:00
Shawn
f4bb589079 feat(emqx_mysql_connector): implement the on_query callback 2021-05-31 15:41:22 +08:00
Shawn
6b33172095 feat(emqx_connector): add first emqx_connector for mysql 2021-05-31 15:14:07 +08:00