UltipaDocs
Try Playground
    • Install Ultipa
    • Install Ultipa Manager
  • License
    • Meta Servers
    • Shard Servers
    • HDC Servers
    • Vector Servers
    • Server Statistics
    • Privilege
    • Role (Policy)
    • User
  • Backup and Restore
  1. Docs
  2. /
  3. Operations & Maintenance
  4. /
  5. Access Control

Privilege

Overview

Privileges are a fundamental access control mechanism that define the operations a user is authorized to perform within a database. They play a critical role in enforcing security by restricting access to specific actions, such as querying data, modifying records, or administering the system. Privileges can be granted to roles (or policies), or assigned directly to individual users.

Ultipa defines privileges at three levels—System, Graph, and Property—to support fine-grained access control.

Showing Privileges

To list all defined graph and system privileges:

UQL
show().privilege()

This will return a table _privilege, as shown below:

graphPrivilegessystemPrivileges
["READ","INSERT","UPSERT","UPDATE","DELETE","CREATE_SCHEMA","DROP_SCHEMA","ALTER_SCHEMA","SHOW_SCHEMA","RELOAD_SCHEMA","CREATE_PROPERTY","DROP_PROPERTY","ALTER_PROPERTY","SHOW_PROPERTY","CREATE_FULLTEXT","DROP_FULLTEXT","SHOW_FULLTEXT","CREATE_INDEX","DROP_INDEX","SHOW_INDEX","LTE","UFE","CLEAR_JOB","STOP_JOB","SHOW_JOB","ALGO","CREATE_PROJECT","SHOW_PROJECT","DROP_PROJECT","CREATE_HDC_GRAPH","SHOW_HDC_GRAPH","DROP_HDC_GRAPH","COMPACT_HDC_GRAPH","SHOW_VECTOR_INDEX","CREATE_VECTOR_INDEX","DROP_VECTOR_INDEX","SHOW_CONSTRAINT","CREATE_CONSTRAINT","DROP_CONSTRAINT"]["TRUNCATE","COMPACT","CREATE_GRAPH","SHOW_GRAPH","DROP_GRAPH","ALTER_GRAPH","TOP","KILL","STAT","SHOW_POLICY","CREATE_POLICY","DROP_POLICY","ALTER_POLICY","SHOW_USER","CREATE_USER","DROP_USER","ALTER_USER","SHOW_PRIVILEGE","SHOW_META","SHOW_SHARD","ADD_SHARD","DELETE_SHARD","REPLACE_SHARD","SHOW_HDC_SERVER","ADD_HDC_SERVER","DELETE_HDC_SERVER","LICENSE_UPDATE","LICENSE_DUMP","GRANT","REVOKE","SHOW_BACKUP","CREATE_BACKUP","SHOW_VECTOR_SERVER","ADD_VECTOR_SERVER","DELETE_VECTOR_SERVER"]

System Privileges

System privileges encompass operations for managing various aspects of the database, including graphs, processes, privileges, policies, users, servers, and more.

Ultipa supports the following system privileges:

Privilege
Description
TRUNCATETruncates graphs in database.
COMPACTCompacts graphs in database.
CREATE_GRAPHCreates graphs in database.
SHOW_GRAPHShows graphs in database.
DROP_GRAPHDrops graphs in database.
ALTER_GRAPHAlters graphs in database.
TOPShows processes in database.
KILLKills processes in database.
STATShows database statistics.
SHOW_POLICYShows roles (policies) in database.
CREATE_POLICYCreates roles (policies) in database.
DROP_POLICYDrops roles (policies) in database.
ALTER_POLICYAlters roles (policies) in database.
SHOW_USERShows users in database.
CREATE_USERCreates users in database.
DROP_USERDrops users in database.
ALTER_USERAlters users in database.
SHOW_PRIVILEGEShows privileges in database.
GRANTGrants privileges and roles (policies).
REVOKERevokes privileges and roles (policies).
SHOW_METAShow meta servers of the database.
SHOW_SHARDShow shard servers of the database.
ADD_SHARDAdds shard servers to the database.
REPLACE_SHARDAlters the replica addresses of a shard server.
DELETE_SHARDDeletes shard servers from the database.
SHOW_HDC_SERVERShow HDC servers of the database.
ADD_HDC_SERVERAdds HDC servers to the database.
DELETE_HDC_SERVERDeletes HDC servers from the database.
SHOW_VECTOR_SERVERShow vector servers of the database.
ADD_VECTOR_SERVERAdds vector servers to the database.
DELETE_VECTOR_SERVERDeletes vector servers from the database.
LICENSE_UPDATEUpdates license of the database.
LICENSE_DUMPDumps license of the database.
SHOW_BACKUPShows backups of the database.
CREATE_BACKUPCreates backups for the database.

