Security description framework
The present application discloses a method, system, and computer system for enforcing security with respect to a database. The system includes a database configured to receive a query, wherein the query is modified to comprise one or more security predicates; determine data to return in response to the query by examining the one or more security predicates with respect to security for a field; and return the determined data in response to the query.
1 . A system, comprising:
a system layer configured to:
receive a query; and
modify the query to comprise one or more security predicates; and
a database configured to:
receive the modified query from the system layer;
determine data to return in response to the modified query, wherein determining the data to return comprises extracting the one or more security predicates from the modified query and determining whether the one or more security predicates extracted from the modified query are consistent with one or more security descriptors for a field of the database; and
return the determined data in response to the modified query.
2 . The system as in claim 1 , wherein the database comprises an object-oriented database.
3 . The system as in claim 1 , wherein the security for the field is designated by having an attribute associated with a field type.
4 . The system as in claim 3 , wherein the attribute is stored as information in a row of the database.
5 . The system as in claim 1 , wherein the data comprises a set of database information from a plurality of fields.
6 . The system as in claim 1 , wherein the one or more security predicates are generated for the query after receiving the query and before modifying the query.
7 . The system as in claim 1 , wherein the security for the field of the database is preconfigured.
8 . The system as in claim 1 , wherein the one or more security predicates are indicative of one or more security privileges of a user.
9 . The system as in claim 8 , wherein the query corresponds to a request from the user.
10 . A method, comprising:
receiving a query, wherein the query comprises one or more security predicates;
determining, using a processor, data to return in response to the query, wherein determining the data to return comprises extracting the one or more security predicates from the query and determining whether the one or more security predicates extracted from the query are consistent with one or more security descriptors for a field of a database; and
returning the determined data in response to the query.
11 . The method as in claim 10 , wherein the database comprises an object-oriented database.
12 . The method as in claim 10 , wherein the security for the field is designated by having an attribute associated with a field type.
13 . The method as in claim 12 , wherein the attribute is stored as information in a row of the database.
14 . The method as in claim 10 , wherein the data comprises a set of database information from a plurality of fields.
15 . The method as in claim 10 , wherein the one or more security predicates are generated for the query after receiving the query.
16 . The method as in claim 10 , wherein the security for the field of the database is preconfigured.
17 . The method as in claim 10 , wherein the one or more security predicates are indicative of one or more security privileges of a user.
18 . The method as in claim 17 , wherein the query corresponds to a request from the user.
19 . A computer program product, the computer program product being embodied in a non-transitory computer readable medium and comprising computer instructions for:
receiving a query, wherein the query comprises one or more security predicates;
determining, using a processor, data to return in response to the query, wherein determining the data to return comprises extracting the one or more security predicates from the query and determining whether the one or more security predicates extracted from the query are consistent with one or more security descriptors for a field; and
returning the determined data in response to the query.
20 . The computer program product as in claim 19 , the computer program product comprising computer instructions for:
receiving a second query, wherein the second query is modified to comprise one or more second security predicates;
determining second data to return in response to the second query by examining the one or more second security predicates, comprised in the second query, with respect to one or more second security descriptors for a second field; and
returning the determined second data in response to the second query.