Securing Materialized Views: a Rewriting-Based Approach Sarah Nait - - PowerPoint PPT Presentation

securing materialized views a rewriting based approach
SMART_READER_LITE
LIVE PREVIEW

Securing Materialized Views: a Rewriting-Based Approach Sarah Nait - - PowerPoint PPT Presentation

Securing Materialized Views: a Rewriting-Based Approach Sarah Nait Bahloul, Emmanuel Coquery and Mohand-Sad Hacid Universit de Lyon, France First Franco-American Workshop Security Outline Context Problem statement Related work


slide-1
SLIDE 1

Securing Materialized Views: a Rewriting-Based Approach

Sarah Nait Bahloul, Emmanuel Coquery and Mohand-Saïd Hacid Université de Lyon, France

First Franco-American Workshop Security

slide-2
SLIDE 2

Outline

฀ Context ฀ Problem statement ฀ Related work ฀ Authorization views ฀ Rewriting-based approach ฀ Approach properties ฀ Security ฀ Termination ฀ Maximality ฀ Conclusion

1

slide-3
SLIDE 3

Context

  • Data security

○ Confidentiality, Integrity, Availability,…

  • Materialized views

○ Used in decision and distributed systems: Data

warehouses, Mediators, …

○ Store the results returned by a query ■

They can be used as any other table.

➔ Ensuring confidentiality of materialized view data is also important.

2

slide-4
SLIDE 4

Problem Statement

  • How to ensure Security at the materialized view level?

3

DB Access Control Policies on DB

Query

User

Query Evaluation Query

MV Views Definition Access Control Policies on MV

Inference

slide-5
SLIDE 5

Related Work

4 Granularity Derived access control policies

[Ros&Sci IFIP’01]

Coarse Defined on base relations

[Cuz&al. IDEAS’10]

Fine Defined on base relations Our approach Fine Defined on MVs

slide-6
SLIDE 6

Our approach

5

DB Authorization views on DB (AV) MV

?

Definition of MVs

HMiniCon+ Algorithm

Query evaluation

➔ Relational framework ➔ Conjunctive queries by allowing equalities

Definition of MV

Set of authorization views based on MV Authorization views on MV ➔ HMiniCon: MiniCon algorithm in the security context Desired properties: Secure and Maximum

slide-7
SLIDE 7

Desired Properties

6

  • Security: The generated views should not give access to

information that are not allowed by the basic authorization views.

  • Maximality: Generated views should return as much

information as possible, while satisfying the secure property.

slide-8
SLIDE 8

Access control policies

  • Fine grained Access Control model based on

“Authorization Views” [Riz&al. SIGMOD’04].

○ Authorization views are logical tables that specify exactly

the accessible data, either drawn from a single table or from multiple tables.

○ An authorization view can be a traditional relational view

  • r a parameterized view

Allowing fine grained authorization at the cell-level.

Parameterized views provide an efficient and powerful way of expressing fine grained authorization policies.

7

slide-9
SLIDE 9

Access control policies - Example

Relations:

patients (IdP, IdD, Snum, Pname, Pfname, Disease).

Create authorization view patients_info as SELECT Pname, Pfname

FROM patients

WHERE Snum = 1;

Datalog:

patients_info (Pname, Pfname) ← patients (IdP, IdD, Snum, Pname, Pfname, Disease), Snum = 1;

8

slide-10
SLIDE 10

Access control policies

  • Authorization-transparent querying

A Query makes reference to base relations

System can

Accept the query, if it can rewrite it using only authorization views

Reject the query

  • Directly Querying only the authorization views
  • Our proposal is independent of the way the MV(s) are

accessed. ○

We assume in our approach that the user can query only the authorization views.

9

slide-11
SLIDE 11

Information non-disclosure

  • Determine which set of tuples can be accessed

without disclosure information.

Authorization view: av(x’) ← patients(x’,y’). Materialized view definition: mv(x) ← patients(x,y), emergency(x,y). Authorization view on the materialized view: avmv(x) ← mv(x).

  • There is no authorized access to mv to ensure the information

non-disclosure.

10

slide-12
SLIDE 12

HMiniCon Algorithm

  • Adaptation of a query rewriting algorithm to the

security context.

  • MiniCon algorithm: proposed as an efficient method