Graph Privileges

Graph privileges govern operations related to accessing and modifying the data and structure of specific graphs. They also include permissions for managing associated elements such as indexes, jobs, and HDC graphs.

Ultipa supports the following graph privileges:

Privilege
Description
READReads data from graphs.
INSERTInserts nodes and edges into graphs.
UPSERTUpdates or inserts nodes and edges in graphs.
UPDATEUpdates nodes and edges in graphs.
DELETEDeletes nodes and edges in graphs.
CREATE_SCHEMACreates schemas in graphs.
DROP_SCHEMADrops schemas in graphs.
ALTER_SCHEMAAlters schemas in graphs.
SHOW_SCHEMAShows schemas in graphs.
RELOAD_SCHEMAReloads the total number of nodes and edges in graphs.
CREATE_PROPERTYCreates properties in graphs.
DROP_PROPERTYDrops properties in graphs.
ALTER_PROPERTYAlters properties in graphs.
SHOW_PROPERTYShows properties in graphs.
CREATE_FULLTEXTCreates full-text indexes in graphs.
DROP_FULLTEXTDrop full-text indexes in graphs.
SHOW_FULLTEXTShows full-text indexes in graphs.
CREATE_VECTOR_INDEXCreates vector indexes in graphs.
DROP_VECTOR_INDEXDrop vector indexes in graphs.
SHOW_VECTOR_INDEXShows vector indexes in graphs.
CREATE_INDEXCreates indexes in graphs.
DROP_INDEXDrops indexes in graphs.
SHOW_INDEXShows indexes in graphs.
LTELoads properties from disk into the computing engine.
UFEUnloads properties from the computing engine.
CLEAR_JOBClear jobs in graphs.
STOP_JOBStops jobs in graphs.
SHOW_JOBShows jobs in graphs.
ALGORuns algorithms for graphs.
CREATE_PROJECTCreates distributed projections for graphs.
SHOW_PROJECTShows distributed projections of graphs.
DROP_PROJECTDrops distributed projections of graphs.
CREATE_HDC_GRAPHCreates HDC graphs.
SHOW_HDC_GRAPHShows HDC graphs.
DROP_HDC_GRAPHDrops HDC graphs.
COMPACT_HDC_GRAPHCompacts HDC graphs.

Property Privileges

Property privileges provide more granular control over read and write permissions to specific properties within graphs. If no property privileges are explicitly defined, all properties are granted read and write permissions by default.

Ultipa supports the following property privileges:

Privilege
Description
READGrants permission to read certain properties in graphs.
WRITEGrants permission to read and write certain properties in graphs.
DENYExplicitly denies read and write access to certain properties. If both DENY and READ (or WRITE) are assigned to a property, DENY takes precedence.

If the READ privilege for the name property of the user nodes is not granted:

Operation
Examples
Return the propertyMATCH (n:user) RETURN n
This GQL query excludes the name property from the returned node information.

MATCH (n:user) RETURN n.name
This GQL query throws an error as you cannot read the name property.
Filter the propertyMATCH (n:user {name: "johndoe"}) RETURN n
This GQL query throws an error as you cannot read the name property.
ExportYou cannot export the properties which you cannot read.

If the WRITE privilege for the name property of the user nodes is not granted:

Operation
Examples
InsertINSERT (:user {_id: "U873", name:"johndoe"})
This GQL query throws an error as you cannot write the name property.
UpdateMATCH (n:user {_id: "U873"}) SET n.name = "johndoe"
This GQL query throws an error as you cannot write the name property.
DeleteYou can still delete properties from the graph structure even if you don't have corresponding WRITE property privilege, but it requires the DROP_PROPERTY graph privilege.