[Feature request] Support configuring initial credentials via environment variables
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- docker-compose, helm, java, kubernetes
- 领域
- authentication, database, devops
调研方向
首先定位用于初始化服务器和凭据的 IoTDB 入口点或启动脚本。跟踪初始 root 账户的创建方式,然后确定在首次启动期间可能读取 IOTDB_USER 和 IOTDB_PASSWORD 的位置。当容器化部署能够提供这些变量,并使用所请求的凭据启动而无需手动执行 ALTER USER 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Search before asking
- I searched in the issues and found nothing similar.
Motivation
When deploying IoTDB in a containerized or orchestrated environment (e.g. Kubernetes), there is currently no way to set the initial user credentials through environment variables. The only documented approach is to start the server with default credentials, manually connect, and run:
ALTER USER root SET PASSWORD 'newpwd';
This is impractical for automated deployments where manual intervention is not an option.
Requested behavior:
The entrypoint/startup scripts should check for the presence of environment variables — for example IOTDB_USER and IOTDB_PASSWORD — and, if set, apply those credentials automatically on first startup. This would allow orchestration tools (Helm charts, Docker Compose, etc.) to inject credentials via secrets without requiring a manual post-deploy step.
Use case:
- name: IOTDB_USER
valueFrom:
secretKeyRef:
name: iotdb-secret
key: iotdb-user
- name: IOTDB_PASSWORD
valueFrom:
secretKeyRef:
name: iotdb-secret
key: iotdb-password
In a Kubernetes Helm chart, we inject IOTDB_USER and IOTDB_PASSWORD into the pod spec from a Secret:
The environment variables are present inside the container, but IoTDB ignores them entirely. The server starts with the default root/root credentials regardless.
Solution
If IOTDB_USER and IOTDB_PASSWORD are set, the startup scripts should apply them (e.g. by running the equivalent of ALTER USER root SET PASSWORD ...) so the instance is ready to use with the desired credentials without manual intervention.
Alternatives
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
- 主要语言
- Java
- 星标
- 6.4k
- 派生
- 1.2k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 152
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iotdb 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
apache/iotdb#18655 · 1 个 reaction ·
维护者通常 1 天内回复
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports success未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
ci-failure-cause test-failure
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
nextcloud/notes-android#3367 ·
维护者通常 1 天内回复
-
:wave: team-triage a:chore in:isolated-projects in:kotlin-dsl
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复