# US 2019/0243987 A1 · Fine-grained access control for data manipulation language (dml) operations on relational data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0243987 A1
- Document ID: US20190243987A1
- Status: Published application
- Kind: A1
- Application number: 16/384,283
- Filed: 2019-04-15
- Published: 2019-08-08
- Earliest claimed: 2016-08-31
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Tanvir Ahmed; Yi Ru; Chao Liang; Vikram Reddy Pesati
- Web page: https://patentgrep.com/patent/US20190243987A1

## CPC

- G06F 21/6227: {where protection concerns the structure of data, e.g. records, types, queries}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/252: {between a Database Management System and a front-end application}
- G06F 16/284: {Relational databases}
- H04L 63/101: {Access control lists [ACL]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Embodiments allow, within database security policies, the grant of data change operation-specific privileges to particular users to be applied within particular data realms in a given table. Furthermore, according to one or more embodiments, User Privilege column-level privileges are explicitly associated with one or more data access operations such that the grant of such a column-level privilege allows the user to perform only those data access operations that are explicitly associated with the column-level privilege. Enforcement of the data security policies includes prevention of data leakage via WHERE and RETURNING INTO clauses. According to one or more embodiments, a two-phase rewrite is used to optimize enforcement of column-level privileges. During the two-phase rewrite of a given query, the privileges checked during enforcement of the User Privilege data security policies are pruned to avoid unnecessary privilege checks given the columns that are accessed in the query.

## Claims

### Claim 1

A method comprising:
storing data that establishes one or more privilege rules that:
assign an operation-specific privilege to one or more users to perform a particular data change operation within a subset of rows in a database table within a database, and
assign a column-level operation-specific privilege, associated with the particular data change operation, to one or more columns of said database table;
via a database session established for a particular user, of the one or more users, receiving a data manipulation language (DML) statement that specifies the particular data change operation to at least one row of said subset of rows and to a column of said one or more columns, said database session including a particular security context for the particular user;
based, at least in part, on the one or more privilege rules and the particular security context of the particular user, allowing the particular data change operation;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The method of claim 1, wherein assigning an operation-specific privilege to one or more columns in said database table includes assigning an operation-specific privilege to a plurality of columns that include said one or more columns, wherein said DML statement does not specify to perform said particular data change operation on at least one of said plurality of columns.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the one or more users are each assigned a particular user role; and
the one or more privilege rules assign the operation-specific privilege to the one or more users based on assigning the operation-specific privilege to the particular user role.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
creating a user privilege application session for the particular user, wherein the user privilege application session comprises: (a) the particular security context, and (b) one or more operation-specific privileges granted to the user based on the one or more privilege rules;
attaching the user privilege application session to the database session;
wherein said allowing the particular data change operation based, at least in part, on the one or more privilege rules and the particular security context of the particular user, is performed based on the user privilege application session attached to the database session.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving one or more data definition language (DDL) statements that establish the one or more privilege rules;
wherein storing the data that establishes the one or more privilege rules is performed based on receiving the one or more DDL statements.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the one or more privilege rules assign the operation-specific privilege, to perform the particular data change operation, to the particular user within the subset of rows in the database table by:
mapping a particular access control list (ACL) to the subset of rows in the database table;
wherein the particular ACL maps particular user data, associated with the particular user, to the operation-specific privilege; and
the method further comprises:
identifying, based on the one or more privilege rules, the particular ACL that is mapped to the subset of rows in the database table;
determining that the identified particular ACL maps the particular user data, associated with the particular user, to the operation-specific privilege to perform the particular data change operation specified by the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the identified particular ACL maps the particular user data to the operation-specific privilege.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
determining whether the one or more privilege rules assign, to the particular user, both (a) the operation-specific privilege to perform the particular data change operation within the subset of rows in the database table, and (b) the column-level operation-specific privilege;
wherein allowing the particular data change operation is performed in response to determining that the one or more privilege rules assign, to the particular user, both (a) the operation-specific privilege to perform the particular data change operation within the subset of rows in the database table, and (b) the column-level operation-specific privilege.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
determining, based at least in part on the one or more privilege rules, whether the particular user is authorized to select particular data that is referenced within a WHERE clause of the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the particular user is authorized to select the particular data that is referenced within the WHERE clause of the DML statement.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
determining, based at least in part on the one or more privilege rules, whether the particular user is authorized to select particular data that is referenced within a RETURNING INTO clause of the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the particular user is authorized to select the particular data that is referenced within the RETURNING INTO clause of the DML statement.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
determining that the DML statement updates a plurality of values within a particular row of the subset of rows;
in response to determining that the DML statement updates the plurality of values within the particular row of the subset of rows:
based, at least in part, on the one or more privilege rules, determining whether the particular user is authorized to update all of the plurality of values within the particular row,
responsive to determining that the particular user is authorized to update all of the plurality of values within the particular row, allowing the DML statement to update the plurality of values within the particular row, and
responsive to determining that the particular user is not authorized to update all of the plurality of values within the particular row, disallowing the DML statement to update any values within the particular row.

### Claim 11

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
storing data that establishes one or more privilege rules that:
assign an operation-specific privilege to one or more users to perform a particular data change operation within a subset of rows in a database table within a database, and
assign a column-level operation-specific privilege, associated with the particular data change operation, to one or more columns of said database table;
via a database session established for a particular user, of the one or more users, receiving a data manipulation language (DML) statement that specifies the particular data change operation to at least one row of said subset of rows and to a column of said one or more columns, said database session including a particular security context for the particular user;
based, at least in part, on the one or more privilege rules and the particular security context of the particular user, allowing the particular data change operation.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein assigning an operation-specific privilege to one or more columns in said database table includes assigning an operation-specific privilege to a plurality of columns that include said one or more columns, wherein said DML statement does not specify to perform said particular data change operation on at least one of said plurality of columns.

### Claim 13 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein:
the one or more users are each assigned a particular user role; and
the one or more privilege rules assign the operation-specific privilege to the one or more users based on assigning the operation-specific privilege to the particular user role.

### Claim 14 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
creating a user privilege application session for the particular user, wherein the user privilege application session comprises: (a) the particular security context, and (b) one or more operation-specific privileges granted to the user based on the one or more privilege rules;
attaching the user privilege application session to the database session;
wherein said allowing the particular data change operation based, at least in part, on the one or more privilege rules and the particular security context of the particular user, is performed based on the user privilege application session attached to the database session.

### Claim 15 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
receiving one or more data definition language (DDL) statements that establish the one or more privilege rules;
wherein storing the data that establishes the one or more privilege rules is performed based on receiving the one or more DDL statements.

### Claim 16 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein:
the one or more privilege rules assign the operation-specific privilege, to perform the particular data change operation, to the particular user within the subset of rows in the database table by:
mapping a particular access control list (ACL) to the subset of rows in the database table;
wherein the particular ACL maps particular user data, associated with the particular user, to the operation-specific privilege; and
the instruction further comprise instructions that, when executed by one or more processors, cause:
identifying, based on the one or more privilege rules, the particular ACL that is mapped to the subset of rows in the database table;
determining that the identified particular ACL maps the particular user data, associated with the particular user, to the operation-specific privilege to perform the particular data change operation specified by the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the identified particular ACL maps the particular user data to the operation-specific privilege.

### Claim 17 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
determining whether the one or more privilege rules assign, to the particular user, both (a) the operation-specific privilege to perform the particular data change operation within the subset of rows in the database table, and (b) the column-level operation-specific privilege;
wherein allowing the particular data change operation is performed in response to determining that the one or more privilege rules assign, to the particular user, both (a) the operation-specific privilege to perform the particular data change operation within the subset of rows in the database table, and (b) the column-level operation-specific privilege.

### Claim 18 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
determining, based at least in part on the one or more privilege rules, whether the particular user is authorized to select particular data that is referenced within a WHERE clause of the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the particular user is authorized to select the particular data that is referenced within the WHERE clause of the DML statement.

### Claim 19 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
determining, based at least in part on the one or more privilege rules, whether the particular user is authorized to select particular data that is referenced within a RETURNING INTO clause of the DML statement; and
wherein allowing the particular data change operation is performed in response to determining that the particular user is authorized to select the particular data that is referenced within the RETURNING INTO clause of the DML statement.

### Claim 20 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instruction further comprise instructions that, when executed by one or more processors, cause:
determining that the DML statement updates a plurality of values within a particular row of the subset of rows;
in response to determining that the DML statement updates the plurality of values within the particular row of the subset of rows:
based, at least in part, on the one or more privilege rules, determining whether the particular user is authorized to update all of the plurality of values within the particular row,
responsive to determining that the particular user is authorized to update all of the plurality of values within the particular row, allowing the DML statement to update the plurality of values within the particular row, and
responsive to determining that the particular user is not authorized to update all of the plurality of values within the particular row, disallowing the DML statement to update any values within the particular row.
