chore: unhide dashboard default_username and default_password config

This commit is contained in:
zmstone 2024-05-03 16:59:33 +02:00
parent 28cdce7464
commit 4d3156b5ed
2 changed files with 8 additions and 5 deletions

View File

@ -254,6 +254,10 @@ default_username(default) -> <<"admin">>;
default_username(required) -> true; default_username(required) -> true;
default_username(desc) -> ?DESC(default_username); default_username(desc) -> ?DESC(default_username);
default_username('readOnly') -> true; default_username('readOnly') -> true;
%% username is hidden but password is not,
%% this is because we want to force changing 'admin' user's password.
%% instead of suggesting to create a new user --- which could be
%% more prone to leaving behind 'admin' user's password unchanged without detection.
default_username(importance) -> ?IMPORTANCE_HIDDEN; default_username(importance) -> ?IMPORTANCE_HIDDEN;
default_username(_) -> undefined. default_username(_) -> undefined.
@ -264,7 +268,7 @@ default_password('readOnly') -> true;
default_password(sensitive) -> true; default_password(sensitive) -> true;
default_password(converter) -> fun emqx_schema:password_converter/2; default_password(converter) -> fun emqx_schema:password_converter/2;
default_password(desc) -> ?DESC(default_password); default_password(desc) -> ?DESC(default_password);
default_password(importance) -> ?IMPORTANCE_HIDDEN; default_password(importance) -> ?IMPORTANCE_LOW;
default_password(_) -> undefined. default_password(_) -> undefined.
cors(type) -> boolean(); cors(type) -> boolean();

View File

@ -28,10 +28,9 @@ cors.label:
"""CORS""" """CORS"""
default_password.desc: default_password.desc:
"""The initial default password for dashboard 'admin' user. """The password used to initialize a database record for `admin` user.
For safety, it should be changed as soon as possible. NOTE: Changing the default password after it has been initialized (boot up for the fist time) has no effect.
This value is not valid when you log in to Dashboard for the first time via the web Once initialized, the default password `public` must be changed from dashboard or CLI as soon as possible."""
and change to a complex password as prompted."""
default_password.label: default_password.label:
"""Default password""" """Default password"""