luke zarko - fp interview slides

24
A REUSABLE, SECURE REFERENCE MONITOR BASED ON THE AURA PROGRAMMING LANGUAGE Luke Zarko

Upload: others

Post on 05-Feb-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Luke Zarko - FP interview slides

A REUSABLE, SECURE REFERENCE MONITOR BASED ON

THE AURA PROGRAMMING LANGUAGE

Luke Zarko

Page 2: Luke Zarko - FP interview slides

A MOTIVATING EXAMPLE

Page 3: Luke Zarko - FP interview slides

KNITTER

► Knitter is a Web service allows users to post short messages to one another

► Knitter will release a public API; clients who wish to perform privileged actions must provide evidence

► This evidence can be logged for later auditing

Page 4: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► Knitter provides an insecure RPC to get the user ID for a particular name

Client Server

getUserID “Alice”

1234

Page 5: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► Users need to get evidence that they know the password to their account

md5(“secret”)

matches user 1234

Client Server

matchPassword

user:1234

hash:md5(“secret”)

Page 6: Luke Zarko - FP interview slides

EVIDENCE

► Evidence may be built from assertions

▻ Digital signatures prevent forging

md5(“secret”)

matches user 1234

if md5 matches,

then login OK

Signed policySigned assertion

Page 7: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► Knitter accepts evidence that the password matches in its database as evidence that a principal may log in as a user

► This promotion is ideally done with no additional round trips to the service backend

Client

md5(“secret”)

matches user 1234

if md5 matches,

then login OK

Page 8: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► Knitter accepts evidence that the password matches in its database as evidence that a principal may log in as a user

► This promotion is ideally done with no additional round trips to the service backend

Client

login(1234) OK

Page 9: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► The user can make posts as a particular Knitter user with evidence that he is logged in

Client

if login OK, then

can postlogin(1234) OK

can post (1234)login

OK

Page 10: Luke Zarko - FP interview slides

SUPPORTING LOGIN PROVIDERS

► The OpenLogin system allows single sign-on for many Web services

► Knitter allows evidence from OpenLogin to be used as evidence for Knitter login (provided there is a map between an OLID and a Knitter UID)

OLID(x) maps to

UID(x)

If OpenLogin OK

and OLID maps to UID,

then login OK

OpenLogin for

User OLID(x) OK

Page 11: Luke Zarko - FP interview slides

SEPARATING POLICY FROM MECHANISM

► Normally, Knitter would implement these security features at the same level as their database

► This project advocates a different method: a separate piece of software called a reference monitor that can manage security

▻ … and will allow us to separate the policy of Knitter access from its mechanism

► This software can be used with different policies

▻ …so the size of the trusted computing base shrinks

Page 12: Luke Zarko - FP interview slides

MY SYSTEM

► The AURA policy language is due to Jia, Vaughan, Mazurak, Zhao, Zarko, Schorr and Zdancewic.

.NET client API

Log

Reference Monitor

Policyinterface

RPCdescription

Policyimplementation

Runtime Engine

Application using service

Application providing service

(complete mediation)

RuntimePolicy int.

RPC desc.

Page 13: Luke Zarko - FP interview slides

THE AURA LOG

► All actions on the reference monitor are automatically logged for later auditing

► Rather than reinvent the wheel, I use XML and XQuery to represent and query the tree-structured evidence <proof>

<sign serial="688020759">

<remote short="{411}" />

<qapp>

<qapp>

<qctr

name="DbPasswordMatches" />

<qint>4</qint>

</qapp>

<qstring>bf494…5ece7</qstring>

</qapp>

</sign>

</proof>

Log

ClientServer md5(“secret”)

matches user 4

Page 14: Luke Zarko - FP interview slides

RELATED WORK

► KeyNote

▻Many of the same goals (small, reusable)

▻ Based on execution of programs on strings (that may be signed to become credentials)

▻ Acts as an ‘advisor’ to hosting applications

► PolicyMaker

▻ Superset of KeyNote

▻ Signature verification is not built in

▻ Runs programs in a shared tuple space until an accept message is emitted

Page 15: Luke Zarko - FP interview slides

RELATED WORK

► REFEREE

▻ Can fetch credentials at runtime

▻ Verification of signatures is left to policy

► Logic Programming (Fournet, Gordon and Maffeis)

▻ Specifies authorization policy in a high-level logic language

▻ Static reasoning possible

▻ Exposes crypto primitives

▻ Erases proofs

Page 16: Luke Zarko - FP interview slides

WEAKNESSES

► The AURA runtime and language do not support revocation

▻ Active area of research; in the short term, timestamps

► Some policies may be sensitive to replay attacks

▻ Use encrypted RPC links

Page 17: Luke Zarko - FP interview slides

SUMMARY

► The AURA reference monitor provides

▻ An expressive language for policy

▻ A reusable security system

▻ A method for audit with powerful query tools

► In contrast to other approaches

▻ AURA requires strict mediation

▻ AURA benefits from a strong static typing model

▻ Signatures in AURA are handled transparently

▻ Evidence in AURA may be logged for later audit

Page 18: Luke Zarko - FP interview slides

QUESTIONS?

Page 19: Luke Zarko - FP interview slides

BASIC LOGIN AND MAKING POSTS

► The user can make posts as a particular Knitter user with evidence that he is logged in

Client Server

posted

can

postlogin

OK

post user:1234

text:“hello”

Page 20: Luke Zarko - FP interview slides

ACCESS CONTROL POLICY

► A system’s access control policy determines who (which principals) may perform actions on protected resources.

► Various mechanisms are used today to implement access control policy

▻ UNIX permission bits

▻Windows NT ACLs

▻ Pharos printer kiosks

▻ Bespoke security features on Web backends

Page 21: Luke Zarko - FP interview slides

ACCESS CONTROL POLICY

► Each of these mechanisms ask you to trust a different system

▻We believe CETS is doing their job, so we believe transitively that UNIX, NT and Pharos are correct

► Ideally, we could shrink the size of the trusted computing base—the components that must be trusted to enforce a given security policy1

▻ You wouldn’t write your own crypto, so why write your security mechanism?

1. Steve Zdancewic, CIS/TCOM 511 lecture notes 10.

Page 22: Luke Zarko - FP interview slides

EVIDENCE

► Evidence may be combined without communicating with signing parties

login(1234) OK Not signed, but well-typed andconstructed from signed evidence

Page 23: Luke Zarko - FP interview slides

DISTRIBUTING AURA SERVICES

► OpenLogin distributes two main files to provide access to its service

▻ A public key, used to check signatures on its evidence

▻ A policy description file, which contains names and descriptions of the types of evidence and RPCs

OpenLogin for

User OLID(x) OK

Policy description Public key

Page 24: Luke Zarko - FP interview slides

AFFILIATES MAKING FRIENDS

► Knitter wants to allow advertisers to befriend particular Knitter users

► So they simply add a new way to build evidence that a principal can add a friend

if an affiliate,

then for all UIDs,

can add a friend