Model-Driven Software Development - Web Abstractions 2

67
Web Abstractions 1I access control policies, data validation, workflow, ajax, search Course IN4308 Master Computer Science Delft University of Technology Eelco Visser http://eelcovisser.org Lecture 4 Wednesday, March 10, 2010

description

Fourth lecture in course "Model-Driven Software Development" at Delft University of Technology

Transcript of Model-Driven Software Development - Web Abstractions 2

Page 1: Model-Driven Software Development - Web Abstractions 2

Web Abstractions 1Iaccess control policies, data validation, workflow, ajax, search

Course IN4308Master Computer Science

Delft University of Technology

Eelco Visserhttp://eelcovisser.org

Lecture 4

Wednesday, March 10, 2010

Page 2: Model-Driven Software Development - Web Abstractions 2

Modeling Software Systems

Modeling Web Programs

Implementing Web Models

Modeling Software Languages

Transforming Software Models

Make your own Software Languages

Modeling IDEs

Software Language Engineering Strategies

Wednesday, March 10, 2010

Page 3: Model-Driven Software Development - Web Abstractions 2

Web Abstractions

from a declarative point of view(we’ll investigate underlying mechanisms later)

Wednesday, March 10, 2010

Page 4: Model-Driven Software Development - Web Abstractions 2

More Web Abstractions

- Access control policies

★ constraints over objects

★ role-based AC, discretionary AC

- Data validation

★ form validation

★ data integrity

- Workflow

- Search

- AJAX: accessing page fragments (templates)

Wednesday, March 10, 2010

Page 6: Model-Driven Software Development - Web Abstractions 2

Case 2: Access Control Policy for Conference

Papers

★ has authors

Authors

★ submit papers, read reviews

Reviewers

★ write review for paper & discuss papers

★ are anonymous (for authors)

Conflicts

★ author cannot be reviewer

★ reviewer not related to authors

Wednesday, March 10, 2010

Page 7: Model-Driven Software Development - Web Abstractions 2

Access Control Mechanisms

Wednesday, March 10, 2010

Page 8: Model-Driven Software Development - Web Abstractions 2

WebDSL Access Control

Constraints over data model

- boolean expression over properties of objects

Rules restrict access to resources

- page, template, action

Infer restriction of navigation

- don’t show link to inaccessible page or forbidden action

Wednesday, March 10, 2010

Page 9: Model-Driven Software Development - Web Abstractions 2

Principal

turn on access control

representation of principal

Wednesday, March 10, 2010

Page 10: Model-Driven Software Development - Web Abstractions 2

Access Control Rules

‘may access page f with argument x if boolean expression e is true’

Wednesday, March 10, 2010

Page 11: Model-Driven Software Development - Web Abstractions 2

Wiki Access Control Rules

‘only logged in users may edit pages’

‘anyone can view existing pages, only logged in users can

create pages’

Wednesday, March 10, 2010

Page 12: Model-Driven Software Development - Web Abstractions 2

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 13: Model-Driven Software Development - Web Abstractions 2

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 14: Model-Driven Software Development - Web Abstractions 2

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 15: Model-Driven Software Development - Web Abstractions 2

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 16: Model-Driven Software Development - Web Abstractions 2

Access Control Policies

Wednesday, March 10, 2010

Page 17: Model-Driven Software Development - Web Abstractions 2

Access Control Policies

Standard Policies

- Mandatory access control

- Discretionary access control

- Role-based access control

Mixing policies

- Role-based + discretionary access control

WebDSL

- No restrictions on access control policies

Wednesday, March 10, 2010

Page 18: Model-Driven Software Development - Web Abstractions 2

Encoding Access Control Policies

Rules

- Who may access which resources?

- Who can apply which actions?

Representation

- How are permissions stored?

Administration

- How can permissions be changed?

- Who can change permissions?

Wednesday, March 10, 2010

Page 19: Model-Driven Software Development - Web Abstractions 2

Wiki: Data Model

Wednesday, March 10, 2010

