hongzhi-gao opened a new pull request, #19301: URL: https://github.com/apache/iotdb/pull/19301
## 问题 普通模式下,无 SECURITY 权限的用户执行 ALTER USER ... ACCOUNT UNLOCK 时,解锁语句误入 GRANT/REVOKE 鉴权分支,读取空权限列表触发 NPE,返回 305 内部错误,而非预期的 803 权限不足。 对自己、root 或指定 IP 执行解锁均受影响。 ## 修复 为 ACCOUNT_UNLOCK 增加独立鉴权分支,检查 SECURITY 权限,并使用目标用户名记录审计对象。 无权限用户返回 803;root 和拥有 SECURITY 权限的用户保持正常执行。不改变 GRANT/REVOKE 的鉴权逻辑。 ## 测试 已执行并通过: - 新增 IoTDBAuthIT#testAccountUnlockPermission,在 1 ConfigNode + 1 DataNode 环境通过 JDBC 验证三种解锁写法:无权限返回 803 并提示 SECURITY;root 执行成功;授予 SECURITY 后成功,撤销后再次返回 803。 - 现有 TreeAccessTest。 - clean 构建及 git diff --check。 本次 IT 节点日志未发现 NPE 或 INTERNAL_SERVER_ERROR 上述构建和测试在原修复分支执行;移植到最新 upstream/master 后通过 git diff --check,未重新执行构建及 IT。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
