Sunteți pe pagina 1din 8

JIF Java Information Flow

 Basic Programming Features


 Encapsulation
 Basic Access Control

 New Demand In Basic Programming Features


 Control Data Flow around Application.
Introduction
2

Information Flow:
 The way that information moves through a program.
 Is define by variables and methods in program.

Problem:
 Each time a program produces an output
 It is a possibility that information it contains may be disclose

Solution:
 Permission based model: to impose ownership on variables
 Only owner authorized to read and write variables
Controlling Information Flow
3

Exemption:
This provide a security in an application not in system (will be leaked from system).
Proposal:
Decentralized Label Model
Decentralized Label Model
(Principals and Policies)
4

Principals:
 Are Users, groups or roles

 Perform operations (read/write) on values in program

 Any principals can authorized another to act on its

behalf.
 Limits in principals:

 T(*) can act for every principal and called the top
principal
 I(_) which allows all principals to act for it is called
bottom principal
… Decentralized Label Model
5

Policies:
 DLM Allows programmer to specify policies using

labels for each labels.


 Braces {} are used after variable type declaration.

 No policy assigned is possible.

 To specified public policy used empty brasses like {}

 Confidentiality Policies: {owner —> read}

 Integrity Policies: {owner <— write}

 Restrictive Policies: {owner —> *} or {owner —> _}


JIF Java Information Flow
6

 DLM forms the foundation of JIF.


 JIF takes the concepts and the language rules from
DLM
 JIF expands DLM rules into a full language
extension to java
 Flow of Control:

 Syntax: int {Alice—>Bob} x=10;


 int {Alice —>Bob: Alice<—Frank} y=20;
Example of JIF Program
7

import jif.principals.*;
public class Example1{
public static void main{}(principal{} p, String[]{} args){
//construct the principals .
final principal Alice = new Alice(); final principal Bob = new Bob();
//set the private data, notice the fields only have owners.
String{Alice:} aliceCarReg =“XYZ”;
String{Bob:} BobCarReg =“ABC”;
String{} publicReg=“”;
//attempt to set the public field with Alice's private car registration
publicReg = aliceCarReg; // will generate error
}
}
Debug:
String{Alice:_} aliceCarReg =“XYZ”;
8

 Blog: http://mohsinpage.wordpress.com/
 Twitter: http://twitter.com/moshsin
 LinkedIn: http://pk.linkedin.com/in/rmyasin
 E-Mail: myasinr@gmail.com

S-ar putea să vă placă și