Page 20: Model-Driven Software Development - Web Abstractions 2

Wiki: User Interface Templates

(abbreviated to navigation structure)Wednesday, March 10, 2010

Page 21: Model-Driven Software Development - Web Abstractions 2

Wiki: Generic Access Control Rules

Wednesday, March 10, 2010

Page 22: Model-Driven Software Development - Web Abstractions 2

Mandatory Access Control

Security Labels

★ Classification label protects object

• Top Secret, Secret, Confidential, Unclassified

★ Clearance indicates access of subject

Confidentiality rules

★ Read-down: clearance should be higher than or equal to classification document to read

★ Write-up: clearance is lower than or equal to classification of document to write

Wednesday, March 10, 2010

Page 23: Model-Driven Software Development - Web Abstractions 2

MAC: representation

Wednesday, March 10, 2010

Page 24: Model-Driven Software Development - Web Abstractions 2

MAC: predicates

Wednesday, March 10, 2010

Page 25: Model-Driven Software Development - Web Abstractions 2

Discretionary Access Control

Access control lists

- objects have owner

- owner grants, revokes users access to object

Example: Unix file permissions

- read, write, execute permissions for

- owner, group, anyone

Wednesday, March 10, 2010

Page 26: Model-Driven Software Development - Web Abstractions 2

DAC: representation

Wednesday, March 10, 2010

Page 27: Model-Driven Software Development - Web Abstractions 2

DAC: predicates

Wednesday, March 10, 2010

Page 28: Model-Driven Software Development - Web Abstractions 2

DAC: administration

Wednesday, March 10, 2010

Page 29: Model-Driven Software Development - Web Abstractions 2

Role-Based Access Control

Role: group of activities

- authorization assigned to roles

- users assigned to roles

- robust to organizational changes

Hierarchical roles

- least privilege: use minimal permissions for task

Separation of duties

- critical actions require coordination

Wednesday, March 10, 2010

Page 30: Model-Driven Software Development - Web Abstractions 2

RBAC: representation

Wednesday, March 10, 2010

Page 31: Model-Driven Software Development - Web Abstractions 2

RBAC: predicates

Wednesday, March 10, 2010

Page 32: Model-Driven Software Development - Web Abstractions 2

RBAC: administration

Wednesday, March 10, 2010

Page 33: Model-Driven Software Development - Web Abstractions 2

Mixing Access Control Policies

Real policies

- Mix of DAC & RBAC

- AC rules are constraints over object graph

WebDSL

- No policies built-in

Wednesday, March 10, 2010

Page 34: Model-Driven Software Development - Web Abstractions 2

Case 2: Access Control Policy for Conference

Papers

★ has authors

Authors

★ submit papers, read reviews

Reviewers

★ write review for paper & discuss papers

★ are anonymous (for authors)

Conflicts

★ author cannot be reviewer

★ reviewer not related to authors

Wednesday, March 10, 2010

Page 36: Model-Driven Software Development - Web Abstractions 2

Data Validation

Check input & maintain data integrity

Types of validation

- Value well-formedness

- Data invariants

- Input assertions

- Action assertions

User interface integration

- Display errors

Wednesday, March 10, 2010

Page 37: Model-Driven Software Development - Web Abstractions 2

Validation Rules

data validation

form validation

action assertions messages

Wednesday, March 10, 2010

Page 38: Model-Driven Software Development - Web Abstractions 2

Value Well-Formedness

Wednesday, March 10, 2010

Page 39: Model-Driven Software Development - Web Abstractions 2

Customizing Value Well-Formedness Rules

Wednesday, March 10, 2010

Page 40: Model-Driven Software Development - Web Abstractions 2

Data Invariants

Wednesday, March 10, 2010

Page 41: Model-Driven Software Development - Web Abstractions 2

Data Invariants

Wednesday, March 10, 2010

Page 42: Model-Driven Software Development - Web Abstractions 2

Data Invariants

Wednesday, March 10, 2010

Page 43: Model-Driven Software Development - Web Abstractions 2

