JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(deploy): reject empty identity bootstrap passwords
whqxbsc3596e73517b
diff --git a/deploy/enterprise/.env.example b/deploy/enterprise/.env.exampleindex c3ea633a93..2aa8bdbb99 100644--- a/deploy/enterprise/.env.example+++ b/deploy/enterprise/.env.example@@ -373,7 +373,7 @@ MANAGER_WEB_RESOLVER=auto# ====================== Manager / Identity 预置账号 ======================# 仅首次创建账号时生效;已有账号的密码不会因修改这些变量而改变。-# 留空或不配置时,使用 global_vars.sh 中的默认值 admin / user1。+# 不配置时,使用 global_vars.sh 中的默认值 admin / user1;显式配置为空时终止 Manager 部署。# IDENTITY_SEED_ADMIN=true# IDENTITY_SEED_USER1=true# IDENTITY_ADMIN_PASSWORD=""diff --git a/deploy/enterprise/check_handler.sh b/deploy/enterprise/check_handler.shindex 5b9e7cc9bc..581790339b 100755--- a/deploy/enterprise/check_handler.sh+++ b/deploy/enterprise/check_handler.sh@@ -467,6 +467,14 @@ check_web_up_dependency(){}check_manager_up_dependency(){+ if [ -z "${DEPLOY_VARS["IDENTITY_ADMIN_PASSWORD"]:-}" ]; then+ error "IDENTITY_ADMIN_PASSWORD cannot be empty."+ fi++ if [ -z "${DEPLOY_VARS["IDENTITY_USER1_PASSWORD"]:-}" ]; then+ error "IDENTITY_USER1_PASSWORD cannot be empty."+ fi+check_if_db_up}diff --git a/deploy/enterprise/deploy.sh b/deploy/enterprise/deploy.shindex ea2133829b..fb9cfe025c 100755--- a/deploy/enterprise/deploy.sh+++ b/deploy/enterprise/deploy.sh@@ -95,11 +95,7 @@ process_restart() {# ==================== Main function ====================main() {- local default_admin_password="${DEPLOY_VARS[IDENTITY_ADMIN_PASSWORD]}"- local default_user1_password="${DEPLOY_VARS[IDENTITY_USER1_PASSWORD]}"read_env_from_file "${CUSTOM_ENV_FILE}" "DEPLOY_VARS"- DEPLOY_VARS[IDENTITY_ADMIN_PASSWORD]="${DEPLOY_VARS[IDENTITY_ADMIN_PASSWORD]:-$default_admin_password}"- DEPLOY_VARS[IDENTITY_USER1_PASSWORD]="${DEPLOY_VARS[IDENTITY_USER1_PASSWORD]:-$default_user1_password}"parse_args "$@"link_mtls_checkdetect_osdiff --git a/deploy/enterprise/gen_env_custom.sh b/deploy/enterprise/gen_env_custom.shindex 4513eeb516..ed0cbfd5b1 100755--- a/deploy/enterprise/gen_env_custom.sh+++ b/deploy/enterprise/gen_env_custom.sh@@ -119,7 +119,7 @@ if [[ "${TYPE}" == "dev" ]]; thencat <<EOF# MANAGER_SERVER_NODE_PORT=30086# MANAGER_WEB_NODE_PORT=30273-# 首次创建 Identity 账号时的密码;不配置则使用默认值 admin / user1+# 首次创建 Identity 账号时的密码;不配置则使用默认值 admin / user1,显式配置为空时终止 Manager 部署# IDENTITY_ADMIN_PASSWORD=""# IDENTITY_USER1_PASSWORD=""EOF