diff --git a/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb.app.src b/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb.app.src index 4c5a15b79..a8a938a0b 100644 --- a/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb.app.src +++ b/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb.app.src @@ -1,6 +1,6 @@ {application, emqx_bridge_greptimedb, [ {description, "EMQX GreptimeDB Bridge"}, - {vsn, "0.1.3"}, + {vsn, "0.1.4"}, {registered, []}, {applications, [ kernel, diff --git a/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl b/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl index ff4ba313e..d588f7f8c 100644 --- a/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl +++ b/apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl @@ -147,13 +147,7 @@ fields(greptimedb) -> [ {dbname, mk(binary(), #{required => true, desc => ?DESC("dbname")})}, {username, mk(binary(), #{desc => ?DESC("username")})}, - {password, - mk(binary(), #{ - desc => ?DESC("password"), - format => <<"password">>, - sensitive => true, - converter => fun emqx_schema:password_converter/2 - })} + {password, emqx_schema_secret:mk(#{desc => ?DESC("password")})} ] ++ emqx_connector_schema_lib:ssl_fields(). server() -> @@ -302,7 +296,8 @@ ssl_config(SSL = #{enable := true}) -> auth(#{username := Username, password := Password}) -> [ - {auth, {basic, #{username => str(Username), password => str(Password)}}} + %% TODO: teach `greptimedb` to accept 0-arity closures as passwords. + {auth, {basic, #{username => str(Username), password => emqx_secret:unwrap(Password)}}} ]; auth(_) -> [].