Built-in Roles

Nebula Graph 角色可分为以下几类:

  • God
    • 初始 Root 用户(类似于 Linux 系统中的 Root,和 Windows 系统中的 Administrator)。
    • 拥有所有操作权限。
    • 一个集群只能有一个 God。God 可管理集群内所有 space。
    • Meta 服务在初始化时会默认创建一个 GOD 角色的 Account,名为 root。
    • God 角色由 meta 自动初始化,且不支持用户自行授权成为 God。
  • Admin
    • 管理员用户。
    • 对权限内的 space 拥有 schema 和 data 的读/写权限。
    • 可对权限内的 space 进行用户授权。
  • DBA
    • 对权限内的 space 拥有 schema 和 data 的读/写权限。
    • 没有对用户受权的权限。
  • User
    • 对权限内的 space 拥有 data 的读/写权限。
    • 对权限内的 space 拥有 schema 只读权限。
  • Guest
    • 对权限内的 space 拥有 schema 和 data 的只读权限。

如果开启用户权限开关,则默认用户名为 root,默认密码为 nebula,且用户名不可更改。将 /usr/local/nebula/etc/nebula-graphd.conf 文件中的 enable_authorize 设置为 true 即可打开权限开关。

未被分配角色的用户将无权访问该 space。一个用户在同一个 space 中只能分配一个角色。一个用户在不同 space 可拥有不同权限。

各角色的 Executor 权限见下表。

按操作权限划分。

OPERATIONSTATEMENTS
Read spaceUse, DescribeSpace
Write spaceCreateSpace, DropSpace, CreateSnapshot, DropSnapshot, Balance, Admin, Config, Ingest, Download
Read schemaDescribeTag, DescribeEdge, DescribeTagIndex, DescribeEdgeIndex
Write schemaCreateTag, AlterTag, CreateEdge, AlterEdge, DropTag, DropEdge, CreateTagIndex, CreateEdgeIndex, DropTagIndex, DropEdgeIndex
Write userCreateUser, DropUser, AlterUser
Write roleGrant, Revoke
Read dataGo, Set, Pipe, Match, Assignment, Lookup, Yield, OrderBy, FetchVertices, Find, FetchEdges, FindPath, Limit, GroupBy, Return
Write dataBuildTagIndex, BuildEdgeIndex, InsertVertex, UpdateVertex, InsertEdge, UpdateEdge, DeleteVertex, DeleteEdges
Special operationShow, ChangePassword

按操作划分。

OPERATIONGODADMINDBAUSERGUEST
Read spaceYYYYY
Write spaceY
Read schemaYYYYY
Write schemaYYY
Write userY
Write roleYY
Read dataYYYYY
Write dataYYYY
Special operationYYYYY

注意: Special Operation 为特殊操作,例如 SHOW SPACE,每个角色都可以执行,但其执行结果只显示 Account 权限内的结果。