incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

[Question]3pd-6store-3server 集群时,怎么开启鉴权?且3server鉴权数据是否相同?

Open Tommu10ve opened this issue 6 months ago • 1 comments

Problem Type (问题类型)

None

Before submit

  • [x] 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.5.0 (Apache Release Version)
  • Backend: RocksDB 6 nodes

Your Question (问题描述)

3pd-6store-3server 集群时,怎么开启鉴权?且3server鉴权数据是否相同?

Vertex/Edge example (问题点 / 边数据举例)


Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)


Tommu10ve avatar Jun 19 '25 09:06 Tommu10ve

在 3pd-6store-3server 集群环境下开启鉴权,推荐使用 StandardAuthenticator(即基于后端存储的鉴权)。只需在每台 server 的 rest-server.properties 配置文件中添加:

auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator
auth.graph_store=hugegraph

所有 server 的 graphs/hugegraph.properties 配置(除 data/wal 路径和端口外)必须完全一致,尤其是 raft 相关参数,确保 raft.group_peers 包含所有节点,且网络互通、数据目录可写。这样,鉴权数据(用户、角色等)会存储在后端数据库中,3 台 server 会自动同步,保证鉴权数据一致,无需手动同步,所有节点的鉴权状态始终保持一致[参考1]

如需 HTTP Basic Auth,默认超级管理员用户名为 admin,密码为你初始化时设置的密码,认证格式为 Authorization: Basic base64(admin:密码)[参考2]

总结:只要配置正确,3server 的鉴权数据是完全一致的,无需额外操作。

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jun 19 '25 09:06 dosubot[bot]

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jul 04 '25 21:07 github-actions[bot]