Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      Policy

      Overview

      A policy is a set of privileges designed for a specific user role, often encompassing multiple privileges and other policies. Effective policy design and usage enable role-based access control.

      Showing Policies

      To list all policies of the database:

      show().policy()
      

      Or retrieves a specific policy, such as the one named manager:

      show().policy("manager")
      

      It returns a table _policy with the following fields:

      Field
      Description
      name Name of the policy.
      graphPrivileges Graph privileges included in the policy.
      systemPrivileges System privileges included in the policy.
      propertyPrivileges Property privileges included in the policy.
      policies Other policies included in the policy.

      Creating a Policy

      The create().policy().params() statement creates a policy for the database.

      Syntax

      create().policy("<name>").params({
        graph_privileges: {
          "<graph>": ["<graphPriv>", "<graphPriv>", ...],
          ...
        }, 
        system_privileges: ["<systemPriv>", "<systemPriv>", ...], 
        property_privileges: {
          "node": {
            "<propertyPriv>": [
              ["<graph>", "<schema>", "<property>"],
              ...
            ],
            ...
          },
          "edge": {
            "<propertyPriv>": [
              ["<graph>", "<schema>", "<property>"],
              ...
            ],
            ...
          }
        },
        policies: ["<policyName>", "<policyName>", ...]
      })
      
      Method Param Description
      policy() <name> The unique name of the policy. Naming conventions are:
      • 2 to 64 characters.
      • Begins with a letter.
      • Allowed characters: letters (A-Z, a-z), numbers (0-9) and underscores (_).
      params() graph_privileges Specifies graph privileges for each graphset to include in the policy; uses "*" to specify all graphsets.
      system_privileges Specifies system privileges to include in the policy.
      property_privileges Specifies node and edge property privileges to include in the policy; uses ["*", "*", "*"] to specify all graphsets, all schemas, or all properties.
      policies Specifies policies to include in the policy.

      Examples

      To create a policy called superADM that includes all graph and system privileges, along with write privilege for all properties, without involving any other policies:

      create().policy("superADM").params({
        graph_privileges: {"*":["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"]},
        system_privileges: ["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","SHOW_HDC_SERVER","ADD_HDC_SERVER","DELETE_HDC_SERVER","LICENSE_UPDATE","LICENSE_DUMP"],
        property_privileges: {
          "node": {"write": [["*", "*", "*"]]},
          "edge": {"write": [["*", "*", "*"]]}
        }
      })
      

      To create a policy called Tester that includes:

      • Graph privileges: UPDATE for all graphsets
      • System privileges: SHOW_POLICY, ALTER_GRAPH
      • Property privileges:
        • read all node properties for all schemas in all graphsets
        • write edge properties value and time for all schemas in the graphset Tax
        • deny (Do not allow read and write) edge property score for the schema rate in the graphset miniCircle
      • Policies: manager
      create().policy("Tester").params({
        graph_privileges: {"*": ["UPDATE"]}, 
        system_privileges: ["SHOW_POLICY", "ALTER_GRAPH"],
        property_privileges: {
          "node": {
            "read": [
              ["*", "*", "*"]
            ]
          },
          "edge": {
            "write": [
              ["Tax", "*", "value"],
              ["Tax", "*", "time"]
            ],
            "deny": [
              ["miniCircle", "rates", "score"]
            ]
          }
        },
        policies: ["manager"]
      })
      

      Altering a Policy

      You can alter the privileges and policies included in a policy using the alter().policy().set() statement.

      Syntax

      alter().policy("<name>").set({
        graph_privileges: {
          "<graph>": ["<graphPriv>", "<graphPriv>", ...],
          ...
        }, 
        system_privileges: ["<systemPriv>", "<systemPriv>", ...], 
        property_privileges: {
          "node": {
            "<propertyPriv>": [
              ["<graph>", "<schema>", "<property>"],
              ...
            ],
            ...
          },
          "edge": {
            "<propertyPriv>": [
              ["<graph>", "<schema>", "<property>"],
              ...
            ],
            ...
          }
        },
        policies: ["<policyName>", "<policyName>", ...]
      })
      
      Method Param Description
      policy() <name> Name of the policy.
      set() graph_privileges Specifies new graph privileges for each graphset to include in the policy; uses "*" to specify all graphsets.
      system_privileges Specifies new system privileges to include in the policy.
      property_privileges Specifies new node and edge property privileges to include in the policy; uses ["*", "*", "*"] to specify all graphsets, all schemas, or all properties.
      policies Specifies new policies to include in the policy.

      Examples

      To modify graph privileges included in the sales policy while keeping other types of privileges and policies unchanged:

      alter().policy("Tester").set({graph_privileges: {"Tax": ["UPDATE"]}})
      

      To modify the graph and property privileges, and policies included in the manager policy while keeping the system privileges unchanged:

      alter().policy("manager").set({
        graph_privileges: {"*": ["UPDATE", "DELETE"]},
        property_privileges: {
          "node": {
            "write": [["miniCircle","*","*"]]
          },
          "edge": {
            "write": [["miniCircle","*","*"]]
          }
        },
        policies: ["sales"]
      })
      

      Dropping a Policy

      You can drop a policy using the drop().policy() statement.

      To drop the policy manager:

      drop().policy("manager")
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写