for answering queries using views [Pot&Lev VLDB’00] . ○ It takes as input a query q and a set of views V and

calculates all possible rewritings of q using views in V, such that:

rw c q

  • Condition: Each rewriting must have the same head

variables as the query.

11

slide-13
SLIDE 13

Why adapt MiniCon?

12

Query: q(x,y) ← patients(x,y). Views: v(x’) ← patients(x’,y’).

  • For the traditional MiniCon Algorithm, this view is not

relevant. ○

The condition regarding the head variables is not satisfied.

  • In the security context, this view is relevant

Conjunctive rewriting: rw(x) ← v(x).

➔ First adaptation: Relaxing the condition on the head variables. ➔ Second adaptation: Adding variables that are newly

introduced in the rewriting as head variables.

slide-14
SLIDE 14

Double rewriting

13

  • It Exploits a double query rewriting based on the

HMiniCon query rewriting algorithm.

  • It takes as input a set Q of queries to be rewritten and

two sets of views AV and MV

➔ Q: Complete queries on MV ➔ AV: Authorization views ➔ MV: Materialized views definitions

slide-15
SLIDE 15

HMiniCon+

14

Subsumption test : If rw contains q Queries (Full access on MV) For each query q For each rewriting rw No Yes Generated views Add rw to queries

Rewriting using AV Rewriting using MV

slide-16
SLIDE 16

Properties of HMiniCon+ Algorithm

15

slide-17
SLIDE 17

Security property

16

Property: Given the three sets AV, MV and AVMV (the set

  • f generated views by HMiniCon+ algorithm), For each

query on AVMV, there exists: qAVMV ≡ qAV et qAVMV ≡ qMV

slide-18
SLIDE 18

Termination

17

  • Rewriting tree
  • Atom tree
  • History of a node
slide-19
SLIDE 19

Rewriting Tree

18

  • Let q be a query to rewrite, AV and

MV are two sets of views. The rewriting tree associated with q is defined as follows: ○

The root is the query q.

The nodes of depth k+1 are rewritings generated by the HMiniCon algorithm by rewriting nodes of depth k using the set AV or MV.

A node nk+1is a child of a node nk if nk+1 is a rewriting of nk.

Views returned by the algorithm

q rw12 rw23 rw32 rw41 rw13 rw11 rw21 rw22 rw31

slide-20
SLIDE 20

Atom tree

19

  • Given a branch X = B0,B1,... of

a rewriting tree RT , the atom tree AT of RT is defined as: ○

The root is an anonymous node r.

Nodes at depth k+1 are

  • ccurrences of atoms of Bk,

noted gk.

gk+1is a child of gk of type:

➔ Direct: If it is mapped to gk at the construction of the rewriting ➔ Indirect: If gk+1 belongs to the expansion of view v used to rewrite gk and gk+1 has no Direct parent.

patients (x,y)

treatments (y1, z2)

patients (x, y1) patients (x, y1)

treatments (y1, z3) doctors (z3, t1)

Direct child Indirect child Anonymous node

q rw12 rw23

slide-21
SLIDE 21

Potential infinite loop in the rewriting process Example 1

20

MV: mv1 (x,y) ← r1 (x,y). mv2 (x,y) ← r2(x,y),r1(y,z). AV: av1 (x,y) ← r1(x,y),r2(y,z). av2 (x,y) ← r2(x,y).

r1 (x,y) r1 (x, y1) r2 (y1, y2) r1 (x, y1) r2 (y1, y3) r1 (y3, y4) r1 (x, y5) r2 (y5, y3) r1 (y3, y6) r2 (y6, y7) r1 (x, y5) r2 (y5, y8) r1 (y8, y6) r2 (y6, y9) r1 (y9, y10) av1 mv2 av1 mv2

slide-22
SLIDE 22

21

MV: mv1(x,y) ← r1(x,y),r3(y,z). mv2(x,y) ← r2(x,y). mv3(x,y) ← r3(x,y). AV: av1(x,y) ← r1(x,y),r2(y,z). av2(x,y) ← r2(x,y). av3(x,y) ← r3(x,y).

