fix: redact the password to `******` in API examples
@@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_authn, [
{description, "EMQX Authentication"},
- {vsn, "0.1.15"},
+ {vsn, "0.1.16"},
{modules, []},
{registered, [emqx_authn_sup, emqx_authn_registry]},
{applications, [kernel, stdlib, emqx_resource, emqx_connector, ehttpc, epgsql, mysql, jose]},
@@ -1419,14 +1419,14 @@ request_user_create_examples() ->
summary => <<"Regular user">>,
value => #{
user_id => <<"user1">>,
- password => <<"secret">>
+ password => <<"******">>
}
},
super_user => #{
summary => <<"Superuser">>,
user_id => <<"user2">>,
- password => <<"secret">>,
+ password => <<"******">>,
is_superuser => true
@@ -1437,13 +1437,13 @@ request_user_update_examples() ->
regular_user => #{
summary => <<"Update regular user">>,
- password => <<"newsecret">>
summary => <<"Update user and promote to superuser">>,
- password => <<"newsecret">>,
@@ -235,7 +235,7 @@ mqtt_main_example() ->
server => <<"127.0.0.1:1883">>,
proto_ver => <<"v4">>,
username => <<"foo">>,
- password => <<"bar">>,
clean_start => true,
keepalive => <<"300s">>,
retry_interval => <<"15s">>,
@@ -0,0 +1,2 @@
+For security reasons, the value of the `password` field in the API examples is replaced with `******`.
+
+出于安全原因,将 API 示例中 `password` 字段的值,统一更换为 `******`。
@@ -50,7 +50,7 @@ values(_Method, Type) ->
database => <<"mqtt">>,
pool_size => 8,
username => <<"default">>,
- password => <<"public">>,
sql => ?DEFAULT_SQL,
batch_value_separator => ?DEFAULT_BATCH_VALUE_SEPARATOR,
local_topic => <<"local/topic/#">>,
@@ -46,7 +46,7 @@ values(_Method) ->
username => <<"root">>,
template => ?DEFAULT_TEMPLATE,
resource_opts => #{
@@ -61,7 +61,7 @@ values("influxdb_api_v1", post) ->
TypeOpts = #{
database => <<"example_database">>,
username => <<"example_username">>,
- password => <<"examlpe_password">>,
server => <<"127.0.0.1:8086">>
values(common, "influxdb_api_v1", SupportUint, TypeOpts);
@@ -64,7 +64,7 @@ values(common_config) ->
authentication => #{
mechanism => <<"plain">>,
username => <<"username">>,
- password => <<"password">>
bootstrap_hosts => <<"localhost:9092">>,
connect_timeout => <<"5s">>,
@@ -149,7 +149,7 @@ values(common, MongoType, Method, TypeOpts) ->
srv_record => false,
username => <<"myuser">>,
- password => <<"mypass">>
MethodVals = method_values(MongoType, Method),
Vals0 = maps:merge(MethodVals, Common),
@@ -47,7 +47,7 @@ values(_Method) ->
database => <<"test">>,
- password => <<"">>,
@@ -49,7 +49,7 @@ values(_Method, Type) ->
@@ -77,7 +77,7 @@ values(common, RedisType, SpecificOpts) ->
enable => true,
command_template => [<<"LPUSH">>, <<"MSGS">>, <<"${payload}">>],
resource_opts => values(resource_opts, RedisType, #{}),
ssl => #{enable => false}