Merge pull request #12972 from zmstone/0503-unhide-default-dashboard-username-password

chore: unhide dashboard default_password config
This commit is contained in:
Zaiming (Stone) Shi 2024-05-04 08:36:32 +02:00 committed by GitHub
commit c5d8659f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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(desc) -> ?DESC(default_username);
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(_) -> undefined.
@ -264,7 +268,7 @@ default_password('readOnly') -> true;
default_password(sensitive) -> true;
default_password(converter) -> fun emqx_schema:password_converter/2;
default_password(desc) -> ?DESC(default_password);
default_password(importance) -> ?IMPORTANCE_HIDDEN;
default_password(importance) -> ?IMPORTANCE_LOW;
default_password(_) -> undefined.
cors(type) -> boolean();

View File

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