fix(bridges): handle secrets more consistently
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
This commit is contained in:
parent
11c7024d9d
commit
d1c3b1c659
|
@ -379,7 +379,7 @@ username(_) ->
|
|||
|
||||
password(#{password := Password}) ->
|
||||
%% TODO: teach `influxdb` to accept 0-arity closures as passwords.
|
||||
[{password, emqx_secret:unwrap(Password)}];
|
||||
[{password, str(emqx_secret:unwrap(Password))}];
|
||||
password(_) ->
|
||||
[].
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ on_start(
|
|||
Options = [
|
||||
{server, to_bin(Server)},
|
||||
{username, Username},
|
||||
{password, maps:get(password, Config, "")},
|
||||
{password, maps:get(password, Config, emqx_secret:wrap(""))},
|
||||
{driver, Driver},
|
||||
{database, Database},
|
||||
{pool_size, PoolSize}
|
||||
|
|
|
@ -131,7 +131,7 @@ on_start(
|
|||
{host, Host},
|
||||
{port, Port},
|
||||
{username, User},
|
||||
{password, maps:get(password, Config, "")},
|
||||
{password, maps:get(password, Config, emqx_secret:wrap(""))},
|
||||
{database, DB},
|
||||
{auto_reconnect, ?AUTO_RECONNECT_INTERVAL},
|
||||
{pool_size, PoolSize}
|
||||
|
|
Loading…
Reference in New Issue