From aed074d83ef38076ec539b4bf39fe0cf39b548ef Mon Sep 17 00:00:00 2001 From: wei liu Date: Wed, 14 May 2025 19:40:22 +0800 Subject: [PATCH] fix: unexpected password for root user (#41818) issue: #41816 pr: #41817 pr #37983 introduced an issue, if doesn't specified `defaultRootPassword` in milvus.yaml, then `"Milvus"` will be used as default password for root user, instead of `Milvus`. This PR fix the unexpected password for root, and add comment for case which use large numeric password requires double quotes. Signed-off-by: Wei Liu --- configs/milvus.yaml | 4 +++- pkg/util/paramtable/component_param.go | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configs/milvus.yaml b/configs/milvus.yaml index 5286784014..f55b6b9d59 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -851,7 +851,9 @@ common: # The superusers will ignore some system check processes, # like the old password verification when updating the credential superUsers: - defaultRootPassword: "Milvus" # default password for root user. The maximum length is 72 characters, and double quotes are required. + # default password for root user. The maximum length is 72 characters. + # Large numeric passwords require double quotes to avoid yaml parsing precision issues. + defaultRootPassword: Milvus rootShouldBindRole: false # Whether the root user should bind a role when the authorization is enabled. enablePublicPrivilege: true # Whether to enable public privilege rbac: diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index cb01600e73..bb72c9a21a 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -673,10 +673,11 @@ like the old password verification when updating the credential`, p.SuperUsers.Init(base.mgr) p.DefaultRootPassword = ParamItem{ - Key: "common.security.defaultRootPassword", - Version: "2.4.7", - Doc: "default password for root user. The maximum length is 72 characters, and double quotes are required.", - DefaultValue: "\"Milvus\"", + Key: "common.security.defaultRootPassword", + Version: "2.4.7", + Doc: `default password for root user. The maximum length is 72 characters. +Large numeric passwords require double quotes to avoid yaml parsing precision issues.`, + DefaultValue: "Milvus", Export: true, } p.DefaultRootPassword.Init(base.mgr)