A Formal Foundation for XrML Vicky Weissman Joint work with: Joseph Halpern.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Higher-Order Functions and Loops c. Kathi Fisler,
Possible World Semantics for Modal Logic
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Working with Discourse Representation Theory Patrick Blackburn & Johan Bos Lecture 3 DRT and Inference.
Current Techniques in Language-based Security David Walker COS 597B With slides stolen from: Steve Zdancewic University of Pennsylvania.
Authorization Policies Vicky Weissman
ISBN Chapter 3 Describing Syntax and Semantics.
CS 355 – Programming Languages
A Formal Foundation for XrML Vicky Weissman Joint work with Joe Halpern.
Extensible Semantics for XrML Vicky Weissman Joint work with Joe Halpern.
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
© Love Ekenberg The Algorithm Concept, Big O Notation, and Program Verification Love Ekenberg.
Using First-order Logic to Reason about Policies Vicky Weissman Joint work with: Joseph Halpern and Carl Lagoze.
Let remember from the previous lesson what is Knowledge representation
CS 4700: Foundations of Artificial Intelligence
A logic for reasoning about digital rights Riccardo Pucella, Vicky Weissman Cornell University.
A Formal Foundation for ODRL What’s ODRL?  An XML-based language for writing software licenses. Language specification includes:  syntax  English interpretation.
Towards a policy language for humans and computers Vicky Weissman Joint work with Carl Lagoze.
Rights management Vicky Weissman
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Describing Syntax and Semantics
Enterprise Privacy Promises and Enforcement Adam Barth John C. Mitchell.
Chapter 2: Algorithm Discovery and Design
CAS LX 502 Semantics 3a. A formalism for meaning (cont ’ d) 3.2, 3.6.
Intro to Discrete Structures
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
CAS LX 502 8b. Formal semantics A fragment of English.
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: Sequencing Properties Copyright , Matt Dwyer, John Hatcliff,
Pattern-directed inference systems
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
ECSE Software Engineering 1I HO 4 © HY 2012 Lecture 4 Formal Methods A Library System Specification (Continued) From Specification to Design.
CS6133 Software Specification and Verification
SecPAL Presented by Daniel Pechulis CS5204 – Operating Systems1.
CS 203: Introduction to Formal Languages and Automata
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
ece 627 intelligent web: ontology and beyond
1 Temporal logic. 2 Prop. logic: model and reason about static situations. Example: Are there truth values that can be assigned to x,y simultaneously.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
EEL 5937 Content languages EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
1 Authorization Sec PAL: A Decentralized Authorization Language.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Let’s Talk about Intellectual Property Copyright Plagiarism Fair Use.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
COMP 412, FALL Type Systems C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Artificial Intelligence Logical Agents Chapter 7.
Knowledge Representation Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
1 Interactive Computer Theorem Proving CS294-9 October 19, 2006 Adam Chlipala UC Berkeley Lecture 9: Beyond Primitive Recursion.
Decentralized Access Control: Policy Languages and Logics
ARTIFICIAL INTELLIGENCE
Elementary Metamathematics
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Alternating tree Automata and Parity games
Semantics In Text: Chapter 3.
Logics for Data and Knowledge Representation
6.001 SICP Variations on a Scheme
Predicates and Quantifiers
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

A Formal Foundation for XrML Vicky Weissman Joint work with: Joseph Halpern

2 The big picture A policy says that under certain conditions an action, such as downloading a file, is permitted or forbidden. Digital content providers want to write policies about how their works may be accessed, and they want their policies enforced.

