Privileges

A privilege is an approval to perform an operation on one or more Oracle NoSQL Database objects. In Oracle NoSQL Database, all privileges fall into the two general categories:

System Privileges

Oracle NoSQL Database provides the following system privileges, covering both data access and administrative operations:

Object Privileges

The object privileges defined in Oracle NoSQL Database are:

For more information on the privileges required by the user to access specific KVStore APIs as well as CLI commands, see KVStore Required Privileges.

The object privileges defined in Oracle NoSQL Database for namespaces are:

Table Ownership

When you are using a secure store, tables are owned by the user that created them. A table’s owner has by default full privileges to the table. That is, the owner has all the table object privileges. Note: For tables created in a non-secured store, or tables created prior to the 3.3 release, the table’s owner is null.

Once a table is created, its owner cannot be changed. If a table is dropped and then recreated, all previously granted table privileges must be granted again.

Parent and child tables are required to have the same owner. However, table privileges are not automatically granted to the table’s children. For example, if READ_TABLE is granted to table myTable, then that privilege is not automatically granted to any of that table’s children. To grant READ_TABLE to the child tables, you must individually grant the privilege to each child table in turn.

A table’s owner can grant or revoke all table privileges to or from other roles. To do this, use the GRANT DDL statement. (See Grant Roles or Privileges for details.) To make a user other than the owner be able to read/insert/delete a specific table, two conditions must be met:

  1. The user has the read/insert/delete privilege for the table in question; and

  2. The user has the same privilege, or read privilege, for all parent tables of that table.

For example, for table myTable and its child myTable.child1, a non-owner user can only insert data to myTable.child1 when she has insert privilege (or better) on myTable.child1, and read and/or insert privilege on myTable.

If you have one or more namespaces in your store, you can grant authorization permissions to a namespace to determine who can access both the namespace and the tables within it. For more details, see Granting Authorization Access to Namespaces.

Privilege Hierarchy

In Oracle NoSQL Database, there is a relationship between parts of existing privileges, called ‘implications’. Implication means that a privilege may be a superset of some other privileges.

For example, Privilege A implies (=>) B means that privilege A has all the permissions defined in privilege B.

The following illustration depicts all implication relationship among Oracle NoSQL Database privileges:

Figure 1 - Privilege Hierarchy

Description of image follows

Note: All implications are transitive, that is, if A=>B and B=>C, then A=>C.

You can perform read operation on a table in namespace ns1:t1 if the user has any of the following privileges specified: