Using First-order Logic to Reason about Policies Vicky Weissman Joint work with: Joseph Halpern and Carl Lagoze.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

CS4026 Formal Models of Computation Part II The Logic Model Lecture 1 – Programming in Logic.
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Justification-based TMSs (JTMS) JTMS utilizes 3 types of nodes, where each node is associated with an assertion: 1.Premises. Their justifications (provided.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
1 Inductive Equivalence of Logic Programs Chiaki Sakama Wakayama University Katsumi Inoue National Institute of Informatics ILP
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Closure Properties of CFL's
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Authorization Policies Vicky Weissman
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Everything You Need to Know (since the midterm). Diagnosis Abductive diagnosis: a minimal set of (positive and negative) assumptions that entails the.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
A Formal Foundation for XrML Vicky Weissman Joint work with Joe Halpern.
Artificial Intelligence Chapter 11: Planning
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
A Formal Foundation for XrML Vicky Weissman Joint work with: Joseph Halpern.
Extensible Semantics for XrML Vicky Weissman Joint work with Joe Halpern.
Making certificates programmable1 John DeTreville Microsoft Research April 24, 2002.
The Theory of NP-Completeness
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
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Cooperative Query Answering Based on a talk by Erick Martinez.
Lecture 18 Page 1 CS 111 Online Access Control Security could be easy – If we didn’t want anyone to get access to anything The trick is giving access to.
Ninghui Li (Purdue University) 2 nd Int’l Summer School in Computation Logic June 17, 2004 Logic and Logic Programming in Distributed Access Control (Part.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
An Algebra for Composing Access Control Policies (2002) Author: PIERO BONATTI, SABRINA DE CAPITANI DI, PIERANGELA SAMARATI Presenter: Siqing Du Date:
The Bernays-Schönfinkel Fragment of First-Order Autoepistemic Logic Peter Baumgartner MPI Informatik, Saarbrücken.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
 Three-Schema Architecture Three-Schema Architecture  Internal Level Internal Level  Conceptual Level Conceptual Level  External Level External Level.
SIMO SIMulation and Optimization ”New generation forest planning system” Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Lecture 7: Foundations of Query Languages Tuesday, January 23, 2001.
Intro to Planning Or, how to represent the planning problem in logic.
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Copyright 1999Paul F. Reynolds, Jr. Foundations of Logic Programming.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Lecture 9: Query Complexity Tuesday, January 30, 2001.
Artificial Intelligence Logical Agents Chapter 7.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
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.
Introduction to Logic for Artificial Intelligence Lecture 2
ARTIFICIAL INTELLIGENCE
Chapter 7: Beyond Definite Knowledge
Discrete Structures for Computer Science
Computer Security: Art and Science, 2nd Edition
Computer Science cpsc322, Lecture 20
Discrete Structures Prepositional Logic 2
Instructor: Aaron Roth
Representations & Reasoning Systems (RRS) (2.2)
CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre
Presentation transcript:

Using First-order Logic to Reason about Policies Vicky Weissman Joint work with: Joseph Halpern and Carl Lagoze

What is a policy? A policy says that an individual may (or may not) do an action if certain conditions hold. Examples include `All information on this site may be copied.’ 1 `A student shall in no way misrepresent his or her work.’

Questions about policies Users want to know what’s allowed and what’s not. Policy makers want to know if their policies are consistent with those already made. E.g. Alice writes a set of policies for her university’s new outreach program. Do her policies contradict those of the university?

Problem: Ambiguity Consider the policy `All information on this site may be copied’, Interpretation 1: The policy allows any part of the site to be copied. (`All information’ stresses that there are no restrictions on what may be copied.) Interpretation 2: The policy allows the entire site to be copied (i.e. all of the information). May Alice copy a paragraph that is on the site? We don’t know.

Solution: Write policies in first-order logic Good News: Formal semantics  no ambiguity. Fol seems to be sufficiently expressive. Bad News: Many problems for fol are undecidable. Many policy writers are not well-versed in logic. We’ll discuss these issues later in the talk.

Encoding policies A policy says that an individual may (or may not) do an action if certain conditions hold. A policy has the form:  x 1,…,  x m (f  (  ) Permitted(t ag, t ac ))

Encoding policies A policy says that an individual may (or may not) do an action if certain conditions hold. A policy has the form:  x 1,…,  x m (f  (  ) Permitted(t ag, t ac )) Permitted( t ag, t ac ) means that agent t ag may do action t ag where t ag and t ac are terms. E.g. Permitted(Alice, play) means Alice may play.

Encoding policies A policy says that an individual may (or may not) do an action if certain conditions hold. A policy has the form:  x 1,…,  x m (f  (  ) Permitted(t ag, t ac )) f is a conjunction of literals where each literal encodes a condition. E.g. f = Vegetable( x 1 )  Ate(Alice, x 1 )   Scowl( Alice )

Encoding policies A policy says that an individual may (or may not) do an action if certain conditions hold. A policy has the form:  x 1,…,  x m (f  (  ) Permitted(t ag, t ac )) A permitting policy has a positive conclusion, a denying policy has a negative conclusion.

Encoding policies A policy says that an individual may (or may not) do an action if certain conditions hold. A policy has the form:  x 1,…,  x m (f  (  ) Permitted(t ag, t ac )) A permitting policy has a positive conclusion, a denying policy has a negative conclusion. E.g.:  x 1 (Vegetable(x 1 )  Ate(Alice, x 1 )   Scowl(Alice)  Permitted(Alice, play))

Environments Does the policy  x 1 (Vegetable(x 1 )  Ate(Alice, x 1 )   Scowl(Alice)  Permitted(Alice, play)) allow Alice to play? To answer the question we need to know if she ate a vegetable and if she’s scowling. This information, along with other facts about the world, are stored in the environment.

Environments for policies 1.Basic facts (ground literals)  Captures attributes of individuals.  E.g. Vegetable(carrot),  Vegetable(carrot cake) 2.Constraints (universal formulas)  Captures relationships between attributes.  E.g.  x (Private(x)   Public(x)),  x (Freshmen(x)  Student(x)) Policies seem to refer to 2 types of facts: Assumption: Environment doesn’t talk about what’s permitted; policies do that.

Encoding the questions in first-order logic Assume an environment E and a policy set {p 1,…, p n }. `Is c 1 allowed to do c 2 ?’ = `Is E  p 1  …  p n  Permitted(c 1, c 2 ) valid?’ `Are the policies consistent in E?’ `Is E  p 1  …  p n satisfiable?’

Encoding the questions in first-order logic Assume an environment E and a policy set {p 1,…, p n }. `Is c 1 allowed forbidden to do c 2 ?’ = `Is E  p 1  …  p n   Permitted(c 1, c 2 ) valid?’ `Are the policies consistent in E?’ `Is E  p 1  …  p n satisfiable?’

Can we answer the questions? No. These questions are undecidable. But the game’s not over yet! We can restrict the language so that the questions are tractable AND interesting policies are still expressible.

One solution: Datalog Datalog is negation-free, function-free Horn clauses; queries can be answered in PTime. Some extensions have been considered. Safe, stratified Datalog: Binder [DeTreville 02], RT [Li, Mitchell, Winsborough 02] and SD3 [Trevor 01]. Datalog with constraints: RT c [Li and Mitchell 03]. With these extensions, Datalog is still PTime. But: A policy’s conclusion must be a positive literal (no denying policies). Support for functions is limited.

Denying policies are common. Many applications explicitly forbid actions. `Smoking is prohibited in the dining areas of all restaurants seating more than 35 people’ is part of the NYC Smoke-Free Air Act. `The tickets may not be refunded’ is a policy of many airline fares, theaters, … These policies cannot be captured explicitly in (the extended versions of) Datalog.

Datalog solution What isn’t explicitly permitted is forbidden. Problem: Can’t distinguish forbidden actions from unregulated ones. E.g. A university’s policies talk about who’s permitted to get tenure. The policies for Alice’s new outreach program don’t.  Alice’s policies contradict the university’s.

We may want functions too. Functions often occur naturally when translating English policies to first-order logic. E.g. `All information on the site may be copied’ translates to either:  x 1, x 2 (OnSite(x 1 )  Permitted(x 2, copy(x 1 )))  x 1, x 2 (EntireSite(x 1 )  Permitted(x 2, copy(x 1 )))

Another solution We want a language that doesn’t restrict functions and allows us to capture denying policies. To get this in a tractable language, some restrictions are necessary. Key idea: Restrict bipolars.

What is a bipolar? A literal l is bipolar in a formula f (in CNF) if 1. the literal l is in f and 2. there is another literal l’ in f such that l  =  l’  ’ for some variable substitutions  and  ’. Consider f =  x, y (Can(Alice, x)   Can(y, sing)) Can(Alice, x) is bipolar in f, because 1. the literal Can(Alice, x) is in f and 2. the literal Can(Alice, x)  =  l’  ’ where l’ =  Can(y, sing),  = [x/sing], and  ’ = [y/Alice].

Why is bipolarity interesting? If E is an environment and {p 1, …, p n } is a set of policies such that 1.every variable on the lhs of a policy also appears on the rhs, 2.E is a conjunction of ground literals, and 3.there are no bipolar literals in p 1  …  p n. Then our questions can be answered in time (|E|+|P|) log|E| where P = p 1  …  p n. |f| is the length of f viewed as a string of symbols. Language with functions + denying policies is tractable!

When is every variable on the lhs also on the rhs? Recall: A policy’s lhs states the conditions under which the permission on the rhs is granted/denied. Variable restriction is met if what you’re allowed/forbidden to do is based solely on your attributes and the attributes of the regulated action. Our problems are NP in the number of variables in a single policy that violate the restriction.

When is E a conjunction of ground literals? This restriction is met if E is derived from databases and certificates. If the E has constraints (e.g. anything private is not public), then Our problems can be answered in quadratic time, if no more than 1 bipolar per clause. More than one bipolar per clause is common if there are definitions (e.g. a senior citizen is someone over 65), but it’s easy to deal with definitions; they’re just macros.

When are there no bipolar literals in p 1  …  p n ? Suppose  Permitted is not in any policy’s premise and  all policies are permitting (or all denying). Then  The restriction holds if meeting a condition can only add or remove privileges (but not both).  If each policy has at most 1 bipolar in p 1  …  p n, then answering queries takes quadratic time. But what if some policies are permitting and others denying?

Big idea We want permissions (prohibitions) to follow solely from the permitting (denying) policies. If this were true, then we could answer a query by looking at the permitting and denying policies separately. Want we want doesn’t come for free.

Denying policies can affect permissions Consider 2 permitting policies: p 1 = `anyone who is not faculty may nap.’ p 2 = `faculty may chair committees.’ If Alice is a student, may she take a nap?

Denying policies can affect permissions Consider 2 permitting policies: p 1 = `anyone who is not faculty may nap.’ p 2 = `faculty may chair committees.’ If Alice is a student, may she take a nap? No, because Alice could be a student who is also a faculty member.

Denying policies can affect permissions Consider 3 policies: p 1 = `anyone who is not faculty may nap.’ p 2 = `faculty may chair committees.’ p 3 = `students may not chair committees.’ If Alice is a student, may she take a nap?

Denying policies can affect permissions Consider 3 policies: p 1 = `anyone who is not faculty may nap.’ p 2 = `faculty may chair committees.’ p 3 = `students may not chair committees.’ If Alice is a student, may she take a nap? Yes, because p 2 and p 3 together imply that students aren’t faculty. Moral: Permitting and denying policies together can imply environment facts, so we can’t separate the policies, unless…

Separating policies Thm: If implied information is made explicit, then a positive conclusion follows from all the policies iff it follows from the permitting policies. If there are n policies and there is only one bipolar per policy that involves Permitted, then at most n 2 clauses are added and no added clause is more than twice the length of the longest original clause. Bottom line: Under reasonable assumptions, we can answer our queries in quadratic time.

Expressive power The fragment can capture a number of policy sets including the ones we collected from libraries, the ones we collected from government docs, most of the licenses that can be written in XrML.

Why can’t we handle all XrML licenses? XrML allows Permitted in the antecedent of policies. Permitted can be a bipolar  a clause can have multiple bipolars. But, XrML does not support negation. Our fragment can express some policies that XrML can’t and vice-versa.

Are we done yet? We have found a language that is expressive enough to capture many policies of practical interest AND for which we can answer questions efficiently. But we haven’t shown that it’s accessible to the many policy makers and administrators who are not logicians.

The architecture GUI translator user input data- base formulas answers questions answers in English GUI Lets non-logicians enter policies and relevant facts; ask questions. translator Translates between user input/ English and first-order formulas in our restricted form. analyzer Answer questions such as `Can Alice edit the website?’ and `Are the policies consistent?’.

Interface User selects a task such as: Describe a person, item, or action. State a policy. Ask if an action is permitted/forbidden. User completes the task by filling in a form. E.g. To say `Alice is an IEEE member from Jan. 1, 2003 to Jan. 1, 2004’…

Interface User selects a task such as: Describe a person, item, or action. State a policy. Ask if an action is permitted/forbidden. User completes the task by filling in a form. E.g. To say `Alice is an IEEE member from Jan. 1, 2003 to Jan. 1, 2004’…

Form: Describe a person, item, or action Who or what is being described? What is the characteristic? Does the person, item, or action have the characteristic? Yes No When does this description apply? From: To:

Form: Describe a person, item, or action Who or what is being described? Alice What is the characteristic? IEEE Member Does the person, item, or action have the characteristic? Yes No When does this description apply? From: 1/1/03 To: 1/1/04

Conclusion Completed work Found a tractable fragment of first-order logic that can express many (almost all?) policies of interest. Work in progress Investigating the extent to which we can capture the social security database. Building a prototype to demonstrate the language’s usability. Applying the same techniques to formalizing XrML.

For more information… The paper`Using First-order Logic to Reason about Policies’ is available: at in the proceedings of this year’s Computer Security Foundations Workshop (CSFW).

Describe a person, item, or action We tell you what’s allowed and what’s not sign in | help Home Facts  Describe a person, item, or action. Relate one person, item, or action to another. Record an event. Modify the fact database. Policies Give permission. Deny permission. Modify the policy database. Queries Is an event allowed? Is an event forbidden? What are the known facts? What are the known policies? Who or what is being described? What is the characteristic? Does the person, item, or action have the characteristic? When does this description apply? … yesno … From: dd/mm/yy or now To: dd/mm/yy or unknown oralways Done (e.g. George Smith, Rhodes Hall) (e.g. librarian, building) Riccardo Focardi Program Chair Abort 26/06/0226/06/04

Give Permission We tell you what’s allowed and what’s not sign in | help Home Facts Describe a person, item, or action. Relate one person, item, or action to another. Record an event. Modify the fact database. Policies  Give permission. Deny permission. Modify the policy database. Queries Is an event allowed? Is an event forbidden? What are the known facts? What are the known policies? Who is being given permission? Anyone who meets the following description: Right-click in scrollbars to add/remove requirements. Which actions are being regulated? Any action that meets the following description: Are there other conditions that must hold for the policy to apply? DoneAbort