3 Example - Entertainment Music/movie industries want to enforce policies that amount to `if the client has not paid to access the content, then she may not access it’. Industries might need this capability. British Video Association estimated that this year, 1.67million people downloaded illegal film/TV files; more than double last year’s estimate.

4 It’s not just about money Because we can’t regulate access to online content with precision: Digital libraries can’t put certain content online; it might violate IP laws. The Greek Orthodox Archdiocese of America is wary of defamation. Cultural traditions aren’t respected. (Australian Aboriginal communities often restrict access to a clan or gender.)

5 XrML to the rescue XrML is a language for writing policies. Syntax is XML-based. Semantics is given in 2 ways. 1.An English interpretation of the syntax. 2.An English description of an algorithm that says if a set of XrML policies imply a permission. Bottom line: write policies in XrML, enforce using the algorithm.

6 Industry likes XrML XrML endorsed by Adobe, Hewlett-Packard, Microsoft, Xerox, Barnesandnoble.com, MPEG International Standards Committee… Microsoft and others plan to make XrML- compliant products. Will tomorrow’s OS, DVD player, … enforce XrML policies?

7 XrML Shortcomings No formal semantics. Policies can be ambiguous. The interpretation of the syntax doesn’t quite match the algorithm. The algorithm’s behavior on some (realistic) input is unintuitive and unintended by language designers. E.g. If Alice is a student and any student may eat lunch, may Alice? Alg. says no.

8 Improving XrML Fix the algorithm to match developers’ intent. Translate XrML policies to formulas in modal first-order logic. Prove our translation matches the algorithm. Algorithm says policies imply a permission iff translated policies imply translated permission. Why translate? Gives XrML formal semantics (no ambiguity). Lets us compare XrML with languages in CS literature, borrow complexity results, extensions,…

9 First step: Present XrML syntax XrML is an XML-based language. XrML policies are verbose. So, we present a syntax that is more concise and easy to map to XrML syntax.

10 XrML Syntax Language includes a set of principals. Primitive principals are agents (e.g., Alice, Bob). Set of principals is closed under union (e.g., Alice  Bob is a principal; often written as {Alice, Bob}). According to the XrML doc, {p 1,.., p n } represents agents p 1, …, p n “acting together as one holistic identified entity”. But what does this mean?

11 Groups/members relationship Suppose that agent p has property Pr p and group {p, …} has property Pr g. What should we infer? Option 1: nothing. Option 2: {p, …} has property Pr p. Option 3: p has property Pr g.

12 Groups/members relationship Suppose that agent p has property Pr p and group {p, …} has property Pr g. What should we infer? Option 1: nothing. Option 2: {p, …} has property Pr p. Option 3: p has property Pr g. XrML chooses each of these options (at different points in the specification).

13 Groups/members relationship Suppose that agent p has property Pr p and group {p, …} has property Pr g. What should we infer? Option 1: nothing. Option 2: {p, …} has property Pr p. Option 3: p has property Pr g. XrML chooses each of these options (at different points in the specification). No formal semantics  language is inconsistent!

14 Our fix Since XrML is inconsistent… We do not assume that a group has the properties of its members or vice-versa. But can easily write policies to force either relationship (or both).

15 Syntax (cont.) Resources Digital content (e.g., a movie, an article) Rights Actions (e.g., play, edit) Properties Describe a principal (e.g., adult, trusted).

16 Syntax (cont.) Conclusions conc ::= Pr(p) | Perm(p, r, s) Pr(p) means principal p has property pr. Perm(p, r, s) means p is permitted to exercise right r over resource s.

17 Syntax (cont.) Conclusions conc ::= Pr(p) | Perm(p, r, s) Pr(p) means principal p has property pr. Perm(p, r, s) means p is permitted to exercise right r over resource s.

18 Syntax (cont.) Conclusions conc ::= Pr(p) | Perm(p, r, s) Pr(p) means principal p has property pr. Perm(p, r, s) means p is permitted to exercise right r over resource s.

19 Syntax (cont.) Conclusions conc ::= Pr(p) | Perm(p, r, s) Pr(p) means principal p has property pr. Perm(p, r, s) means p is permitted to exercise right r over resource s. Conditions cond ::= true | conc | cond  cond.

20 Syntax (cont.) grant ::=  x 1 …  x n (cond  conc). If cond holds, then conc holds. In our fragment, grants are closed (no free variables). license ::= (grant, principal) (g, p) means p issues/says g.

21 Examples Can write: `Joe is a SPYCE member’ as true  SPYCE(Joe), Andre says`Joe is a SPYCE member’ as (true  SPYCE(Joe), Andre). Vicky says `Any SPYCE member who gives a talk may have a cookie’ as (  x (SPYCE(x)  GivesTalk(x)  Perm(x, eat, cookie)), Vicky).

22 Examples Can write: `Joe is a SPYCE member’ as true  SPYCE(Joe), Andre says`Joe is a SPYCE member’ as (true  SPYCE(Joe), Andre). Vicky says `Any SPYCE member who gives a talk may have a cookie’ as (  x (SPYCE(x)  GivesTalk(x)  Perm(x, eat, cookie)), Vicky).

23 Examples Can write: `Joe is a SPYCE member’ as true  SPYCE(Joe), Andre says`Joe is a SPYCE member’ as (true  SPYCE(Joe), Andre). Vicky says `Any SPYCE member who gives a talk may have a cookie’ as (  x (SPYCE(x)  GivesTalk(x)  Perm(x, eat, cookie)), Vicky).

