Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Enhancement] Remove default password and support custom password when first access console. #11957

Closed
KomachiSion opened this issue Apr 12, 2024 · 0 comments
Assignees
Labels
kind/feature type/feature
Milestone

Comments

@KomachiSion
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Since version 1.2.0, Nacos has provided a default authentication plugin to facilitate user access, complete with default username and password. However, the use of default passwords can pose a security risk, making it easy for malicious individuals to exploit the system, leading to potential data breaches.

Therefore, we have researched other products in the open-source community and found that most products facing this issue adopt an approach that requires either password generation upon enabling authentication or mandates users to set their own passwords, rather than using a uniform default value.

Following this best practice design principle, the Nacos community plans to eliminate the default password policy. Upon first-time activation of authentication, users will define a one-time password through the console or an API. This API and the console's initial password setup feature will only be active for initial setup; once an admin account is created in the cluster, the feature cannot be invoked again.

For users who are upgrading and have admin accounts with the default password 'nacos,' a prompt will be displayed on the console indicating the presence of the default password and recommending a change.

The Nacos community believes that this change, combined with the removal of the default value for token.secure.key introduced in Nacos 2.2 and the console prompts indicating that authentication is not enabled, will significantly reduce the risk of data breaches in newer versions of Nacos.

@KomachiSion KomachiSion added the kind/feature type/feature label Apr 12, 2024
@KomachiSion KomachiSion added this to the 2.4.0 milestone Apr 12, 2024
@KomachiSion KomachiSion self-assigned this Apr 12, 2024
KomachiSion pushed a commit that referenced this issue Apr 29, 2024
* Remove default password

* admin role check fix

* remove tmp admin
KomachiSion pushed a commit that referenced this issue May 24, 2024
* AuthModule add admin exist

* test fix

* fix state

* add state cache

* rename to auth_admin_request

* test fix

* auth_admin_request default value fix

* fix admin request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature type/feature
Projects
None yet
Development

No branches or pull requests

1 participant