r1 (x,y) r3 (y,z1) r1 (x,y) r2 (y, z2) r3 (y, z1) r3 (y, z3) r2 (y, z2) r3 (y, z1) r2 (y, z4) r1 (x,y) r3 (y, z5) r2 (y, z4) r2 (y, z2) r2 (y, z2) r3 (y, z1) r3 (y, z1) r3 (y, z3) r3 (y, z3) r1 (x,y) r1 (x,y) av1 mv1 av1 mv1

Potential infinite loop in the rewriting process Example 2

slide-23
SLIDE 23

Node information

22

  • For each node, we have:

○ view(gk+1) = v; ○ cpos(gk+1) the position of

the atom matching gk+1in v;

○ ppos(gk+1) the position of

the atom matching gk in v;

○ type(gk+1) = Direct or

Indirect

patients (x,y)

treatments (y1, z2)

patients (x, y1) patients (x, y1)

treatments (y1, z3) doctors (z3, t1)

Direct child Indirect child

View: av1 Cpos: 2 Ppos:1

Anonymous node

slide-24
SLIDE 24

History of nodes

  • For each node g in AT except for the root, History(g) is

a list defined as follows: ○ if g is a child of the root, then History(g) = [pos] where pos

is the position of g in the query;

○ if type(g) = Indirect then:

History(g) = History(parent(g)) + [(view(g),cpos(g),ppos(g))]

○ otherwise, History(g) = History(parent(g))

23

slide-25
SLIDE 25

History of nodes - Example

24 r1 (x,y) r1 (x, y1) r2 (y1, y2) r1 (x, y1) r2 (y1, y3) r1 (y3, y4) r1 (x, y5) r2 (y5, y3) r1 (y3, y6) r2 (y6, y7) r1 (x, y5) r2 (y5, y8) r1 (y8, y6) r2 (y6, y9) r1 (y9, y10)

[1,[av1,1,2]] [1,[av1,1,2],[mv2,1,2] ,[av1,1,2]] [1] [1] [1,[mv1,1,2],[av2,1,2]]

av1 mv2 mv2 av1

slide-26
SLIDE 26

Real VS Virtual nodes

25 r1 (x,y) r3 (y,z1) r1 (x,y) r2 (y, z2) r3 (y, z1) r3 (y, z3) r2 (y, z2) r3 (y, z1) r2 (y, z4) r1 (x,y) r3 (y, z5) r2 (y, z4) r2 (y, z2) r2 (y, z2) r3 (y, z1) r3 (y, z1) r3 (y, z3) r3 (y, z3) r1 (x,y) r1 (x,y)

Real node Virtual node [1,[mv1,1,2]]

slide-27
SLIDE 27

Termination under constraints

26

Theorem 1 Let us consider a query q and two sets of views AV and MV. If for every branch X of the effective rewriting tree RT (q) generated by HMiniCon+(q, AV, MV) and for every node g of the atom tree AT of X, History (g) does not contain any duplicate triple, then RT is finite.

slide-28
SLIDE 28

Maximality property

27

Property: Given the three sets AV, MV and AVMV (the set

  • f generated views by HMiniCon+ algorithm) and for each

query on AV and each query on MV, such that: qAV≡ qMV Then, there exists a query on AVMV, such that: qAVMV ≡ qAV ≡ qMV

slide-29
SLIDE 29

Conclusion

28

  • An automated method to generate access control

policies for materialized views.

  • An adaptation of a query rewriting algorithm.
  • Conjunctive queries with equalities
  • A secure and maximal approach
  • Study the maximality property in case of infinite

rewrting trees

  • Queries with aggregate functions..
slide-30
SLIDE 30

Bibliography

29

฀ [Ros&Sci CAISE’00] A. Rosenthal and E. Sciore. View security as the basis

for data warehouse security.

฀ [Cuz&al. IDEAS’10] A. Cuzzocrea, M.-S. Hacid, and N. Grillo. Effectively

and efficiently selecting access control rules on materialized views over relational databases.

฀ [Pot&Lev VLDB’00] R. Pottinger and A. Y. Levy. A scalable algorithm for

answering queries using views.

฀ [Riz&al. SIGMOD’04] S. Rizvi, A. O. Mendelzon, S. Sudarshan, and P.

  • Roy. Extending query rewriting techniques for fine-grained access control.
slide-31
SLIDE 31

THANK YOU FOR YOUR ATTENTION