24 Examples Can write: `Joe is a SPYCE member’ as true  SPYCE(Joe), Andre says`Joe is a SPYCE member’ as (true  SPYCE(Joe), Andre). Vicky says `Any SPYCE member who gives a talk may have a cookie’ as (  x (SPYCE(x)  GivesTalk(x)  Perm(x, eat, cookie)), Vicky).

25 The syntax given here is a fragment of XrML. (See paper for details.)

26 XrML Algorithm Let L be a set of licenses; G is a set of grants that implicitly hold. Auth algorithm In: L, G, and a closed conclusion e. Out: true iff e “follows” from L and G. Auth calls Holds algorithm Holds in: L and a closed condition d. Out: true iff d “follows” from L.

27 Auth(e, L, G) overview Recall e is a closed conclusion. L is the set of issued licenses. G is set of grants that hold implicitly. R is the grants that hold relative to L and G G  {g | (g, p)  L, “L  G  Perm(p, issue, g)”} D is {d |  g  R. “g  d  e”}. Auth(e, L, G) returns  d  D Holds(d, L).

28 Problem Let g = true  Student(Alice), g’ =  x (Student(x)  Perm(x, eat, lunch)) May Alice eat lunch? Auth(Perm(Alice, eat, lunch), , {g, g’}) Auth sets R, the grants that hold, to {g, g’}. Auth sets D = {Student(Alice)}, since g’ implies Perm(Alice, eat, lunch) if Student(Alice) holds. Auth calls Holds(Student(Alice),  ), which returns false, since Student(Alice) doesn’t follow from . Auth says no!

29 The fix To correct the problem, pass G to Holds and modify Holds to use the new info. Notice: Bug is easy to find and easy to fix, but still made it into the released March 2003 version of the spec.

30 Another bug Auth(e, , {  x (Perm(p, issue, x)  e)}) Sets R={  x ( Perm(p, issue, x)  e)} Sets D={Perm(p, issue, g) | g is a grant} Calls Holds on each d  D. The set of grants is infinite. g 0 = true  Student(Alice) g i = true  Perm(Bob, issue, g i-1 ), i = 1, … D is infinite. Auth doesn’t terminate.

31 Our fix Restrict the grants in the language. If a grant g has a condition d, d mentions a resource variable x, and x is free in d, then x is free in g’s conclusion. Can make an empirical argument for why this restriction is okay. Alternative: Restrict the language so that the set of grants is finite.

32 But that’s not all… In this small fragment of XrML, there are 2 other bugs. See paper for details.

33 The translation The translation relies on which licenses have been issued and which grants implicitly hold. Let s L,G be the translation of any string s wrt the input parameters L and G.

34 Translation (cont.) (g, p) L,G = Issued(p, c g ). Assume a constant c g for each grant g. Perm(p, issue, g) L,G = Perm(p, issue, c g ) Except for grants, rest of translation is straightforward. (d 1  d 2 ) L,G = d 1 L,G  d 2 L,G, Pr(p) L,G = Pr(p), and true L,G = true

35 Translating grants  x 1 …  x n (d  e) L,G =  x 1 …  x n (Holds(d, L, G)  e L,G ) Holds(d, L, G) returns true iff d is a logical consequence of L and G. Define a modal operator Val, where Val(  ) is true in a model m iff  is true in all models. Holds(d, L, G)=Val(   L L,G   g  G g L,G  d L,G )

36 Correctness Definition: A good model satisfies union properties (p 1  p 2 = p 2  p 1, …), and if Issued(p, g)  Perm(p, issue, g) holds, then g holds. Thm: the fixed Auth(e, L, G) returns true iff   L L,G   g  G g L,G  e L,G is true in every good model.

37 Complexity Determining if a set of XrML grants imply a conclusion is NP-hard. This is because the language supports sets of primitive principals. If we remove  from the language… XrML translates (essentially) to Datalog, which is a well-known tractable language. Given the translation, finding a tractable, fairly expressive fragment is easy.

38 Summary Industry wants to implement XrML but … XrML has no formal semantics and needs them! We give formal semantics to a representative fragment of XrML. Even a small fragment is intractable. We can leverage results in the CS literature to find fairly expressive, tractable options. Next step: Add negation to XrML.

39 talk ends on preceding slide

40 Sample XrML policy Consider the policy `anyone may play the movie `Big Hit’ for $2 (per use)’. We could write this policy in XrML as…

41 Big Hit 2.00 </sx:paymentPerUse