Data Invariants

Wednesday, March 10, 2010

Page 44: Model-Driven Software Development - Web Abstractions 2

Input Assertions

Wednesday, March 10, 2010

Page 45: Model-Driven Software Development - Web Abstractions 2

Action Assertions

Wednesday, March 10, 2010

Page 46: Model-Driven Software Development - Web Abstractions 2

Customizing Error Messages

Wednesday, March 10, 2010

Page 48: Model-Driven Software Development - Web Abstractions 2

Workflow

Coordinating activities by participants

WebWorkFlow

- object-oriented workflow definition

- integrate all aspects of workflow

★ data

★ user interface

★ access control

★ control-flow

- abstractions on top of base WebDSL

Wednesday, March 10, 2010

Page 49: Model-Driven Software Development - Web Abstractions 2

WebWorkFlow by Example: Progress Meeting

Wednesday, March 10, 2010

Page 50: Model-Driven Software Development - Web Abstractions 2

Wednesday, March 10, 2010

Page 51: Model-Driven Software Development - Web Abstractions 2

process definition

workflow procedureworkflow object

procedure call

Wednesday, March 10, 2010

Page 52: Model-Driven Software Development - Web Abstractions 2

enable next step

parallel

iterate

Wednesday, March 10, 2010

Page 53: Model-Driven Software Development - Web Abstractions 2

access control

access controlWednesday, March 10, 2010

Page 54: Model-Driven Software Development - Web Abstractions 2

Wednesday, March 10, 2010

Page 55: Model-Driven Software Development - Web Abstractions 2

Wednesday, March 10, 2010

Page 56: Model-Driven Software Development - Web Abstractions 2

action

Wednesday, March 10, 2010

Page 57: Model-Driven Software Development - Web Abstractions 2

no user interface

Wednesday, March 10, 2010

Page 58: Model-Driven Software Development - Web Abstractions 2

condition

Wednesday, March 10, 2010

Page 59: Model-Driven Software Development - Web Abstractions 2

Workflow Remarks

Recursive workflows (see paper)

Issue: user interface patterns for workflow

Is workflow an anti-pattern?

- is workflow good interaction design?

- determine order of user actions

- what are alternatives?

Wednesday, March 10, 2010

Page 60: Model-Driven Software Development - Web Abstractions 2

Search

Wednesday, March 10, 2010

Page 61: Model-Driven Software Development - Web Abstractions 2

search annotations

search queries

Wednesday, March 10, 2010

Page 62: Model-Driven Software Development - Web Abstractions 2

AJAX

Michel Weststrate. Abstractions for Asynchronous User Interfaces in Web Applications.Master's thesis, Delft University of Technology, 2009.

Wednesday, March 10, 2010

Page 63: Model-Driven Software Development - Web Abstractions 2

AJAX

Deliver page fragments, not just full pages

- Replace page elements by new fragments

- Templates are unit of replacement

Wednesday, March 10, 2010

Page 64: Model-Driven Software Development - Web Abstractions 2

placeholder

default view

Wednesday, March 10, 2010

Page 65: Model-Driven Software Development - Web Abstractions 2

replace

Wednesday, March 10, 2010

Page 66: Model-Driven Software Development - Web Abstractions 2

Summary

Access control policies

★ constraints over objects

★ encoding of standard policies (DAC, RBAC)

Data validation

★ form validation & data integrity

Workflow

★ coordinating activities of multiple participants

Search based on data model annotations

AJAX: accessing page fragments (templates)

Wednesday, March 10, 2010

Page 67: Model-Driven Software Development - Web Abstractions 2

Schedule

Lab this week

★ WebDSL application

Cases

★ Case 2: web abstractions

★ Read: Declarative Access Control for WebDSL

★ Read: Integration of Data Validation and User Interface Concerns

★ Read: WebWorkFlow

Next

★ Lecture 5: WebDSL implementation strategies

★ Lecture 6 & 7: modeling languagesWednesday, March 10, 2010